Bug 93392

Summary: [1.5][search] Reference to implicit annotation element "value" has wrong offset
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Markus Keller CLA 2005-05-02 06:17:08 EDT
v_553a

A reference to the implicit annotation element "value" has the wrong offset:

@I(12)
@interface I {
    int value();
}

The implicit reference to "value" has offset <here>@I(12).
Expected: @I(<here>12).

See also bug 83230.
Comment 1 Frederic Fusier CLA 2005-05-08 16:19:01 EDT
I set offset to 0 for implicit call but stupidly forgot to set appropriate offset.

See also bug 94062 as length=0 does not seem to make all users happy...
Comment 2 Frederic Fusier CLA 2005-05-09 09:27:49 EDT
Fixed and released in HEAD.

Now offset is well positionned at member value start: @I(<|>12).
Note that this fixed is coupled with bug 94062 fix.

[jdt-core-internal]
Changes done in MatchLocator.reportReference(ASTNode,...).

Test case added in JavaSearchBugsTests
Comment 3 Maxime Daniel CLA 2005-05-12 11:20:12 EDT
Verified for 3.1 M7 using build I20050509-2010 + jdt.core HEAD.