Style Guide

From RifidiWiki

Jump to: navigation, search

Look of the code

  • We follow the naming conventions
  • All submitted files have to be formated eclipse style (Hit the autoformat Shift-Ctrl-F in eclipse)
  • Run Check Style on the file (use 'Sun Checks (Eclipse)' as check configuration) and eliminate ALL documentation warnings
  • ALL beanproperties and methods MUST be documented.

Rules for the code

  • No System.out.println should go into SVN if it is not vital to the application. Use Log4J.
  • All calls to syncExec and asyncExec have to be discussed with the team and should only be used if there is absolutely no way avoiding them
  • Synchronizing UI and Model should occur via eclipse databinding and not through direct calls to the viewers


  • All classes and interfaces should have a description with the author's name and a high level description of what the class or interface does.
  • All methods should have method comments above them.
  • All files should have a header with the license that follows this template:
 *  ${file_name}
 *  Project: Rifidi - A developer tool for RFID
 *  Copyright: Pramari LLC and the Rifidi Project
 *  License: Lesser GNU Public License (LGPL)

To have this header generated for you automatically when you create a new file, click Windows->Preferences->Java->Code Style->Code Templates. Then Click on Comments->Files, and add the header template above. Now when you create a new file, make sure the box next to "Generate Comments" is checked.

Personal tools