-
Notifications
You must be signed in to change notification settings - Fork 1
Setting up Eclipse
This is a little guide on how to set up your eclipse properly to use the given directory structure.
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.
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
.
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 submodule instead.
Click on the next
button. Make sure the directories src
and test
are added as source directories.
Now switch to the tab libraries
and add all the libraries from the /code/lib
directory .
Now click on finish.
This procedure is used for all the components in the same way.
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.
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
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
Switch to the projects
tab and select the projects you depend on.
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.