Community
Participate
Working Groups
Created attachment 177784 [details] Code Style Formatter Settings based on BSD-Allman Hi folks, I have here a little annoying thing about indentation. I have CodeStyle set to BSD-Allman typedef struct { blah }; typedef struct { blah }; That also happens for things like typedef enum { XYZ_ENUM_VALUE1, }; typedef enum <-- Write typedef enum and hit <ENTER> { <-- Indented automatically, then just wrote '{' and hit <ENTER> ENUM_VALUE1 <-- Indented }; enum { XYZ_ENUM_VALUE10 = 0x00, XYZ_ENUM_VALUE11 <-- Indented if there is the = 0x00, in the line before }; Could someone enlighten me, if this is a problem with the attached settings, or are these actually bugs in the indenter? Regards, Henning
Created attachment 177817 [details] Fix and tests This patch fixes the typedef issue (a regression) and the enum problem which exists also in 6.0.2.
Sergey, could you review my changes before I commit?
LGTM
Thank you! Committed to HEAD and cdt_7_0.
*** cdt cvs genie on behalf of aleherbau *** Bug 324031 - Indentation problems with typedef and enum [*] CIndenterTest.java 1.18.2.1 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CIndenterTest.java?root=Tools_Project&r1=1.18&r2=1.18.2.1 [*] CIndenter.java 1.35.2.1 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CIndenter.java?root=Tools_Project&r1=1.35&r2=1.35.2.1 [*] CIndenter.java 1.36 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CIndenter.java?root=Tools_Project&r1=1.35&r2=1.36 [*] CIndenterTest.java 1.19 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CIndenterTest.java?root=Tools_Project&r1=1.18&r2=1.19