Community
Participate
Working Groups
HEAD (follow-up to bug 209661) IAnnotation#getSourceRange() and #getNameRange() throw a JavaModelException on the annotation of an ILocalVariable: JavaModelException: @SuppressWarnings [in arg [in m(int) [in Try [in [Working copy] Try.java [in xy [in src [in zz1.5]]]]]]] does not exist Steps: - have: package xy; @SuppressWarnings("unused") // OK class Try { void m(@SuppressWarnings("unused") int arg) { // throws JME @SuppressWarnings("unused") int local; // throws JME } } - show one of the ILocalVariables in the JavaElements View (see bug 209661 for steps) - expand ANNOTATIONS (1) - select the annotation - open the Properties view (e.g. via context menu) It could be that the get*Range() methods work when invoked for the first time but fail on subsequent invocations (at least that's what I saw in the debugger).
Created attachment 83047 [details] Proposed fix and regression test
Fix and tests released for 3.4M4
Verified for 3.4 M4 using build I20071211-0010 (watching the tests fail in JME with I20071101-2000 and succeed with I20071211-0010).