One Feature I miss from Eclipse are Save Actions for autoformatting. Any way to have the same in Netbeans?
2 Answers
Starting with NB 7.3, go to Tools -> Options -> Editor -> On Save
You can select reformat and remove trailing spaces for any language.
You will need to specify the reformat option to "all lines" if you want it to format all of your code
4 Comments
OSdave
unfortunately this only removes trailing spaces, it does not apply the code format you'd have defined for the project
AbdelHady
Waaaw, it really worked for me too, I didn't know that 7.3 made this important feature, we called for this for yeaaaars!
jmmygoggle
@OSdave may have encountered the issue of separate global and project settings. Changes to global options will not affect a project unless the project is configured to use global options. To check a projects formatting (and toggle global/project specific options): Highlight the project in the Projects dialog and Choose: File > Project Properties (or Right click the project and choose Properties) and in the Categories section of the launched dialog, Choose Formatting.
TrackerSB
This option is still at the same place (current NetBeans version: 11.2).