Bug 36832 - wrong indent on Code Format of anonymous class
Summary: wrong indent on Code Format of anonymous class
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows NT
: P3 normal (vote)
Target Milestone: 3.0 M4   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-24 03:06 EDT by Eric Seynaeve CLA
Modified: 2003-10-14 07:21 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.