Bug 36832

Summary: wrong indent on Code Format of anonymous class
Product: [Eclipse Project] JDT Reporter: Eric Seynaeve <eseynaeve>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: eclipse
Version: 2.1   
Target Milestone: 3.0 M4   
Hardware: PC   
OS: Windows NT   
Whiteboard:

Description Eric Seynaeve CLA 2003-04-24 03:06:41 EDT
I have following anonymous class (using an indent of 2):
public class ... {
  public static void main(...) {
    ActionListener al = new ActionListener() {
      public void actionPerformed(ActionEvent arg0) {
        // do something
      }
    };
  }
}

After applying Code Format (Ctrl-Shift-F), the closing bracket of the
actionPerfomed method is replaced as follows:
public class ... {
  public static void main(...) {
    ActionListener al = new ActionListener() {
      public void actionPerformed(ActionEvent arg0) {
        // do something
  }
    };
  }
}

Using Eclipse Version: 2.1.0
Build id: 200303272130
Comment 1 Adam Kiezun CLA 2003-04-24 03:32:36 EDT
formatter is jdt core
Comment 2 Olivier Thomann CLA 2003-04-28 09:27:25 EDT
This will be fixed with the new formatter.
Comment 3 Olivier Thomann CLA 2003-10-03 10:25:06 EDT
This is addressed in the new formatter.
Fixed and released in HEAD.
Regression test added.
Comment 4 David Audel CLA 2003-10-14 07:21:31 EDT
Verified.