Bug 317039

Summary: [formatter] Code Formatter fails on inner class source indentation
Product: [Eclipse Project] JDT Reporter: Hüseyin Kartal <hk>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: P3 CC: daniel_megert, markus.kell.r, Olivier_Thomann, satyam.kandula
Version: 3.5   
Target Milestone: 3.7 M5   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Java Code Formatter Settings
none
Additional test
none
Additional test none

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