Getting started with Eclipse

This short guide describes how to start working with JavaNLP in Eclipse.

Make sure your path is set correctly

Follow the SVN setup instructions at the start of the SVN guide. If all is well, you should be able to run the following command on your local machine and get information about the svn version on the server. If not, the rest of these instructions won't help.

  ssh jamie.stanford.edu svnserve

Download and Install Eclipse

Install the most recent version of Eclipse from the Eclipse download site. Either the "Eclipse IDE for Java Developers" or the "Eclipse Classic" should be fine.

Install subversion plugin for Eclipse

NB: If you already have Eclipse, I recommend you delete your existing installation and workspace [make a backup first!]. Then download a fresh new Stream build and start with a fresh new workspace before proceeding. It might or might not work if you don't.

Subversion support is not currently included with Eclipse by default, but there are two relatively stable plugins that do the job.

  1. Go to Help -> Software Updates -> Find and Install ...
  2. "Search for new features to install"
  3. "New Remote Site ..."
      Name: Subversive
      URL:  http://www.polarion.org/projects/subversive/download/1.1/update-site/
  4. When selecting features to install, choose:
      Subversive -> Subversive SVN Team Provider Plugin -> SVN Team Provider
      Subversive -> Subversive Client Libraries -> SVNKit [plus version info] 
  5. Finish installing and reload Eclipse. (But you're not done!)
  6. Go to Window -> Preferences -> Team -> SVN and select the "SVN Client" tab.
  7. Choose
    SVN Kit
    from the SVN Client list. This is required to work with Subversion 1.4 as installed on the NLP machines.

Check out JavaNLP

  1. Switch to the newly installed SVN Repository Exploring perspective.
  2. File -> New -> Repository Location
  3. Set the Root URL to be
    svn+ssh://jamie.stanford.edu/u/nlp/svnroot/
  4. Enter your username and (if you want) your password. I have been unable to get the plugin to use my ~/.ssh/id_rsa.pub.
  5. Browse into the new location through trunk. Right-click on javanlp and choose "Check Out".

You should now have a fully configured JavaNLP checkout waiting in the Java perspective!

JavaNLP coding conventions: tabs and spaces

To be in accord with the JavaNLP coding conventions, Eclipse must be configured to indent with two spaces always (and never tabs).

  1. Right-click on the JavaNLP project in the Java perspective and choose Properties -> Java Code Style -> Formatter.
  2. Check "Enable project specific settings". Click "New" and create a profile named "JavaNLP" based on the "Eclipse [built-in]."
  3. On the "Indentation" tab, choose "Spaces only" as the tab policy. Set both "indentation size" and "tab size" to 2.
Darbar.

Contact: Daniel Ramage