Auto formatting - Eclipse C++

c++, eclipse, eclipse-cdt

Solution

The name of that style is Whitesmiths - Try to change it to Allman.

In C/C++ perspective mode, Goto Window > Preferences > C/C++ > Code Style

Choose BSD/Allman or whatever you want.

Problem

Hi all I'm trying to stop the auto formatting in eclipse from indenting my opening and close brace after a function that has a throw() statement on the end. e.g ``` void function(std::string param) throw() { } ``` after auto format will look like this: ``` void function(std::string param) throw() { } ``` But it will carry on adding another tab to the front of the brackets every time I autoformat my code. Anyone know how I can turn this feature off, or is it a bug Eclipse info: Version: Juno Release Build id: 20120614-1722 using CDT Note: I am using my own code style profile.

Original source