Here you will find instructions for how to set up the Google C++ code style in Netbeans.
1) Open the Options dialog in Netbeans:
2) Select the Editor->On Save category and change the Trailing Whitespace From: setting to Modified Lines Only:
3) Select the Editor->Formatting category, change Language: to C, and change the Style: setting to Linux:
4) On the same page, change Language: to C++, and click the Manage button:
5) In the new window named "Manage Styles" that popped up, select NetBeans and click Duplicate:
6) In the new window named "Style Name" that popped up, write "OpenSAF" in the Name: field, and then press the OK button:
7) In "Options" window, change the Style: setting to OpenSAF:
8) Check the Override Global Options check box:
9) Change Indent Size to 2, Statement Continuation to 4, and Constructor Continuation to 4:
10) Change Indent Namespaces to false, Absolute Label Indentation to false, and Indent Visibility to Half Indent:
11) Change Ignore Empty Functions to true:
12) Change all Multiline Alignment check boxes to true:
13) Change Language: to C/C++ Header, and repeat steps 4) to 12):
14) Click the OK button in the "Options" window: