When working with IntelliJ on a JavaProject it shows to use alt + enter to import a class for example, but this isnt working anymore.
It worked in the past, but something must have changed,
-the shortcut is still set,
-other shortcut would work
- i cant assign alt+enter manually, although if i reset it to default it gets set to it,
any ideas how to fix my problem?
btw my keyboard layout is german, but i dont think it is the problem because it worked in the past, my os is win 7.
edited: when i am working within the IDE and i e.g. write Arrays.toString(a);
and didn't import "java.util.Arrays" yet, the IDE says:
" ? java.util.Arrays? Alt+Eingabe" (Eingabe = Enter in German)
so when i assign a different shortcut it works, but with Alt+Enter it doesnt
thanks in advance for any help.
If there's an error in the code, pressing ⌥⏎ (macOS), or Alt+Enter (Windows/Linux), can suggest options that will make the code compile. If there's a warning, IntelliJ IDEA will show you what the warning is, and may offer one or more suggestions on how to fix that warning.
The most powerful tool in IntelliJ IDEA that operates by means of Alt+Enter is code inspections. Pressing this shortcut on a highlighted code element in the editor opens a list of possible fixes from which you can select the one that works best.
There is an on/off toggle in the "Tools" drop down in the top menu bar to temporarily disable it.
There are shortcuts for this in IntelliJ IDEA! Simply hit Shift+Enter to start a new line below the current line or Ctrl+Alt+Enter (⌥⌘Enter on Mac) to start a new line above the current line.
"Well, it means IDE doesn't see the shortcut for some reason. Probably it's already used by some other application or the operating system. – CrazyCoder 25 mins ago "
i closed all applications and it turns out that, Facebook GameRoom, running in the background, somehow is the reason the shortcut doesn't work, i have no idea why, but thats the solution
many thanks to CrazyCoder
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With