Article | Auto-Format in NetBeans

Hey,

Today, I started off working with JSF Framework, executed a series of well-described, neat tutorials which helped me go through the initial phase easily. Now, I am confident in doing what these tutorials explained.

Anyways, I came across a shortcut key, its Alt+Shift+F, used for Formatting the code present in the editor. Today, I used this key combo, in JSP using JSF Framework and Java Classes, as well.

Remember, how shortcut key’s are registered? This means this action is registered in the XML Layer of some module, as O-S-F.shadow! Anyways, that’s a different issue. Well, seriously I feel why the hell I came across this key, so late…It could have helped me save a lot of time, in many Java Projects I made using NetBeans!

eNjoy Technology…

Advertisements

13 thoughts on “Article | Auto-Format in NetBeans

  1. Do you know how you can change the bracketing style of the Format functionality.

    Netbeans does

    void aFunction(String input){
    //do something;
    }

    But I would like:

    void aFunction(String input)
    {
    //do something;
    }

  2. 2Lenni:

    To change the bracketing style of the Format functionality, go to:
    Tools->Options->Editor->Formatting
    Then select language=PHP, category=braces

    and select “braces placement”=’new line’

    That’s all!
    Enjoy!

  3. Is there any way to auto format all files in a project rather opening each individual file and hitting the key combo?#

  4. Hi nbgurus šŸ˜€

    Is there anyway to Format multiple files, such as right click to folder then apply Format for entire folder ?
    I searched then found some plugin (FormatMany, Jalopy…) but they didn’t work on netbeans 7.x šŸ˜¦

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s