Community
Participate
Working Groups
Consider the following code: class X { public void foo() { } } Passing the text range of "foo" to code resolve doesn't report any results. Selecting X works as expected. NOTES: DB (9/7/00 5:53:22 PM) Code resolve doesn't work for field declarations too. Test code: package test; public class FieldTest { public Object fObject; public void f() { fObject= null; } } Passing the text range of fObject to code resolve doesn't report any results. PM (9/8/00 8:59:48 AM) I do not clearly see the benefit of using it there ? You are already inside the code you want to open onto... DB (11.09.2000 14:14:17) Currently we are using code resolve to "convert" a text selection into a Java Element. Since code resolve can be used for references and for type declarations it would be good if it would work for field and method declarations too. This would avoid code like this: IJavaElement[] elements= resolve.codeResolve(ts.getStartPosition(), ts.getEndPosition(), null); if (elements.length == 0) { // try a declaration IJavaElement element= cu.getElementAt(start); ISourceRange range= element.getNameRange(); check if range in text selection. } PM (11/6/00 12:13:59 PM) Defer post Nov.15
Duplicate of 1G2NZVT
*** Bug 3223 has been marked as a duplicate of this bug. ***