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
- Click on File -> Import
- Select SVN -> Checkout Projects from SVN and click Next
- Check Create new repository location and click Next
- Enter http://www.proteios.org/svn and click Next
- Select trunk and click Next
- Check Check out as a project configured using the New Project Wizard and click Finish
- Select Java -> Java Project and click Next
- Enter a project name e.g. ProteiosSE-2.x
- Check Create new project in workspace ProteiosSE
- JDK Compliance should be set to 5.0
- Check Use project folder as root for sources and class files and click Next
- 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
- Click Finish
You should now have a fresh checkout of Proteios in your Package navigator
Configure project
- In the menu click Project -> Properties
- In the left frame double click Java code style
- Click Code templates
- Check Enable project specific settings
- Click Import
- 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.
- In the left frame select Java Build Path
- In the right frame select Source tab
- Click Add Folder...
- Check all src/ and test/src folders in api/core, api/waf, client/* and plugin/`
- Check `Allow output folders for source folder
- Doubleclick Output folder: below each source folder
- Create and select directory build in the same directory as the selected src directory(you have to find it in the directory structure)
- Click Ok
- Repeat the above three steps for each output folder, yes this is a pain but you only need to do this once :-)
- Click Libraries tab
- Click Add JARs
- Select all jar files in api/external
- Repeat steps 17-18 for all subdirectories in api/external
- Click Ok
You also need to configure text file encoding and line delimiter by:
- In the menu click Project -> Properties
- In the left frame click Resource (or Info, in older versions of Eclipse)
- In section Text file encoding check Other and select
ISO-8859-1UTF-8 - In section New text file line delimiter check Other and select Unix
- Click Ok
Subversion
Setup eclipse to use our subversion config by
- In the menu click Window -> Preferences
- In the left fram click Team -> SVN (subclipse has to be installed)
- Set Configuration location to your_workspace/proteios/misc/subversion
- 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.
