OBO-Edit: Getting the Source Code: Difference between revisions

From GO Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(34 intermediate revisions by 6 users not shown)
Line 1: Line 1:
[[Category:OBO-Edit]]
==Introduction==
OBO-Edit is stored in a [http://subversion.tigris.org/project_packages.html subversion] repository within the [http://sourceforge.net/projects/geneontology 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==
==Getting the Source Code with Eclipse==
# Choose File -> New -> Project
===Build Paths===
# Select "Project from CVS" in the New Project Wizard, and click "Next"
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 [http://subclipse.tigris.org/ subclipse] plugin adds seamless subversion support to Eclipse, using the existing Team mechanisms. See [http://subclipse.tigris.org/servlets/ProjectProcess?pageID=p4wYuA http://subclipse.tigris.org/servlets/ProjectProcess?pageID=p4wYuA] for installation instructions.
 
===Getting OBO-Edit from Subclipse===
# Choose File -> New -> Project...
# Select "Checkout Projects from SVN" in the New Project Wizard, and click "Next"
# Choose "Create a New Repository Location" and click "Next"
# Enter <code>https://geneontology.svn.sourceforge.net/svnroot/geneontology/java/oboedit/</code> into the location field and click "Next"
# Choose the <code>trunk</code> directory to get the latest version (choose a branch from the "tags" or "branches" directories to get an earlier version) and click "Next"
# Enter a name for the Eclipse projet ("OBO-Edit" is recommended) and click "Finish"
 
===(Optional) Getting the OBO API from Subclipse===
# Choose File -> New -> Project...
# Select "Checkout Projects from SVN" in the New Project Wizard, and click "Next"
# Choose "Create a New Repository Location" and click "Next"
# Enter <code>https://geneontology.svn.sourceforge.net/svnroot/geneontology/java/obo/</code> into the location field and click "Next"
# Choose the <code>trunk</code> directory to get the latest version (choose a branch from the "tags" or "branches" directories to get an earlier version) and click "Next"
# Enter a name for the Eclipse project ("OBO" is recommended) and click "Finish"
 
===(Optional) Getting the BBOP API from Subclipse===
# Choose File -> New -> Project...
# Select "Checkout Projects from SVN" in the New Project Wizard, and click "Next"
# Choose "Create a New Repository Location" and click "Next"
# Choose "Create a New Repository Location" and click "Next"
# Enter the information below into the form, and press "Next"
# Enter <code>https://geneontology.svn.sourceforge.net/svnroot/geneontology/java/bbop/</code> into the location field and click "Next"
#* '''Host:''' <code>geneontology.cvs.sourceforge.net</code>
# Choose the <code>trunk</code> directory to get the latest version (choose a branch from the "tags" or "branches" directories to get an earlier version) and click "Next"
#* '''Repository Path:''' <code>/cvsroot/geneontology</code>
# Enter a name for the Eclipse project ("BBOP" is recommended) and click "Finish"
#* '''User:''' <code>anonymous</code> ''(if you have developer access, enter your username)''
#* '''Password:''' ''blank'' ''(if you have developer access, enter your password)''
#* '''Connection type''' <code>pserver</code> ''(if you have developer access, use <code>extssh</code>)''
#* '''Use default port'''
# Select '''Use specified module name''', enter <code>go-dev/java/oboedit</code> in the text field, and click "Next"
# Select '''Check out as a project in the workspace''' and enter a name for the project (I suggest <code>OBO-Edit</code>)
# Make sure '''Checkout subfolders''' is selected and press "Next"
# Leave '''Use default workspace location''' selected and press "Next"
# If you want the latest version of OBO-Edit, select <code>HEAD</code> and click "Finish"
# If you want the code from an earlier version of OBO-Edit, select <code>Branches</code> and click "Refresh Tags". Expand the "Branches" node and select the desired tag from the list.


Congratulations! You're done!
Congratulations! You're done!


Note: OBO-Edit makes extensive use of the org.geneontology library. You may want to check out the org.geneontology library sourcecode as well. To do it, follow all the steps above, but enter <code>go-dev/java/org.geneontology</code> in the '''Use specified module name''' box. Make sure to create a new project for org.geneontology WITH A DIFFERENT NAME! If you plan to recompile org.geneontology and use the changes in OBO-Edit, you will need to set the "oboedit_library_path" ANT property for your project.
===Other optional libraries===
 
OBO-Edit uses some other libraries. These can also be downloaded and viewed in your workspace.  
 
The Jazzy-core library for spell-checking can be downloaded from http://jazzy.sourceforge.net/.
 
===Updating the Source Code via Subclipse===
# The source code for these projects is updated periodically. You have to update manually; Eclipse will not do this automatically.
# Right-click on the project name (e.g. OBO-Edit) in the Package Explorer and choose Team -> Update from the menu
# When the update is complete, right-click on the project name again and choose Refresh


==Getting the Source Code with Command-Line CVS==
==Getting the Source Code with Command-Line SVN==
Make sure that you have correctly installed [http://www.nongnu.org/cvs/ CVS] on your computer, and run the following commands:
Make sure that you have correctly installed [http://subversion.tigris.org/project_packages.html Subversion] on your computer, change to the desired parent directory and run the following commands:


===For anonymous CVS access===
<code>
<code>
  cvs -d:pserver:anonymous@geneontology.cvs.sourceforge.net:/cvsroot/geneontology login
  svn co https://geneontology.svn.sourceforge.net/svnroot/geneontology/java/oboedit/trunk OBO-Edit
cvs -z3 -d:pserver:anonymous@geneontology.cvs.sourceforge.net:/cvsroot/geneontology co -P go-dev/java/oboedit
<i>optional: cvs -z3 -d:pserver:anonymous@geneontology.cvs.sourceforge.net:/cvsroot/geneontology co -P go-dev/java/org.geneontology</i>
</code>
</code>


===For developer CVS access===
To check out the supporting projects, run these additional commands:
 
<code>
<code>
  export CVS_RSH=ssh
  svn co https://geneontology.svn.sourceforge.net/svnroot/geneontology/java/bbop/trunk BBOP
  cvs -z3 -d:ext:username@geneontology.cvs.sourceforge.net:/cvsroot/geneontology co -P go-dev/java/oboedit
  svn co https://geneontology.svn.sourceforge.net/svnroot/geneontology/java/obo/trunk OBO
</code>
</code>


==Running OBO-Edit From Eclipse==
==Running OBO-Edit From Eclipse==


In order to run the application you need to link the oboedit and org.geneontology sections. To do this right-click the oboedit package. Choose properties, then build path and then the package tab. You can then browse to your workspace and choose the org.geneontology folder. Click ok.
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:
 
[[Image:oboedit-eclipse-run-dialog.jpeg]]
 
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.
 
[[Image:oboedit-eclipse-libraries.jpeg]]
 
==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:
 
* http://sourceforge.net/project/admin/svn.php?group_id=36855
 
(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/


When you run OBO-Edit you need to assign the amount of memory it will use. To do so choose menu item 'run' and then 'run' from the  
==Getting older (pre-b14) versions of the OBO-Edit2 source code==
menu. Then fill in the following parameter in the VM arguments box according to the amount of memory in your computer:


[[Image:run_options.jpeg]]
See [[OBO-Edit:_Getting_Old_Source_Code_from_CVS]]
[http://www.rushessay.net rush essays]

Latest revision as of 15:27, 30 June 2014

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/servlets/ProjectProcess?pageID=p4wYuA 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!

Other optional libraries

OBO-Edit uses some other libraries. These can also be downloaded and viewed in your workspace.

The Jazzy-core library for spell-checking can be downloaded from http://jazzy.sourceforge.net/.

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 older (pre-b14) versions of the OBO-Edit2 source code

See OBO-Edit:_Getting_Old_Source_Code_from_CVS rush essays