OBO-Edit: Getting the Source Code

From GO Wiki
Revision as of 18:54, 14 July 2008 by Nomi (talk | contribs) (→‎Plugins)
Jump to navigation Jump to search

Introduction

OBO-Edit is stored in a subversion repository within the Gene Ontology sourceforge project.

Dependencies

OBO-Edit is based on two important libraries, the OBO API and the BBOP Java API. Modifications to OBO-Edit may require modifications to these two supporting libraries as well. Therefore, it is strongly suggested that you check out the source code for all three libraries when working with OBO-Edit.

Getting the Source Code with Eclipse

Build Paths

The OBO-Edit Eclipse project is designed to be used with the OBO API and BBOP Java API. The build path in the OBO-Edit project file refers to projects named "OBO" and "BBOP" as dependencies, so it is highly recommended that you follow the optional instructions below to create these projects as well.

However, this is not necessary. If you prefer, you may check out only the OBO-Edit project, remove the project dependencies, and modify the build path to include lib/runlibs/bbop.jar and lib/runlibs/obo.jar instead.

Installing Subversion Support

Current versions of Eclipse do not automatically support subversion. However, the subclipse plugin adds seamless subversion support to Eclipse, using the existing Team mechanisms. See http://subclipse.tigris.org/install.html for installation instructions.

Getting OBO-Edit from Subclipse

  1. Choose File -> New -> Project...
  2. Select "Checkout Projects from SVN" in the New Project Wizard, and click "Next"
  3. Choose "Create a New Repository Location" and click "Next"
  4. Enter https://geneontology.svn.sourceforge.net/svnroot/geneontology/java/oboedit/ into the location field and click "Next"
  5. Choose the trunk directory to get the latest version (choose a branch from the "tags" or "branches" directories to get an earlier version) and click "Next"
  6. Enter a name for the Eclipse projet ("OBO-Edit" is recommended) and click "Finish"

(Optional) Getting the OBO API from Subclipse

  1. Choose File -> New -> Project...
  2. Select "Checkout Projects from SVN" in the New Project Wizard, and click "Next"
  3. Choose "Create a New Repository Location" and click "Next"
  4. Enter https://geneontology.svn.sourceforge.net/svnroot/geneontology/java/obo/ into the location field and click "Next"
  5. Choose the trunk directory to get the latest version (choose a branch from the "tags" or "branches" directories to get an earlier version) and click "Next"
  6. Enter a name for the Eclipse project ("OBO" is recommended) and click "Finish"

(Optional) Getting the BBOP API from Subclipse

  1. Choose File -> New -> Project...
  2. Select "Checkout Projects from SVN" in the New Project Wizard, and click "Next"
  3. Choose "Create a New Repository Location" and click "Next"
  4. Enter https://geneontology.svn.sourceforge.net/svnroot/geneontology/java/bbop/ into the location field and click "Next"
  5. Choose the trunk directory to get the latest version (choose a branch from the "tags" or "branches" directories to get an earlier version) and click "Next"
  6. Enter a name for the Eclipse project ("BBOP" is recommended) and click "Finish"

Congratulations! You're done!

Updating the Source Code via Subclipse

  1. The source code for these projects is updated periodically. You have to update manually; Eclipse will not do this automatically.
  2. Right-click on the project name (e.g. OBO-Edit) in the Package Explorer and choose Team -> Update from the menu
  3. When the update is complete, right-click on the project name again and choose Refresh

Getting the Source Code with Command-Line SVN

Make sure that you have correctly installed Subversion on your computer, change to the desired parent directory and run the following commands:

svn co https://geneontology.svn.sourceforge.net/svnroot/geneontology/java/oboedit/trunk OBO-Edit

To check out the supporting projects, run these additional commands:

svn co https://geneontology.svn.sourceforge.net/svnroot/geneontology/java/bbop/trunk BBOP
svn co https://geneontology.svn.sourceforge.net/svnroot/geneontology/java/obo/trunk OBO

Running OBO-Edit From Eclipse

When you run OBO-Edit you need to assign the amount of memory it will use. To do so, select "Open Run Dialog" from the Run menu. Make sure OBOEdit is selected in the "Java Application" list on the left. Then fill in the following parameter in the VM arguments box according to the amount of memory in your computer:

You may also need to set the jars that OBO-Edit uses. From the list of projects in the Package Explorer, choose OBO-Edit, then right-click and select "Properties". In the Properties window, select "Java Build Path" from the list on the left side, and then choose the "Libraries" tab. Click "Add JARs" and add the jars in OBO-Edit/lib/runlibs.

Staying up to date

The source code for OBO-Edit (and for the BBOP and OBO libraries that it depends on) changes frequently. To stay up to date inside Eclipse, use the right mouse menu option "Team -> Update". To update from the shell, use "svn update".

Note that if you are using Eclipse but you do an svn update from the shell, or make any other changes outside of Eclipse, you will need to do a "Refresh" in Eclipse to get it in sync. Also note that if new jars are added to the project, you might need to add them to your Java Build Path in Eclipse (see above).

If you wish to stay informed of every single svn commit, you can use svnnotify via the URL below:

(notes: This page is only accessible to admins of the Gene Ontology sourceforge site. snvnotify will also notify you of changes in other projects. I'm not sure how to do this at a finer level of granularity as yet.)

Plugins

Plugins are here:

https://geneontology.svn.sourceforge.net/svnroot/geneontology/java/oboedit-plugins/

Getting old versions of the source code

See OBO-Edit:_Getting_Old_Source_Code_from_CVS