Setting up IntelliJ IDEA
Note - I use IntelliJ Ultimate with the Darcula theme, your IDE may look slightly different
If you do not have a subversion client installed you should install tortoisesvn and tick the option to install the command line tools during installation
1. Open IntelliJ IDEA and hit file -> New -> Project from version control -> Subversion
2. Click the green + and enter the url for Mekwars ( svn://svn.code.sf.net/p/mekwars/code/trunk ). Highlight the added repository and click on Checkout
3. Create a directory to store the code by clicking on the folder icon then highlight the folder and click ok (mekwarssvn in this example)
4. Highlight the <pathtoproject>\p\mekwars\code\trunk and click ok
5. Select the 1.8 format if prompted, you should see "Checking out files to blahblahblah" and a progress bar at the bottom of your IDE. Once finished you will be prompted to open the project.
6. You should have a directory layout that looks like this
7.Highlight "trunk" and either press F4 or right-click and select "open module settings"
8.Select "Project". Set the SDK to your installed Java version. Set the Project language level to 7
9.Select "Modules" and set the folders as shown in the screenshot below ( highlight src and click on "Sources" on top and do the same for resources and the client and dist libs ). Click OK when done
10.Click on the "Ant Build" option on the right
11.Click the green +
12.Select build.xml, you should see the following
13.Highlight "compile" and click the play button. Click messages at the bottom to see the ant build in progress
14.If this fails check the previous steps, if successful then highlight and run dist-client and dist-server
15.Assuming everything ran successfully you should have a "dist" folder in trunk now containing both client and server
16.Expand dist/server and right-click on MekWarsServer.jar. Select "Run MekwarsServer.jar". It will fail immediately but you will notice it appear in the top right of the screen
17.Click the drop-down and select "Edit Configurations"
18.Copy these settings (altering for your path ). The working directory is the important bit that was missing
19.Click ok and click the play button next to the drop-down. You should see the server called in the run window at the bottom of the IDE
20.Repeat steps 16 - 19 but for dist/client/MekWarsClient.jar and instead of hitting play at step 19 hit the bug next to the play button
21.Connect to 127.0.0.1 as a username with no password. If you set a breakpoint in the src folder by clicking on a line number then the IDE will pause and allow you to debug.
Note you can also debug the server in the same way