Community
Participate
Working Groups
Using HEAD. Unused method static import are not found by search engine. Use following test case: A.java: package s2; import static s2.pack.age.S.*; import static s2.pack.age.S.out; import static s2.pack.age.S.M.in; public class A {} S.java: package s2.pack.age; public class S { public final static String out() { return "out"; } public static class M { public final static String in() { return "in"; } } } And find references to out or in methods => no match will be found...
Fixed. Now search engine fine also unused static method import declarations. Problem was coming from indexing in fact. On import, only unknown reference to method selector was stored in index (ie. without method parameters number). So, while searching to method reference, number of parameters does not exist and indexer failed to return this result. To avoid this, SourceElementParser now accept both field, method and type reference on single static import declaration. Also make indexer and locator not filtering on parameter count when method is static (as for varargs...) [jdt-core-internal] I'll attach patch file to describe all changes done No new test case added, only modify existing ones testStaticImportMethod02 and testStaticImportMethod04 in JavaSearchTests
Created attachment 18384 [details] Patch for the implementation of this functionality
Verified in I20050330-0500