Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.1.0Release
-
Fix Version/s: 2.1.1Release
-
Component/s: Editor
-
Labels:None
-
Number of attachments :
Description
In this script:
Entry y
Do Organize imports and choose an arbitrary import of an inner class. The import is added properly. Then do organize imports again and the import is removed.
This is a regression from the recent changes I made to OrganizeGroovyImports.
Fix committed. The problem was related to an earlier change that I had made that will do a proper organize of imports including sorting and grouping. The problem was related to semi-colons being added by the ImportRewrite and then removed again through Groovy-Eclipse code.
In the end, I decided to copy 3 JDT classes into groovy eclipse code: ImportRewrite, ImportRewriteAnalyzer, and CodeStyleConfiguration. These classes are now stored in the jdt_src_patched source folder.
Now, semi-colons are never added and so, they do not need to be removed. Also, there is no extra whitespace added to the end of imports.
I also raised:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=332155
to figure out if/how something can be back-ported into JDT.