Community
Participate
Working Groups
First, let me congratulate the team on a job well done! I am not sure if this is a bug or not, but... I have a class which extends DefaultTableCellEditor. When I do "Organize imports", it adds the following line <code> import javax.swing.DefaultCellEditor.EditorDelegate; </code> Should the internal class be part of the import? I am not sure, but if I keep the import statement intact, I get a compile error. I hope you can fix this in the next release. Thanks Vijay
Moving to JDT/Core.
there must be a reference to EditorDelegate. Is a inner class of yours named like that? I would be glad if you can send me a code snippet so I can see whats the problem. A know bug is that if a field or local has a name of a class, a unnecessary import is added.
can you provide me with an example?
Created attachment 220 [details] Example that you asked for
Thanks a lot. I investigated the matter. In 20109, when I try this, organize import prompts to specify if 'EditorDelegate' is vijay.TextCellEditor.EditorDelegate or javax.swing.DefaultCellEditor.EditorDelegate It seems you chose the second. So, 'Organize imports' behaves correctly here. In your code the propting makes sense, as you could import the swing class and at the same time have a inner class with the same name. However, there are known problems with 'organize imports' ad unnessary prompting for inner classes. There are plans to improve this with the release of the new AST API.
Closing