Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

1. Install Subclipse

Subclipse is a plugin that integrates a Subversion client and various related tools into Eclipse.

  1. Go to http://subclipse.tigris.org/
  2. Click Downloads and follow the instructions.

2. Check out a branch or the trunk from our repository

  1. In Eclipse, choose File > Import ...
  2. Choose SVN > Checkout Projects From SVN... and click Next
  3. Create a new repository location: https://viki.eecs.harvard.edu/repos/ct3
  4. Select either the trunk, or one of the branches and click Next.
  5. Choose "Checkout as a project in the workspace" and click Next
  6. Use the default workspace location (which should probably be /Users/yourname/workspace)
  7. Click Finish and wait for the code to be downloaded.

3. Make the project into a Java project

Eclipse inexplicably has no feature to automatically recognize Java projects, so we need to do this manually.

  1. Close Eclipse.
  2. Navigate to the checked-out folder (usually the name of the branch) and open the .project file in a text editor. Note that the file may be hidden on your system.
  3. Change
    <natures></natures>
    to
    <natures><nature>org.eclipse.jdt.core.javanature</nature></natures>
  4. Save and close the .project file
  5. Re-open Eclipse.

4. Set up the Eclipse build path

You'll want Eclipse to be able to find and build all your code so that you can use Autocomplete, edit-time code checking, and debugging. This requires some setup.

  1. In the Package Explorer, right-click on your project and choose Properties.
  2. Go to Java Build Path.
  3. On the Source tab, remove any existing entries, and click Add Folder.
  4. Select the agents, gameconfigs, gui, and src folders. Depending on your project, you might have additional folders that contain Java code; you should add those here.
  5. On the Libraries tab, click Add JARs
  6. Navigate to the lib/jars folder and choose all of the JAR files that it contains.
  7. Click OK.
  8. Eclipse should now reorganize the package hierarchy in the Package Explorer.

5. Access Ant from Eclipse

You can load CT's build.xml into Eclipse, making it possible to run Ant targets without opening up a command line.

  1. In Eclipse, choose Window > Show View > Ant
  2. In the new empty Ant pane that appears, click on the leftmost icon (a + next to a small ant) to add a build file.
  3. In the list that pops up, expand the CT3 folder and select build.xml.
  4. You'll now see an entry labeled coloredtrails in the Ant pane. Click the + or arrow next to it to expand it.
  5. You can now double-click any of the targets to run them.
  • No labels