Reputation: 57192
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
Upvotes: 5
Views: 1957
Reputation: 28737
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.
Upvotes: 3
Reputation: 1323363
That may be related to the underlying JDT "organize import" mechanism, which does have some issue in eclipse3.4:
Can you make the Groovy plugin work in eclipse3.5, and if yes, do you still have the same issue?
If you do, one of those bugs need to be completed/reactivated.
Upvotes: 1