59 lines
1.9 KiB
Text
59 lines
1.9 KiB
Text
|
Legacy Worlds Eclipse projects import
|
||
|
======================================
|
||
|
|
||
|
While it is not strictly necessary, it is recommended to import the Legacy
|
||
|
Worlds code into a separate workspace, as it will be easier to use e.g. the LW
|
||
|
code formatting configuration without interfering with other projects.
|
||
|
|
||
|
Before you start, make sure the following Eclipse plug-ins are active:
|
||
|
* M2E (the Maven integration plug-in)
|
||
|
* EGit or equivalent
|
||
|
|
||
|
This guide assumes that you've already cloned the source code from the
|
||
|
server's Git repositories.
|
||
|
|
||
|
|
||
|
Importing the projects
|
||
|
-----------------------
|
||
|
|
||
|
1) Select the Java perspective (the Java EE perspective tries to be clever and
|
||
|
fails).
|
||
|
2) In the Package Explorer, right-click then select Import.
|
||
|
3) Select Maven > Existing Maven projects.
|
||
|
4) Select the root directory of your local Git repository. It will list all
|
||
|
parts of the Legacy Worlds code. Make sure they're all selected, then click the
|
||
|
Finish button.
|
||
|
|
||
|
The projects should be imported, and after a while, they should all build
|
||
|
successfully. This may take a few minutes, as Maven will download all
|
||
|
dependencies and plug-ins.
|
||
|
|
||
|
At this point, Eclipse knows of the projects, but has no clue they're in a Git
|
||
|
repository.
|
||
|
|
||
|
|
||
|
Git support
|
||
|
------------
|
||
|
|
||
|
1) Open the Git Repositories perspective, and add the local repository to the
|
||
|
list.
|
||
|
2) Go back to the Java perspective, select all projects, right-click then select
|
||
|
Team > Share Project
|
||
|
3) Select the Git repository type,
|
||
|
4) Select the local repository then click Finish.
|
||
|
|
||
|
Eclipse will proceed to "link" the local repository with the projects in the
|
||
|
workspace.
|
||
|
|
||
|
|
||
|
Editor set-up
|
||
|
--------------
|
||
|
|
||
|
1) Select Window > Preferences in the main menu
|
||
|
2) Select Java > Code Style > Formatter
|
||
|
3) Click the Import button and select the eclipse-code-format.xml file found in
|
||
|
the legacyworlds/ directory.
|
||
|
4) Select Java > Code Style > Clean Up
|
||
|
5) Click the Import button and select the eclipse-code-cleanup.xml file found
|
||
|
in the legacyworlds/ directory.
|