-
Notifications
You must be signed in to change notification settings - Fork 100
Developer's Guide
To ensure minimal merging problems and ease readability of the code, the following settings should be applied.
In order to start development check out the repository into a clean folder. This folder will then also be used as your Eclipse workspace for this project (if you want to use an existing workspace, keep in mind to only apply the auto formatter settings to this project instead of the whole workspace).
In order to create the Eclipse workspace, just enter the folder's location when asked for the workspace. Eclipse will create the workspace automatically on the first startup. After Eclipse started, no projects will be displayed, yet. In order to import the existing project, right-click in the "Package Explorer" View and select "Import...". Choose "General" -> "Existing Projects into Workspace" -> "Next". Select the "root directory" as the workspace's location. Now you should see the "Compiler" project. After selecting it and clicking "Finish", you've successfully created the workspace.
The team uses a common Eclipse auto formatter configuration. To configure Eclipse correctly, open the workspace containing the project and select "Window" -> "Preferences" in the top bar. In the search field of the dialog, type "save actions" and select the Java save actions as shown in the picture below.
Adjust your settings to match the ones of the figure before clicking on "Formatter" and then "Import".
The formatter configuration can be found in the repository at "docs/eclipse-setup/formatterConfiguration.xml".
- FindBugs: Useful to detect potential problems
- The project "jsettlers.main.android" displays a classpath error (red exclamation mark on the project symbol)
- Right click the project, select "Run As" -> "Android Application". This causes the missing dependency to be build. Please note, the first run may fail, with the message that there are errors in the project. After that, simply wait until Eclipse detects that the errors are no longer valid. Then you can run the project as Android Application and install it on your device.