Setting up Eclipse

Plugins

Install the following plugins

subclipse (version 1.2.x)
Subversion interface, Installation instructions

Project setup

Checkout source

When you've installed the above plugins fire up Eclipse and follow these instructions

  1. Click on File -> Import
  2. Select Checkout project from SVN
  3. Check Create new repository location
  4. Enter http://www.proteios.org/svn and click Next
  5. Select trunk and click Next
  6. Check Check out as a project configured using the New Project Wizard and click Finish
  7. Select Java Project and click Next
  8. Enter a project name e.g. Proteios-2.x
  9. Check Create new project in workspace
  10. JDK Compliance should be set to 5.0
  11. Check Use project folder as root for sources and class files and click Next
  12. In the Source tab, select your project(e.g. Proteios-2.x) in the list box and click the link Remove project 'Proteios-2.x' from build path
  13. Click Finish

You should now have a fresh checkout of Proteios in your Package navigator

Configure project

  1. In the menu click Project -> Properties
  2. In the left frame double click Java code style
  3. Click Code templates
  4. Check Enable project specific settings
  5. Click Import
  6. Select the file Proteios-2.x/misc/eclipse/code_templates.xml

Repeat steps 4-6 for

  • Java code styles -> Formatter importing the file Proteios-2.x/misc/eclipse/formatter_style.xml
  • Java code styles -> Organize imports importing the file Proteios-2.x/misc/eclipse/import_order.txt

Repeat these steps whenever files in Proteios-2.x/misc/eclipse are updated.

  1. In the left frame select Java Build Path
  2. In the right frame select Source tab
  3. Click Add Folder...
  4. Check all src/ and test/src folders in api/core, api/waf, client/* and plugin/`
  5. Check `Allow output folders for source folder
  6. Doubleclick src -> Output folder
  7. Create and check output build in the same directory as the selected src directory
  8. Click Ok
  9. Repeat the above three steps for each output folder
  10. Click Libraries tab
  11. Click Add JARs
  12. Select all jar files in api/external
  13. Repeat steps 17-18 for all subdirectories in api/external

You also need to configure text file encoding and line delimiter by:

  1. In the menu click Project -> Properties
  2. In the left frame click Resource (or Info, in older versions of Eclipse)
  3. In section Text file encoding check Other and select ISO-8859-1 UTF-8
  4. In section New text file line delimiter check Other and select Unix

Subversion

Setup eclipse to use our subversion config by

  1. In the menu click Window -> Preferences
  2. In the left fram click Team -> SVN (subclipse has to be installed)
  3. Set Configuration location to your_workspace/proteios/misc/subversion
  4. Click Ok

Next time you run a subversion command it will create additional files README.txt and servers in the above directory. You can safely ignore these files and even add them to svn ignore.

Ant

Default ant tasks run fine frome eclipse though a 'junit' task requires the junit.jar. Follow this instruction how to configure eclipse.