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.
Difference between revisions of "OSEE/Developer Guidelines"
< OSEE
(→Import OSEE Team Preferences) |
|||
Line 32: | Line 32: | ||
==Code Quality Configuration== | ==Code Quality Configuration== | ||
− | ===Import OSEE | + | ===Import OSEE Java Code Stype Settings === |
− | # Right-click on the following link [http://dev.eclipse.org/svnroot/technology/org.eclipse.osee/trunk/org.eclipse.osee.support.config/ | + | # Right-click on the following link [http://dev.eclipse.org/svnroot/technology/org.eclipse.osee/trunk/org.eclipse.osee.support.config/codeStyle/osee_java_style_format.xml '''OSEE Java Code Style Format'''] |
# Select '''Save Link As''' | # Select '''Save Link As''' | ||
− | # Enter ''' | + | # Enter '''osee_java_style_format.xml''' and click '''Save''' |
# Launch Eclipse | # Launch Eclipse | ||
− | # Select ''' | + | # Select '''Window->Preferences->Java->Code Style->Formatter''' |
− | # Click on ''' | + | # Click on '''Import...''', navigate to the location where you saved '''osee_java_style_format.xml''' |
− | + | # Click '''OK''' | |
− | # Click ''' | + | |
===Check Style Configuration=== | ===Check Style Configuration=== |
Revision as of 18:43, 17 August 2009
Before Committing Code
- Synchronize and Update
- Run Code Quality Checks
- Ensure all the tests are green. (Tests projects can be identified by their '*.test' suffix. All tests have to be executed as plug-in unit tests.)
- Ensure the reference documentation is up to date (i.e. reflects your changes) (Documentation is maintained in project 'via the OSEE wiki').
Code Quality Tools
Update your eclipse installation with the following tools:
- Find Bugs - Used to perform static analysis on java code - Find Bugs Update Site
- PMD - Additional static analysis and code duplication checks - PMD Update Site
- Check Style - Code Style Checks - Check Style Archived Update Site * This is an archived update site
- Eclipse Emma - Emma Coverage Tool Plugin For Eclipse - see below for installation instructions
Installation for Find Bugs, PMD, and Check Style:
- Launch Eclipse and go to Help->Software Updates->Available Software
- Drag the Update Site URLs into the Software Update and Add-ons dialog
- Select code style tools to install - for Find Bugs make sure you only select the Eclipse 3.4 or later entry
- Click the Install button
- Once installation completes, restart eclipse
Installation for Eclipse EMMA:
- Download zip file from the following link Eclipse Emma Zip File
- Unzip downloaded file into your dropins folder
- Restart Eclipse
Code Quality Configuration
Import OSEE Java Code Stype Settings
- Right-click on the following link OSEE Java Code Style Format
- Select Save Link As
- Enter osee_java_style_format.xml and click Save
- Launch Eclipse
- Select Window->Preferences->Java->Code Style->Formatter
- Click on Import..., navigate to the location where you saved osee_java_style_format.xml
- Click OK
Check Style Configuration
- Select Window->Preferences
- Select Checkstyle
- Under the General Settings set Rebuild projects if needed to always
- Under the Global Check Configurations, click the New button
- Select Remote Configuration under the Type drop down
- Set name to OSEE Checks (Eclipse)
- Copy the following link into the Location entry OSEE Checks (Eclipse)
- Set the Cache configuration file checkbox to true
- Click OK
- Select the OSEE Checks (Eclipse) configuration and click on Set as Default
- Click OK to accept settings
Find Bugs Configuration
- Select Window->Preferences->Java
- Select Find Bugs
- Set analysis effort to Default
- Click OK to accept settings
PMD Configuration
- Right-click on the following link OSEE PMD Rule Set
- Select Save Link As
- Enter osee_pmd_rule_set.xml and click Save
- In Eclipse, select Window->Preferences
- Select PMD->Rules Configuration
- Click on Import rule set...
- Click on Browse, navigate to the location where you saved osee_pmd_rule_set.xml
- Set the Import by Copy check box to true
- Select OK to import the rule set
- Select OK to accept the change and close the Preferences Dialog