In Eclipse, you can configure different things to happen every time a file is saved, such as formatting the code, fixing imports, cleaning up white space, etc. This I have not been able to do in NetBeans.
This was based on: http://netbeans.dzone.com/news/vaadin-maven-and-netbeans?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+zones%2Fnetbeans+%28NetBeans+Zone%29
NetBeans 7.3 introduces SaveActions. #140719
For example NB7.4 provides the following save actions for the java editor
* Remove trailing whitespace
* Remove unused imports
* Organised imports
I propose to open separate issues if you like to see more.
*** This bug has been marked as a duplicate of bug 140719 ***