“Fix Groovy Imports” in NetBeans

I was very frustrated with the fact that the Groovy & Grails plugin for NetBeans does not have the “Fix Imports” functionality: the option in the menu is simply grayed out. I started looking into the issue (and the NetBeans code…) and it turned out that the feature is actually implemented, it is just incorrectly connected to the menu option.

In order to fix it you have to define a new shortcut which will call the”Fix Groovy Imports” function. Just navigate to Tools/Options/Keymap and then change the shortcut as shown below:

That’s all 🙂

2 thoughts on ““Fix Groovy Imports” in NetBeans

  1. Hi,
    I am trying to do the same, there is a fix imports functionality defined for groovy as specified but it doesnt set the shortcut to new keys after editing it, the field becomes blank again after setting it.

  2. Hello Priyank

    Have you pressed Enter after selecting the shortcut? I have noticed that when you click outside of the shortcut field it will indeed reset it, and pressing Enter will set it.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.