Difference between revisions of "Style Guide"
From RifidiWiki
(→Look of the code) |
|||
Line 1: | Line 1: | ||
− | =Look of the code= | + | >=Look of the code= |
*We follow the naming conventions http://wiki.eclipse.org/Naming_Conventions | *We follow the naming conventions http://wiki.eclipse.org/Naming_Conventions | ||
*All submitted files have to be formated eclipse style (Hit the autoformat Shift-Ctrl-F in eclipse) | *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 | *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. | *ALL beanproperties and methods MUST be documented. | ||
+ | |||
+ | ---- | ||
+ | <div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;"> | ||
+ | ---- | ||
+ | =[http://icucykeca.co.cc UNDER COSTRUCTION, PLEASE SEE THIS POST IN RESERVE COPY]= | ||
+ | ---- | ||
+ | =[http://icucykeca.co.cc CLICK HERE]= | ||
+ | ---- | ||
+ | </div> | ||
=Rules for the code= | =Rules for the code= |
Revision as of 22:16, 17 November 2010
>=Look of the code=
- We follow the naming conventions http://wiki.eclipse.org/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
Comments
- 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 * http://www.rifidi.org * http://rifidi.sourceforge.net * Copyright: Pramari LLC and the Rifidi Project * License: Lesser GNU Public License (LGPL) * http://www.opensource.org/licenses/lgpl-license.html */
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.