Intellij 2018.2 Ultimate Code->Generate Missing
Answered
I'm trying to generate getters & setters for private member variable in a class.
In prior version of Intellij,I could right click in the editor & select "Generate". This option is no longer available when I right-click in editor.
Documentation states that under the "Code" menu there is an option "Generate". It's not there.
I checked under File->Settings->Appearance & Behavior->Menus & Toolbars->Main Menu->Code and "Generate" is listed after "Delegate Methods" and "Surround With" but not showing when I click on the "Code" menu.
Anyone else have this?
Please sign in to leave a comment.
Please attach screenshot showing the problem in a full IDE window.
1. "Code" menu expanded with "Generate" greyed-out (no editor open) https://imgur.com/Bng8ndS
2. "Code" menu expanded with an editor open (No "Generate" menu item) https://imgur.com/7GHJLEi
3. Right-click in editor and no "Generate" menu options https://imgur.com/G7CdHFx
Thanks. For the Generate actions to become available (e,g, your 1st screenshot) the focus must be inside source code (the class). Does it help for this case to open the file and put cursor in it?
Do you see this issue in any project? Does it help to reset Settings | Appearance & Behavior | Menus and Toolbars configuration to defaults?
Please provide idea.log after IDE restart if issue remains.
The first screen shot was to demonstrate that the "Generate" option was greyed-out (as expected as no focus in editor) while the second shot was to show that the "Generate" option was not displayed when an editor was open. Note the difference.
I had already reset the Setting -> Appearance & Behavior | Menu & Toolbars with no change in the visibility of the "Generate" menu option.
I have created a new project; "Generate" does not appear when it should.
idea.log after restart https://pastebin.com/6nm6fDxJ
Please try to reinstall from https://www.jetbrains.com/idea/download to an empty separate directory.
That worked. Thank you.
Same problem with IntelliJ IDEA Ultimate 2018.2.3.
After uninstall / install, same problem.
After uninstall / remove settings files & Co / install, it's OK.
Thank
I believe something in the .idea folder is broken. I have the same issue, but if I create a new project the generate options are working as expected.
I also tried "Invalidate caches" without success.
EDIT: Deleting the .idea folder didn't help, but it seems to be project specific somehow.
I am also having the same issues. Context menu doesn't show "generate" at all. The only option I have right now is to right click "refactor" then use "encapsulate fields" to generate my setters and getters. I have tried numerous things. Even reinstalling did not help when I reloaded the same project I was working on prior to re-installation.
OP here - I think that you need to create a new project after re-installation to a clean directory
I've also experienced this issue with 2018.2.4. Enabling the GROOVY plugin (Settings > Plugins) and restarting the editor seems to fix the issue.
I was experiencing this problem on 2018.2.4. Enabling the Groovy plugin (as suggested by JetBrainsFan) fixed it for me.
JetBrainsFan and Michael S Young, thank you so much for your comments, it solved this problem for me too and it had been driving me crazy for days now! Thank you!
JetBrainsFan and Michael S Young, thank you! Your advices has solved my problem.
@JetBrainsFan solution worked for me too.
This is brain fuck.
I disabled the groovy plugin for a reason, why does it remove generate. This must be a bug.
I disabled the groovy plugin because it slows down my IDE.
Please follow the related issue on YouTrack: https://youtrack.jetbrains.com/issue/IDEA-198173
By JetBrains and Michael's answers the problem was fixed but additionally I've activated Cucumber for Groovy too.
I can confirm this is still a problem on 2018.3.5 Ultimate.
Re-enabling the Groovy plugin is the work-around.
Weird workaround to enable a plugin we don't need to show a menu functionality. Thanks anyway. It fixed my confusion.
Groovy plugin still solves the problem 2019.1.3
Enabling the groovy plugin worked for me.