Eclipse is aware of the Subversion aspects of the project.

(Use both the Eclipse Subversion plug-in (Subversive) and the shell svn command).

You can use both Eclipse and the TortoiseSVN version of Subversion or the Cygwin bash shell version of Subversion to update the tree.
This choice is the preferred choice for collaborating with the Ptolemy group because it means that your Ptolemy II tree can get recent changes.
The downside is that that the development tree is under development, so there may be bugs or instability.

For other ways to set up Eclipse and Ptolemy II, see the Setting up Eclipse to manage your Ptolemy II development Environment page.

There are at least two Subversion plugins for Eclipse, Subversive and Subclipse. Either will work, for a brief comparison, see Subclipse vs. Subversion. The instructions below are for Subversive. To use Subclipse, see Installing Subversion (SVN) into Eclipse.

The Subversive Eclipse plug-in adds Subversion to Eclipse. After installation, you can use either Eclipse to manage your project, or the svn from the command line.

Follow the Subversive installation instructions or these instructions below:

  1. To download Subversive, in Eclipse, follow these menus
    The first time software is to be added the menu will be: Help | Install New Software
  2. In the "Work with" field, select "Kepler - http://download.eclipse.org/releases/kepler" from the drop down. The install facility will take a few moments to connect to the site and determine what is available.
  3. Expand the "Collaboration" tab and check the box next to "Subversive SVN Team Provider"
  4. Then click Next, Next again and click through the license agreement and hit Finish.
  5. When the "Software Updates" window appears and asks about a restart, select "Restart Now" and restart.
  6. When Eclipse restarts, the "Workspace Launcher" window will appear. If you are upgrading Eclipse, it is best if you choose a new workspace directory. If the workspace directory contains an project from a previous version of Eclipse, then there could be issues.
    After choosing a new workspace directory, click on "OK".
  7. The "Subversion Connector Discovery" window will pop up.
    If it does not, bring up the preferences window:
    Window | Preferences
    Then do Team | SVN | SVN Repositories. When you click on SVN Repositories, the "Subversion Connector Discovery" window will pop up. (See http://www.polarion.com/products/svn/subversive/connector_discovery.php for details.)
  8. In the "Subversion Connector Discovery" window, select a Subversion connector compatible with the version of svn installed on your machine.
    If you don't have Subversion installed on your machine, then skip to the next step.
    To determine which version of Subversion is being run, start up a DOS or Cygwin shell and run svn --version. To start a DOS Shell:
    Windows Server 2003 or Windows XP:
    Click on Start > Run > and type cmd
    Windows Vista and 7
    Click on Start and type cmd
    by going to Application -> Utilities and clicking on the Terminal icon, then type:
    	  svn --version
    	

    If svn --version returns 1.6, then install SVN Kit 1.3.8 or equivalent.
    If svn --version returns 1.7, then install SVN Kit 1.7.9 or equivalent.
    If you do not have the svn command installed, then select the most recent SVN Kit and you should be able to download ptII using the SVN Kit supplied by Eclipse.

    Note: if you install a more recent version of the plugin than the version of the command line svn tool, then you will not be able to use the command line svn to update or modify the tree that is checked out by Eclipse.
    If you run svn on a tree checked out by Eclipse and get a message svn: This client is too old to work with working copy '.'; please get a newer Subversion client, then the solution is to update svn.

    Then do "Finish", "Next", "Next", Accept the license and then "Finish".

  9. If you get a security warning about unsigned software, click "OK".
  10. When prompted for a restart, select "Restart Now".
  11. After Eclipse has restarted, the next steps are to download the ptII Subversion repository.
    In Eclipse, add the ptII SVN Repository:
    Window | Show View | Other | SVN | SVN Repositories
    To see the SVN Repositories pane, you may need to close the Eclipse Welcome Window by clicking on the x in the tab.
  12. In the SVN Repository view, right click, select New | Repository Location and set the url.
    To check out the ptII svn repository with read-only access:
    	  https://repo.eecs.berkeley.edu/svn-anon/projects/eal/ptII
    	

    Note: Most users will select the /svn-anon/ URL above because they will be accessing the tree with read-only Subversion access.
    If you have an UC Berkeley EECS LDAP account or have an external account on repo.eecs.berkeley.edu, then check out ptII with read/write access:

    	  https://repo.eecs.berkeley.edu/svn/projects/eal/ptII/
    	
    Read/writes users may want to check "Save authentication".

    Click "Finish"

    Read/write users will be prompted for their repo.eecs.berkeley.edu username and password.

  13. If you get a "Certificate Problem" window, then select Trust or Trust Always. For details and a workaround, see Certificate is not issued by a trusted authority.
  14. In the SVN Repository view, expand the repository by clicking in the triangle at the left, then right click on trunk and select Find/Check out As
  15. Be sure to check out the trunk not the entire tree, which include all the branches and the trunk.
    Follow the wizard, creating selections as follows:
    1. In the "Check Out As" window, keep the default, Check out as a project configured using the New Project Wizard, then hit Finish.
      (If Check out as a project configure using the New Project Wizard is disabled, then the problem is someone checked a .project file into the repository.)

      Eclipse Check Out As Window

    2. In the "New Project" window, select "Java" > "Java project", Click "Next".

      Eclipse New Project

    3. In the "New Java Project" window:
      In "Project name", enter any project name, ptII is a common choice.
      In "Project Layout", check "Use project folder as root for source and class files". If "Project Layout" is not selectable, then that means that there is already a .eclipse.epf file in the default location. This is usually not a problem, but to be safe, exit Eclipse, remove the file and restart Eclipse.
      The issue here is that by default, Eclipse generates .class files in a bin/ directory. However, the Ptolemy II source repository has scripts in $PTII/bin/. If Eclipse places .class files in bin/ then $PTII/bin/makefile will not exist and $PTII/bin/vergil will not be created when make is run.
      Below is the "New Java Project" windows:

      Eclipse New Java Project

    4. Click "Finish".
    5. Wait for the checkout to finish. Go get coffee.
      Note:If you did not disable build automatically, as suggested above, then Eclipse will build the project and produce thousands of errors. This is not really a problem. You will fix the errors in the next step with the .classpath.default file.
    6. If you have read/write access go to Setup the Subversion Configuration to Sane Settings so that if you commit files, they will have the appropriate settings.
    7. All users should go on to Set up the Eclipse ptII project .classpath for Ptolemy II