Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 357040

Summary: Invalid closing brace position with "for" loop
Product: [Tools] CDT Reporter: Laurent Mazuel <laurent.mazuel>
Component: cdt-editorAssignee: Project Inbox <cdt-editor-inbox>
Status: CLOSED DUPLICATE QA Contact: Anton Leherbauer <aleherb+eclipse>
Severity: major    
Priority: P3 CC: cdtdoug
Version: 8.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Profile to reproduce the bug none

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 ***