This page describes how to setup Eclipse, and run Zong! and its automated tests. Please follow the steps carefully.
After Zong! was downloaded, it can be opened in the Eclipse IDE. This section describes the steps for getting Zong! up and running.
Import the projects
Zong! consists of many subprojects, called modules. These have to be imported once.
Choose "File → Import...". In the following dialog, select "General → Existing Projects into Workspace" and click on "Next >".
'
In the next dialog, click on "Browse..." and select the root folder of your local Zong! repository. A lot of projects appear, which are selected by default. Click on "Finish".
After that, all projects appear in the Package Explorer of Eclipse.
Download or update the external libraries
As you will notice, Zong! is still not ready for compiling. A lot of errors appear in the Problems view of Eclipse. We need to download some external libraries, which are not part of the git repository (since we do not want to store large binary files there, to keep the repository small). Downloading or updating the libraries is easy: Just right click the Ant script file lib.update.xml
in the lib
project, then select "Run As → Ant Build". All required libraries will be downloaded.
Each time when you update (pull) your local repository, and when you get classpath errors when compiling, repeat this step. Probably the libraries were changed or updated to newer versions. |
Zong! is still not compiling successfully, but the following steps will solve the remaining problems.
lib/lombok-<version>.jar
(after you followed the previous step ).java -jar lombok-<version>.jar
in the lib
directory) to launch its installer. In the dialog, select your Eclipse executable and click "Install / Update". After installing, restart Eclipse and open your Zong! workspace again.Import user libraries
At this point we have downloaded the required libraries, but Eclipse do not know them yet. We have to import the so-called "user libraries".
In "Window → Preferences", select "Java → Build Path → User Libraries". The following dialog appears:
Click on "Import..." and select the file lib/lib.userlibraries
in the lib
folder of your local repository. Import all libraries (maybe more than in the following screenshot).
Other settings we recommend to change:
a) In "Java → Compiler → Errors/Warnings", set "Serializable class without serialVersionUID" to "Ignore". We do not use serialization, and this step will remove a lot of unfounded warnings.
b) In the same window, change "Missing '@Override' annotation" to "Warning" and select the checkbox "Include implementations of interface methods (1.6 or higher)".
utils/material/Eclipse Java Formatter.xml
.That's it. Zong! should be compiling now
If you have problems, please let us know, so that we can help you and update this guide.
Currently, there is no runnable component of Zong! in the repository. If the first one is online, we will update this section.
Zong! and the Xenoage Utils project contain a lot of unit tests. To run them, simply right click on a project and select "Run As → JUnit Test".