Bug 158267 - Brace positions line after annotation
Summary: Brace positions line after annotation
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.3 M3   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-22 04:18 EDT by Oliver Grass CLA
Modified: 2006-10-30 04:16 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Grass CLA 2006-09-22 04:18:18 EDT
When changing the default code formatter, Eclipse doesn't behave as expected.

When using the eclipse built-in formatting profile, classes or methods with an annotation are formatted as follows:

@Annot(x = 23, y = -3)
public class A {
}

Changing settings for the brace positions (classes or method declarations) to "Next line on wrap" results in the following formatting:

@Annot(x = 23, y = -3)
public class A
{
}

This behaviour is wrong, since there is absolutely no need to position in the next line.
Comment 1 Oliver Grass CLA 2006-09-22 04:37:09 EDT
The description of the error is not entirely correct:

Changing settings for the brace positions (classes) to
"Next line on wrap" results in the following formatting:

@Annot(x = 23, y = -3)
public class A
{
}

Changing settings for the brace positions (methods declaration) to
"Next line on wrap" results in the following formatting:
@Override
public void doSomething()
{
  // do Something
}
Comment 2 Olivier Thomann CLA 2006-10-03 18:37:01 EDT
Released for 3.3M3.
Regression tests added in org.eclipse.jdt.core.tests.formatter.FormatterRegressionTests#test627/628/629
Comment 3 David Audel CLA 2006-10-30 04:16:24 EST
Verified for 3.3 M3 using build I20061030-0010