webmak10
webmak10

Reputation: 519

C++ formatting in netbeans for multi-conditional if statements

I want to create a format for my code. But netbeans is not allowing to do it. I've changed the settings in Tools->Options->Editor->Formatting, but I'm not getting expected result.

I'm getting this when I click formatting:

enter image description here

This is what I'm expecting the result to be:

enter image description here

Pay attention to the position of ")". If its needed to make changes in pluging source code I can do it, but I don't know where to look for this.

Upvotes: 9

Views: 376

Answers (2)

Parth Bhoiwala
Parth Bhoiwala

Reputation: 1322

Use Alt + Shift + F to format your code in Netbeans.

This command will format the entire file, however, if you just want to format a specific block of code, then select those lines and then use this command.

Upvotes: 1

Yogesh Rathi
Yogesh Rathi

Reputation: 6509

Download below plugin and use formatter

http://plugins.netbeans.org/plugin/38688/jindent-source-code-formatter-for-java-c-c

Upvotes: 1

Related Questions