Bug 74938

Summary: Syntax error for annotation in 1.4 has unknown source range
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: minor    
Priority: P3    
Version: 3.0   
Target Milestone: 3.1 M3   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Markus Keller CLA 2004-09-24 07:01:56 EDT
I200409231635, testing fix for bug 74519.

When I omit the 'public' modifier ...

@interface Ann {
	String annName();
}

... the reported source range is [-1, 15]. I would expect that the source range
is always just the @interface keyword, irrespective of modifiers.
Comment 1 Markus Keller CLA 2004-09-24 07:09:21 EDT
FYI: I filed bug 74939 for the missing error annotation when the problem of this
PR occurs.
Comment 2 Olivier Thomann CLA 2004-09-24 10:46:52 EDT
This will be done post M2. We tag the declaration. So the modifiers would be
included. The bug comes from the fact that the modifiersSourceStart is used for
the problem positions.
Comment 3 Olivier Thomann CLA 2004-09-24 10:47:31 EDT
The bug is similar for enum declarations without modifiers.
Comment 4 Olivier Thomann CLA 2004-09-24 11:01:05 EDT
I have a patch that underlines only the type name In your example, "Ann". This
would be good enough.
Comment 5 Markus Keller CLA 2004-09-24 11:09:17 EDT
Yeah, that's fine too. It's just the -1 that is unfortunate.
Comment 6 Olivier Thomann CLA 2004-09-24 11:15:25 EDT
This is a minor problem anyway. So it will be fixed for M3. The fix is ready,
but it is too late for M2.
Comment 7 Markus Keller CLA 2004-09-24 11:29:31 EDT
Sure it's minor and not urgent - see the Severity field ;-)
Comment 8 Olivier Thomann CLA 2004-09-27 11:02:09 EDT
Fixed and released in HEAD.
Regression tests updated.
Comment 9 David Audel CLA 2004-11-02 10:22:38 EST
Verified for 3.1M3 with build I20041101.