Community
Participate
Working Groups
After a Move to top level refactoring you end up with unused import errors.
the culprit is SearchEngine::searchDeclarationsOfReferencedTypes small test case (where 5 types are found instead of just 1): package d; import java.awt.Canvas; import java.awt.Color; import java.awt.Graphics; import java.awt.Rectangle; import java.awt.SystemColor; class B { static class Inner { Color color; } Canvas canvas; Color color; Graphics graphics; Rectangle rectangle; SystemColor systemColor; }
What were you searching for exactly ?
sorry for the cryptic description SearchEngine.searchDeclarationsOfReferencedTypes with the class Inner as a parameter
DeclarationOfReferenceTypesPattern was not filtering out the import references that were not enclosed in the java element. Fixed and added regression test JavaSearchTests.testDeclarationOfReferencedTypes6().
Verified.