Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 357040 - Invalid closing brace position with "for" loop
Summary: Invalid closing brace position with "for" loop
Status: CLOSED DUPLICATE of bug 351399
Alias: None
Product: CDT
Classification: Tools
Component: cdt-editor (show other bugs)
Version: 8.0   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Anton Leherbauer CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-08 03:15 EDT by Laurent Mazuel CLA
Modified: 2011-09-08 03:21 EDT (History)
1 user (show)

See Also:


Attachments
Profile to reproduce the bug (17.08 KB, text/xml)
2011-09-08 03:15 EDT, Laurent Mazuel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent Mazuel CLA 2011-09-08 03:15:09 EDT
Build Identifier: I20110613-1736

If using the profile in attachment, the closing brace for all "for" loops is not at his attending place. Moreover, this problem will shift to the left all the remaining code, since with 3 or 4 "for" loop, all the code is attached to the left of the screen with no indentation.

For instance, in the Code Style editor itself, in the "White space" tab, we have:
for(int i = 0, j = argc; i < argc; i++, j--)
  {
}

The objective of this profile (which works on other statements) is to format code like:
for(int i = 0, j = argc; i < argc; i++, j--)
  {
     int k=0;
     // My code with 4 spaces
  }


Reproducible: Always

Steps to Reproduce:
1.Install given profile
2.Use a "for" expression at least one time
3.Format using classical command (Ctrl+Alt+Shift+F)
Comment 1 Laurent Mazuel CLA 2011-09-08 03:15:51 EDT
Created attachment 202966 [details]
Profile to reproduce the bug
Comment 2 Anton Leherbauer CLA 2011-09-08 03:21:41 EDT

*** This bug has been marked as a duplicate of bug 351399 ***