4

The problem occurred after I had added Groovy Unit Testing .jar to my project (it is sole activity I suppose which could 'damage' my Intellij but it is quite likely that the reason is something else because the problem is global - it appears in all projects).

For example I get message like this:

enter image description here

but after I press Alt+Enter nothing happen.

If I append another keyboard shortcut for "show intention actions" it doesn't work either. However if I append Alt+Enter with another action then that another action works properly using this shortcut.

It is also interesting that shortcut Alt+Enter is reserved not only for action "show intention actions", but if I remove another associations it still doesn't work.

Every intentions in Intellij are enabled and power save mode is disabled.

I have read IntelliJ, Alt+Enter doesnt work Auto errors detection in IntelliJ IDEA but it doesn't solve my problem.

Borneo777
  • 139
  • 2
  • 13
  • Any errors in [idea.log](https://intellij-support.jetbrains.com/hc/articles/207241085)? – CrazyCoder May 18 '17 at 13:46
  • No errors in idea.log – Borneo777 May 18 '17 at 13:47
  • Please provide a short video of your IntelliJ IDEA window while you are trying to show intentions. – CrazyCoder May 18 '17 at 13:47
  • Sorry for the last answer I have errors like this in idea.log: 2017-05-18 14:39:11,335 [ 604348] ERROR - aemon.impl.PassExecutorService - IntelliJ IDEA 2016.2.5 Build #IU-162.2228.15 and 2017-05-18 14:24:33,662 [ 481894] ERROR - llij.ide.plugins.PluginManager - IntelliJ IDEA 2016.2.5 Build #IU-162.2228.15 – Borneo777 May 18 '17 at 13:58
  • Share the full log. See if updating to the later versions helps. – CrazyCoder May 18 '17 at 14:00
  • i have two errors (both are in this link) https://pastebin.com/Vaibw6vW – Borneo777 May 18 '17 at 14:07
  • Does your project have Groovy SDK library in the dependencies? – CrazyCoder May 18 '17 at 14:12
  • film is here https://drive.google.com/drive/folders/0Byqxp8EUop0_YUVCOC1HN2FmODA sorry for waiting – Borneo777 May 18 '17 at 14:33
  • CrazyCoder i tried to write unit tests using Groovy but i resigned of using groovy and removed that library from my project - if this is the cause why the problem occurs in all projects? – Borneo777 May 18 '17 at 14:49
  • Reindexing is usually resolves the problem – Dany May 18 '17 at 14:52

5 Answers5

1

Your IntelliJ IDEA installation seems to be corrupted, some jars are missing.

Caused by: java.lang.ClassNotFoundException: groovy.lang.Closure PluginClassLoader[org.intellij.groovy, 9.0]

The solution would be reinstall the same version you have from this link or install the current version.

CrazyCoder
  • 389,263
  • 172
  • 990
  • 904
1

The solution was: missing groovy-all-2.4.6.jar file in my /home/user/idea-IU-162.2228.15/lib folder. How have I removed it?

According to jetbrains page I chose Groovy JUnit test library and press fix. After few minutes I decided not to use Groovy JUnit so I deleted this library from my project, but in practice I removed .jar from my folder and that was the reason why alt+enter didn't work. After the .jar is restored everything is as normal. Thank you CrazyCoder and liro Alhonen

Community
  • 1
  • 1
Borneo777
  • 139
  • 2
  • 13
0

You don't have the libraries stated that you are using. You can do this manually if it does not fill them automatically. It should if you select from the list and hit enter.

Iiro Alhonen
  • 352
  • 3
  • 19
  • So check the imports. – Iiro Alhonen May 18 '17 at 13:51
  • I'm not sure if i understand - my libraries look like this: https://drive.google.com/drive/folders/0Byqxp8EUop0_YUVCOC1HN2FmODA – Borneo777 May 18 '17 at 14:16
  • List is a part of java.util-library and you need to import it as you did in the video. If you don't have the "import java.util.list;" in your code, the IDE does not know what to do with the command "list". Glad you got everything fixed, but this is what I meant. – Iiro Alhonen May 22 '17 at 06:09
0

In my case i just try to use left alt:

alt enter php storm intellij problem not working

LEFT Alt + Enter

LEFT Alt+Enter

Looks like some languages override Right Alt behavior, at least in case of Lithuanian Left Alt is working fine with Lithuanian enabled, Right does not, when switch to English, everything is fine again. Was pulling hair to figure out why out of nowhere it stops working, thanks

saber tabatabaee yazdi
  • 4,404
  • 3
  • 42
  • 58
0

I hava same problem that can not auto import package by ALT+ENTER in MacOS. solved by next step:

  1. Preferences --> Editor --> Intentions
  2. search Refactorings
  3. enable introduce local variable
zhi man
  • 1
  • 2