Community
Participate
Working Groups
Build Identifier: M20110909-1335 Executing the "Organize Imports" feature with a project selected in the Package Explorer will not recognize a type-qualified interface reference when the enclosing type of that interface is not itself an interface. The same is true for classes, enums and annotations--when the enclosing type differs in this way, the "Organize Imports" feature will not find the nested types when executed at the project level. Opening each file and executing "Organize Imports" does work (but is extremely tedious with hundreds of sources!) Reproducible: Always Steps to Reproduce: 1. Declare an annotation A inside a class C. 2. Annotate a type in an third, separate class using the type-qualified name "C.A" 3. Change the name of the annotation A, or move class C to a different package without updating references (indeed, sometimes it cannot be done). 4. Select the project containing all mentioned sources and execute "Organize Imports". The import for the annotation A will simply be removed. It should be replaced with an updated import statement.
Java tooling bugs go to JDT.
I cannot reproduce this, can you please provide code snippets with which you see this problem?
Please feel free to reopen with exact steps and code snippets.