r2 - 08 Aug 2006 - 12:52:52 - TimPetersonYou are here: TWiki >  GRAPEcluster Web  >  Documentation > SettingUpEclipse

Setting up Eclipse

This document descibes how to check out Spiegel from CVS into Eclipse.

Checking out from CVS

In Eclipse, choose File->New->Project...

01-new_project.png

In the resulting dialog, choose CVS->Checkout Projects from CVS. If you have used CVS with Eclipse before, the following dialog will appear. If not, continue to the next step.

02-checkout.png

If the GRAPECluster CVS repository is listed, choose it. Otherwise, select Create a new repository location. Either way, press Next.

03-repository.png

Enter the following information:

  • Host: holly.cs.rit.edu
  • Repository path: /home/group3/s1/grapecluster/cvsroot
  • User: your CS department username
  • Password: your password
  • Connection type: extssh
  • Save password: on

Press Next.

04-module.png

Choose Use an existing module. The list will be populated with the GRAPECluster CVS modules. Choose the main module, grapecluster, and press Next.

05-checkout.png

Choose Check out as a project configured using the New Project wizard (which will already be selected) and press Next.

06-tag.png

Choose HEAD (which will already be selected) and press Finish. You will be returned to the New Project wizard, this time to create a project into which the CVS should be checked out.

Creating the Java project

07-newproject.png

Select Java->Java Project and press Next.

08-newproject.png

Enter a project name, for instance grapecluster. If the JDK compliance isn't set to 5.0, select Use project specific compliance and then select 5.0. Select Create separate source and output folders. Finally, select Next.

09-javasettings.png

By default, the box should show src nested within grapecluster, and the Default output folder should be grapecluster/bin. Press Finish.

10-checkingout.png

The wizard will close, and the project will be checked out from CVS. If you expand the grapecluster project on the left side of the main window, it will look like this:

11-package.png

The X next to the project indicates a compilation error, in this case caused by missing JAR libraries. Right-click (control-click on Mac) on grapecluster and choose Build Path->Configure Build Path... Select the Libraries tab.

12-libraries.png

Press Add JARs...

13-jars.png

Browse to grapecluster/libs and select all of the JARs. Press OK. Press OK to close the build path window. The project will automatically recompile with the new JARs.

At the time of this writing, two build errors will remain at this point, in spiegel.Util and spiegel.shared.SubclassListBuilderTask. The latter will be fixed in the next section. To fix the former, right-click on spiegel.Util and choose Build Path->Exclude. This will cause the offending files to be ignored during builds.

Setting up Ant

Spiegel uses Ant to compile the system and build the JAR. If you don't already have Ant installed, download it now. Unpack the archive in a convenient location. Return to the Java Build Path window as in the previous step. This time, choose Add External JARs... Navigate to the Ant directory and select lib/ant.jar. Press OK twice.

Now navigate to grapecluster/build.xml. Right-click and choose Run As->Ant Build. The build should complete properly. Eclipse will remember this build configuration, so the build can be run at any time by clicking on the button on the toolbar that shows a green and white arrow and a toolbox.

As you make changes within Eclipse, the affected source files will be automatically recompiled independently of Ant. If you make a change to anything other than Java files, you will need to re-run Ant. This includes adding new plugins, since the plugin list is created by the Ant build file.

Running the system

To run Spiegel, right-click on spiegel/Spiegel.java and choose Run As->Java Application. To run it again, press the green and white arrow button on the toolbar. To run it under the debugger, press the button to the left of the run button, which looks like a bug. Alternatively, press F11. (On Mac OS X, F11 is already taken by Exposé. You can either remap Exposé through System preferences or add an Eclipse keybinding to something like F13.)

Configuting the editor

Eclipse uses a tabstop of 4 characters by default. This conflicts with the standard tabstop of 8, so this should be changed. To do this, open Window->Preferences... First, browse to General->Editors->Text Editors. Change Displayed tab width to 8. Second, browse to Java->Code Style->Formatter.

14-formatter.png

Press Show... The first tab is Indentation.

15-indentation.png

Change Tab policy to Spaces only, and change Tab size to 8, leaving Indentation size at 4. Press OK. Eclipse will ask for a new name for the formatting style.

16-rename.png

Enter something like Eclipse (spaces). Press OK twice to close the dialog boxes.

-- TimPeterson - 07 Aug 2006

Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r2 < r1 | More topic actions
General Information
Technology
  • Resources

Documentation
Repository
Related Projects
  • GUI Development
  • MovieMaker?
  • GUI
  • 3D Input Devices
  • Fly Through Path

Related Sites

 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback