Bug 30113

Summary: Wrong positions in the outliner for a field that follows an initializer
Product: [Eclipse Project] JDT Reporter: Olivier Thomann <Olivier_Thomann>
Component: CoreAssignee: David Audel <david_audel>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.1   
Target Milestone: 2.1 M5   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

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.