Skip to content
SWP-Comp-Ch3ck3r edited this page Apr 26, 2013 · 4 revisions

This is a little guide on how to set up your eclipse properly to use the given directory structure.

What you will need

You need to create at least two projects in eclipse

  • your component project
  • the interfaces poject from the submodule
  • other components you have dependencies on (if needed)

Of course you can import all other components into eclipse if you want to do so.

Selecting your workspace

First of all you need to select your workspace directory. This can be any directory you want but you should keep it outside of /code.

workspace

Adding a Component

Now create a new Java Project. Use the name of the component you want to develop as the project name. In this example i chose ast. Uncheck Use default location and enter the path to the component instead.

new project

Click on the next button. Make sure the directories src and test are added as source directories.

source folders

Now switch to the tab libraries and add all the libraries from the /code/lib directory .

libraries

Now click on finish.

This procedure is used for all the components in the same way.

Setting up the Interfaces

The above method works for all components of the project. The only exception is the interfaces project which is inside the /code/common submodule. Here is how to set up the Interfaces project:

Create a new Java Project and call it interfaces. Uncheck Use default location and choose the interface folder within the git submodule.

new project

click on finish.

The interfaces project does not contain any tests. Therefore there is no source folder test and you do not need to add the libraries from /code/lib

Dependencies between components

Almost every component will depend on the interface project. Some components will depend on other components as well. To set up those dependencies in eclipse right click your project. Select Build Path -> Configure Build Path

buildpath

Switch to the projects tab and select the projects you depend on.

dependency

Component wide tests

Each component has its own test directory to use for JUnit tests. But those JUnit tests are only for the single component they are in. For tests across several components the folder /code/test was created. This folder contains component wide tests. It is set up the same way the other components are set up but has no src folder.

Clone this wiki locally