Jump to: navigation, search

Difference between revisions of "DSDP/MTJ/Developer Resources/Coding Standards"

(Intial version)
 
(No difference)

Revision as of 15:15, 22 September 2008

In order to unify the code conventions used in MTJ, there are two template files that must be used in the Clean Up andFormat actions within Eclipse

Clean Up Template

Formatter Template

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 you make sure your code is correctly formated and cleaned up before cheking in you code. However to make committers life easier, you should clean up and format you code before submitting a patch.


Clean Up

Configuration:

  1. Go to eclipse preferences (menu Window > Preferences);
  2. Go to the Clean Up page(Java > Code Style > Clean Up);
  3. Import the MTJ Clean Up Template

Usage:

  1. Open the java file to be cleaned up;
  2. Select Source > Clean Up... and follow the wizard steps. Make sure you use the MTJ profile.


Formatter

Configuration:

  1. Go to eclipse preferences (menu Window > Preferences);
  2. Go to the Formatter page(Java > Code Style > Formatter);
  3. Import the MTJ Formatter Template
  4. Make sure 'Java Conventions - MTJ' is the active profile

Usage:

  1. Open the java file to be cleaned up;
  2. Select Source > Format or press Ctrl + Shift + F.