Bug 30113 - Wrong positions in the outliner for a field that follows an initializer
Summary: Wrong positions in the outliner for a field that follows an initializer
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 M5   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-23 12:54 EST by Olivier Thomann CLA
Modified: 2003-02-11 07:48 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2003-01-23 12:54:26 EST
Using 0122, you can see that the declaration source start if the field i is not
right. It starts at the beginning of the comment that preceeds the initialzer.

Test case:
class A {
  public static int j = 0;
  /* static */ {
      
  }

  public static int i = 9;

}

The declaration source start of 'i' should be the 'p' of its public modifiers.

The bug is located in Parser.consumeDiet which doesn't reset the modifiers
variables. modifierSourceStart needs to be reset when exiting consumeDiet().
Comment 1 Philipe Mulet CLA 2003-01-23 12:57:34 EST
Fix is in (from Olivier), but we need a testcase for it. 
Comment 2 David Audel CLA 2003-01-27 04:26:06 EST
test was added (SourceElementParserTest#test76)

Fixed.
Comment 3 David Audel CLA 2003-02-11 07:48:19 EST
Verified.