In this note I will describe two methods of checking out Protege 4 Plugin Projects into eclipse: (9O2)
The former is recommended if you want to debug the plugin project that you are checking out. The second is recommended if you are checking out a library such as org.protege.common or owlapi. (9NZ)
Checking Out Bundles with Sources (9O0)
For the purposes of this note I will assume that eclipse has been configured to include subversion. Go to the “Subversion Repository Exploring” perspective and check out the project. (9O1)
In the checkout screen use the “Check out as a project configured using the New Project Wizard” option (the default) and click finish. A new wizard comes up to configure the new project. (9O6)
{nid 9O7}= (9OC)
Select “Plug-in Project” and go through the wizard screens. Many of the options will end up getting ignored becaused the files checked out from subversion overwrite the options configured by the wizard. This is actually a good thing. There is a scary dialog that you confirm. (9O8)
When the plugin is imported, I need to look at the problems view. In this case there are several problems because eclipse is not finding the project jars. There are two things that I need to do at this point. First I need to include the libraries that come with this plugin project. (9OA)
Second I need to create and include all the projects that this plugin project depends on. To find out what these are I look at the manifest for the project. (9OD)
Four of these projects need to be checked out following the directions on this page: (9OF)
- owlapi and org.protege.common probably need to be checked out as binary projects. (9OG)
- org.protege.editor.core.application and org.protege.editor.owl - I would check these out as source projects. (9OH)
The other two dependencies, org.eclipse.equinox.registry and org.eclipse.equinox.common, are particularly easy because in the "Plugin Development Perspective" eclipse provides a view allowing quick import. (9OI)
This removes the errors and you have the project in eclipse. (9OK)
Importing Out Binary Bundles (9OL)
The owlapi bundle is an example of a bundle that is not very amenable to being checked out as sources. First of all the sources for the owlapi are binary themselves (the jar files from the owl api). Second of all the owlapi bundle is built in a way that eclipse does not understand. So we will use this as an example of a bundle that we import as a binary file. To import the binary file, click on the File menu and select “Import”. A wizard dialog will show and then select “Plug-ins and Fragments”. (9OM)
In the next screen, (9OO)
- set the plug-in location to be the directory that contains the binary distribution of the bundle, (9OP)
- set the plug-ins to import to be the selected ones and (9OQ)
- import as a binary project. (9OR)
Then in the final screen add the plug-ins that you want to import and click finish. (9OT)
At this point I also like to check out the entire protege-standalone project as a command line project and configure the build file to use the sources that I have just checked out with eclipse. This will allow the developer to build a standalone project from the build script while being aware of any changes made within eclipse. But this is purely optional. The how to for this is described on the page (9OV)