Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
DSDP/MTJ/Developer Resources/Coding Standards
< DSDP | MTJ | Developer Resources
In order to unify the code conventions used in MTJ, there are two template files that must be used in the Clean Up and Format actions within Eclipse
- If you are a MTJ committer make sure you clean up and format every java file before checking in to SVN.
- If you are contributing to MTJ, a committer will make sure your code is correctly formated and cleaned up before cheking it in. However to make committers life easier, you should clean up and format you code before submitting a patch.
Clean Up
Configuration:
- Go to eclipse preferences (menu Window > Preferences);
- Go to the Clean Up page(Java > Code Style > Clean Up);
- Import the MTJ Clean Up Template
Usage:
- Open the java file to be cleaned up;
- Select Source > Clean Up... and follow the wizard steps. Make sure you use the MTJ profile.
Formatter
Configuration:
- Go to eclipse preferences (menu Window > Preferences);
- Go to the Formatter page(Java > Code Style > Formatter);
- Import the MTJ Formatter Template
- Make sure 'Java Conventions - MTJ' is the active profile
Usage:
- Open the java file to be cleaned up;
- Select Source > Format or press Ctrl + Shift + F.