Bug 6979 - Code formatter adds an (unnecessary) indent before opening braces
Summary: Code formatter adds an (unnecessary) indent before opening braces
Status: CLOSED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.0 M1   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-12-16 11:59 EST by Xavi Miró CLA
Modified: 2003-03-17 11:49 EST (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 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.