Community
Participate
Working Groups
As discussed at the JDT Summit 2005, we'd like to have a new flag on the search engine to enable more precise enclosing element resolution. This could be a new matchRule flag for SearchPattern#createPattern(element, limitTo, matchRule). When the flag is enabled, the enclosing element should also return ILocalVariables iff applicable (and probably ITypeParameters, too). E.g. here ... public class Try { <TP extends Try> void m(Try methodParam) { Try localVar; for (java.util.List<Try> localVar2;;) { } } } ... the references to Try should have as enclosing element: - the ITypeParameter TP - the ILocalVariable methodParam - the ILocalVariable localVar - the ILocalVariable localVar2
We will use this to enhance rename refactorings (bug 37219), such that when you e.g. rename type Try to Troy, a local variable _try can also be renamed to _troy.
*** This bug has been marked as a duplicate of 110336 ***