Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Groovy Eclipse Plugin Organize Imports

I've been using the newest version of the groovy eclipse plugin (for eclipse 3.4) and I noticed that when I run organize imports on the file, it actually removes some of the imports that I need. It seems to remove the ones in my project, not java.* imports. Any ideas why?

thanks, Jeff

like image 294
Jeff Storey Avatar asked Oct 15 '22 13:10

Jeff Storey


1 Answers

This functionality has been fixed in the 3.5 stream of the Groovy Eclipse plugin. Or at least it is fixed when running organize imports from the editor. So, running Ctrl-Shift-O inside the editor, or running format after save will work. However, running Organize imports from the package explorer or any other view will not.

The reason for this is that we need a way to hook in special groovy functionality. When running organize imports from inside the editor, this is possible to do. Hwoever, we have not figured out a general way to co-opt JDT's organize imports when running outside the editor. It is worth raising a bug for this. http://jira.codehaus.org/greclipse

Before the release of 2.0.0M1 (before the end of September), we will port this functionality back to 3.4, but we are finding that not many people are using 3.4, so we have not kept it up to date with the 3.5 stream.

like image 51
Andrew Eisenberg Avatar answered Nov 15 '22 14:11

Andrew Eisenberg