Bug 272612 - [formatter] Two tabs indented in Window -> Preferences -> Java -> Code Style -> Formatter -> Edit... -> New Lines -> Insert new line after opening brace of array initializer
Summary: [formatter] Two tabs indented in Window -> Preferences -> Java -> Code Style ...
Status: VERIFIED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4.2   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: 3.5 M7   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-16 22:19 EDT by Karsten Wutzke CLA
Modified: 2009-04-28 08:49 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 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.