...
Code Block |
---|
{license header} package {package name} {imports} /** * @author {your name here} * * { short description of class } */ public class {className} { // constants private static final ... // end of constants // variables private ... private final ... // end of variables // constructors public {className} {} // end of constructors // getters and setters public void set... public int get... // end of getters and setters // private methods private void ... // end of private methods // public methods public void ... // end of public methods // static methods private static void ... {} public static void ... {} // end of static methods // private classes private class internalClass {} // end of private classes } |
Configure eclipse workspace settings
- Menu ⇒ File ⇒ Import ⇒ General ⇒ Preferences
- Select file and check the “Import all” checkbox
- Click finish and restart
Features:
- imports will automatically be organized on save
- trailing spaces and empty lines will be cleared on save
- CTRL+SHIFT+F for autoformat to ONAP codestyle (4 space indention, ...)
- only javadoc comments will be formatted (not the lic header)
TODO:
- include a correct and only available (in gerrit) checkstyle formatter compliant with license header
View file | ||||
---|---|---|---|---|
|