...
These instructions were created using Eclipse Neon. Note: Eclipse Che (Codenvy) does not seem to support checkstyle.
- Use the Eclipse Checkstyle plugin: https://checkstyle.org/eclipse-cs/#!/
- Note that you can drag the plugin into your Eclipse installation
- Right click your VIVO/Vitro project; select Properties → Checkstyle
- Go to "Checkstyle → Local check configurations" and click "New"
- Create a "Project Relative Configuration"
- Name: Vitro Internal
- Location: checkstyle.xml
- An "Unresolved Properties Error" box will appear; click "Edit Properties"
- Add a new property
- Name: checkstyle.suppressions.file
- Value: full path to checkstyle-suppressions.xml
- Click OK
- Add a new property
- Go to "Checkstyle → Main"
- Select "Vitro Internal" from the drop down
- Check "Checkstyle active for this project"
- Click OK
- Code will be rebuilt
- Edit a java file. Place a curly brace on a line by itself.
- The line of code should get highlighted in red.
...
2022-03.
- Apply Java Formatter configuration and imports order for workspace or project
- For workspace
- Go to Window → Preferences
- In new window select on the left Java → Code Style → Formatter.
- Click "Import..." select VIVO and Vitro formatter profile.xml
- Select Java → Code Style → Organize Imports.
- Click "Import..." select vivo-vitro.importorder
- For project
- Right click on the project, click on Properties.
- In new window select on the left Java Code Style → Formatter.
- Mark checkbox Enable project specific settings
- Click "Import..." select VIVO and Vitro formatter profile.xml
- Select Java → Code Style → Organize Imports.
- Mark checkbox Enable project specific settings
- Click "Import..." select vivo-vitro.importorder
- For workspace
NetBeans
These instructions worked for NetBeans 8.2.
...