Bug 6979

Summary: Code formatter adds an (unnecessary) indent before opening braces
Product: [Eclipse Project] JDT Reporter: Xavi Miró <xmirog>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: CLOSED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: paulacox
Version: 1.0   
Target Milestone: 2.0 M1   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Xavi Miró CLA 2001-12-16 11:59:34 EST
When trying to use a GNU-style or (Pascal-style) with the formatter, the opening braces have an additional 
indent that avoids the alignment of braces. Instead of getting something like this:

if (condition)
{
  
something();
  something();
}

what you get is:
if (condition)
  {            <---- additional indent : no alignment 
of braces
  something();
  something();
}

I don't know whether this style (ala Pascal but without 
alignment) exists, but at least I would like to be able to choose in the preferences whether to use the 
additional indent or not.
Comment 1 Olivier Thomann CLA 2001-12-18 11:09:17 EST
Could you please specify which build you are using? Without that information, it 
is difficult to reproduce.
Comment 2 Olivier Thomann CLA 2001-12-18 11:33:55 EST
I suspect this problem to be seen in a 1.0 build. In 2.0 this problem is fixed. 
Wait for the build number and the formatter options to close it.
Comment 3 Xavi Miró CLA 2001-12-19 00:27:28 EST
More information: I have the R1.0 version and build 0.137; the formatter
options in the 
"Newline" tab are all checked.
Comment 4 Olivier Thomann CLA 2001-12-19 12:06:35 EST
This bug is fixed in the 2.0 builds. This is a duplicate of 1GIRC23 which is 
referenced in the build notes of jdtcore.
Move to close.
Comment 5 Olivier Thomann CLA 2001-12-19 12:06:43 EST
Closed.