Bug 272612

Summary: [formatter] Two tabs indented in Window -> Preferences -> Java -> Code Style -> Formatter -> Edit... -> New Lines -> Insert new line after opening brace of array initializer
Product: [Eclipse Project] JDT Reporter: Karsten Wutzke <kwutzke>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: VERIFIED INVALID QA Contact:
Severity: minor    
Priority: P3 CC: Olivier_Thomann
Version: 3.4.2   
Target Milestone: 3.5 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Karsten Wutzke CLA 2009-04-16 22:19:07 EDT
Build ID: M20090211-1700

Steps To Reproduce:
Everything focusses on the preferences under "Window" -> "Preferences":

1. Hit "Java" -> "Code Style" -> "Formatter"
2. Click "Edit..."
3. Hit tab "New Lines"
4. In the button group "Array initializers" there are two checkboxes, the upper says "Insert new line after opening brace of array initializer". When checking that, the new line is entered correctly, however the indentation thereafter is set to *two* tabs instead of one.


More information:
I looked if I have another option set in all the formatting, but I couldn't find any that change the above. To me it looks like a (minor) bug.
Comment 1 Frederic Fusier CLA 2009-04-17 03:44:17 EDT
Olivier, isn't it the expected behavior?
Comment 2 Olivier Thomann CLA 2009-04-17 09:14:56 EDT
What value do you have in:
Window -> Preferences -> Java -> Code Style -> Formatter -> Edit... -> Line Wrapping -> General settings => Default indentation for array initializers ?

By default this is 2.
Comment 3 Karsten Wutzke CLA 2009-04-18 16:18:01 EDT
OK it works. I missed this setting. It's not a bug then. Thanks!
Comment 4 Karsten Wutzke CLA 2009-04-18 16:18:38 EDT
Bug closed.
Comment 5 Olivier Thomann CLA 2009-04-19 17:52:16 EDT
Reopening to close as INVALID. FIXED means that some code was changed to fix an problem.
Comment 6 Olivier Thomann CLA 2009-04-19 17:52:34 EDT
Closing as INVALID.
Comment 7 Olivier Thomann CLA 2009-04-28 08:49:34 EDT
Verified for 3.5M7.