Bug 317039 - [formatter] Code Formatter fails on inner class source indentation
Summary: [formatter] Code Formatter fails on inner class source indentation
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: 3.7 M5   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-16 08:59 EDT by Hüseyin Kartal CLA
Modified: 2011-01-25 08:01 EST (History)
4 users (show)

See Also:


Attachments
Java Code Formatter Settings (28.28 KB, application/xml)
2010-06-16 09:01 EDT, Hüseyin Kartal CLA
no flags Details
Additional test (2.01 KB, patch)
2010-12-27 10:05 EST, Frederic Fusier CLA
no flags Details | Diff
Additional test (2.01 KB, patch)
2010-12-27 10:12 EST, Frederic Fusier CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hüseyin Kartal CLA 2010-06-16 08:59:57 EDT
on every code format attempt the indentation is increased !

example:

public class InnerClassIndent
  {
    
    public void innerThread()
      {

        new Thread(new Runnable()
          {
            @Override
            public void run()
              {
                // TODO Auto-generated method stub
                }
            }).start();
        }
    }
Comment 1 Hüseyin Kartal CLA 2010-06-16 09:01:21 EDT
Created attachment 172036 [details]
Java Code Formatter Settings
Comment 2 Markus Keller CLA 2010-06-16 09:17:50 EDT
Reproduced in HEAD.
Comment 3 Frederic Fusier CLA 2010-12-27 10:05:45 EST
Created attachment 185840 [details]
Additional test

As per bug 330313 comment 8, the fix for that bug also fixes this one, hence only add a test for this specific use case...
Comment 4 Frederic Fusier CLA 2010-12-27 10:07:18 EST
Fixed for 3.7M5 in HEAD stream.
Comment 5 Frederic Fusier CLA 2010-12-27 10:12:24 EST
Created attachment 185841 [details]
Additional test

Ooops, a small glitch in the previous patch... This one is correct.
Comment 6 Satyam Kandula CLA 2011-01-25 08:01:21 EST
Verified for 3.7M5 using build I20110124-1800