Configure Eclipse

From SONIVIS:Wiki

Jump to: navigation, search
PREVIOUS STEP: Checkout Code



To start SONIVIS without any intentions to commit leave out this section and go on with: Start SONIVIS in Eclipse. Otherwise please follow the advices below.


In order to get things running in Eclipse please configure the following code conventions and subclipse. There is also a possibility to connect Eclipse directly to our Tracking System CodeBeamer. So you do not need to leave Eclipse in order to change or add tracker items.

Code Conventions

XML files in installer project
Formatter settings
Clean up settings
Action settings

To gain commit right you have to provide correctly formatted source code. You can let Eclipse do all necessary code formatting by configure the following options:

  • Use Window → Preferences → Java → Code Style → Formatter: Import ... to import our formatting guidelines "Eclipse [SONIVIS:Tool]" from the following XML file: Project de.sonivis.tool.installer/guidelines/SONIVIS_Formatter.xml
  • Activate the newly imported configuration.
  • Repeat the same steps to setup the Clean Up function under "Clean Up": Import sonivis-tool-installer/guidelines/SONIVIS_CleanUp.xml
  • Activate Save Actions: Preferences -> Java -> Editor -> Save Actions -> Enable all checkboxes!

Configure Subclipse

Step 1: Open svn property preferences
Step 2: Set svn properties

Especially for committing, commenting and comparing versions of code it is helpful to use the advantages SVN offers. After you installed Subclipse as recommended in Installation_Eclipse you can set svn properties for all resources. With the help of these properties we can define keywords like $Date$, $Revision$ and $Author$ to replace their content automatically on committing. A replacement by SVN then looks like this $Date: 2009-04-21 13:44:48 +0200 (Di, 21 Apr 2009)$ $Rev: 707 $.

To set the properties in Eclipse you have to right-click on the resource: Team -> Set Property.. like shown in Media:SVN-SetProperty.png. To set these kind of properties use the property name svn:keywords in the open dialog, like shown in Media:SVN-SetProperty-Details.png. We are currently using "Date Author Revision" and added these keywords to all our resources.


To use these keyword also in new commits you should ad the svn property like introduced above. For more information you can look here: http://www.markdrew.co.uk/blog/post.cfm/using-keyword-substitution-in-subversion.

Mylyn CodeBeamer bridge

MyBugs

Optional (if you want to manage your CodeBeamer items (like Bugs and Tasks) out of Eclipse): The CodeBeamer connector plug-in for Mylyn is available from this plug-in repository: http://cbconnector.javaforge.com/update/2.1. You should have installed it following the Eclipse installation guideline.

  • Go to Menu "Window" → "Show View" → "Other" → "Mylyn" → "Task Repositories"
    • Click right on the opened view and choose "Add Task Repository" from the pop-up context menu.
    • Set-up the plug-in's configuration (Screenshot): Server = http://www.sonivis.org:8080/cb/remote-api?project=SONIVIS:Tool, User ID and Password are the same as in the CodeBeamer web interface
    • Add a new entry to the view "Task Repositories". Right click on it and choose "New Query..." to add an auto-updated list of bugs/tasks.
      • e.g. to get a list of all bugs that are assigned to you see the screenshot "MyBugs"
Personal tools