wiki:SettingUpEclipse

Setting up Eclipse

Plugins

Install the following plugins

subclipse (version 1.6.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 SVN -> Checkout Projects from SVN and click Next
  3. Check Create new repository location and click Next
  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 -> Java Project and click Next
  8. Enter a project name e.g. ProteiosSE-2.x
  9. Check Create new project in workspace ProteiosSE
  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 Output folder: below each source folder
  7. Create and select directory build in the same directory as the selected src directory(you have to find it in the directory structure)
  8. Click Ok
  9. Repeat the above three steps for each output folder, yes this is a pain but you only need to do this once :-)
  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
  14. Click Ok

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
  5. Click Ok

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 from eclipse though a 'junit' task requires the junit.jar. Follow this instruction how to configure eclipse.

Last modified 11 years ago Last modified on Feb 19, 2010, 10:10:24 AM