History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-6430
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Olesya Smirnova
Reporter: Brendon McLean
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

CLONE -Braces are incorrectly reformatted to newline

Created: 10 Mar 06 15:28   Updated: 17 Feb 08 15:18
Component/s: Code Formatting and Code Style
Fix Version/s: Demetra 5557

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
File Attachments: 1. Zip Archive BracePlacementWrongForAllIdea5.zip (8 kb)
2. Zip Archive IntelliJIDEA50.zip (34 kb)

Image Attachments:

1. After.jpg
(134 kb)

2. Before.jpg
(134 kb)
Environment: Mac OS 10.4.5 - 1.5.0_06

Build: 4,148
Fixed in build: 5,553
Severity: Medium


 Description  « Hide
Reformatting of 'if' and 'for' clauses causes the opening brace to moved to the next line regardless of settings. For example:

if (long condition) {
// blah
}

Will be reformatted to:

if (long condition)
{
// blah
}

This doesn't happen in IDEA 4.5 but has consitently happened on all IDEA 5 builds. Note that brace placement is set to "End of line" for Class, method and other.



 All   Comments   Work Log   Change History      Sort Order:
Brendon McLean - 10 Mar 06 15:35
NOTE: I've cloned this issues because it has never been fixed. Issue IDEA-6699 shows that I am not the only one suffering from this (all the people at my work suffer from this).

I have also attached a seperate standalone project which shows the problem. Reformatting the codebase should result in the code remaining unchanged, but the opening brace '{' will be moved to the next line. There is no way to stop this behaviour. Per project code style is off. Global code style is set to 'Default'.

Also attached are all my preferences, but they shouldn't affect this anyway given that I'm using defaults all around.


Brendon McLean - 10 Mar 06 15:37
Project that clearly demonstrates the bug.

Brendon McLean - 10 Mar 06 15:41
Before reformatting

Brendon McLean - 10 Mar 06 15:42
After reformatting

Brendon McLean - 17 Feb 08 15:18
re-opened in IDEA-17186