Difference between revisions of "SetUpEclipseForPlugin"
Line 13: | Line 13: | ||
== Setting up Eclipse == | == Setting up Eclipse == | ||
− | + | === Step 1. Create a new Java Project === | |
+ | Start Eclipse. | ||
Go to ''File Menu -> New -> Project'' -> Select ''Java Project''. Click ''Next''. In the next panel choose a project name, say "HelloWorldTab". The screen should look like below: | Go to ''File Menu -> New -> Project'' -> Select ''Java Project''. Click ''Next''. In the next panel choose a project name, say "HelloWorldTab". The screen should look like below: | ||
Line 27: | Line 28: | ||
− | + | === Step 2. Configure the project build path === | |
This step assumes that you have Protege 3.x installed on your computer. This example assumes that Protege was installed in ''/work/protege/Protege_3.4'' (On Windows machines, the default installation directory would be something like ''C:\Program Files\Protege_3.4'') | This step assumes that you have Protege 3.x installed on your computer. This example assumes that Protege was installed in ''/work/protege/Protege_3.4'' (On Windows machines, the default installation directory would be something like ''C:\Program Files\Protege_3.4'') | ||
+ | |||
+ | Select the project name, ''HelloWorldTab', right click, select ''Build Path'' -> ''Configure Build Path...''. Switch to the ''Libraries'' tab. You should see an something like this: | ||
+ | |||
+ | |||
+ | [[Image:Eclipse_plugin_Config_build_path_empty.png]] | ||
+ | |||
+ | |||
+ | Click on '''Add External JARs...''' and go to the Protege installation directory. Select from there the: | ||
+ | *protege.jar | ||
+ | *looks-2.1.3.jar (version may vary) | ||
+ | |||
+ | Click ''OK''. | ||
+ | |||
+ | If your plug-in is for OWL, you will need to include also all the jars in the protege-owl plug-in folder. Repet the same operation: Click ''Add External Jars'', go to the ''Protege installation directory/plugins/edu.stanford.smi.protegex.owl'' and select all the jar files in that directory. | ||
+ | |||
+ | ''Note'' If your plug-in depends on other plug-ins (e.g., on the Change Management plug-in), then you need to add to the build path also all the jars in that plug-in folder. |
Revision as of 16:33, March 19, 2009
Contents
Setting up Eclipse for plug-in development
This page is intended for people who want to develop their own plug-in (e.g., tab widget, slot widget, project plug-in, etc.) and who use Eclipse as their Java development environment. This is a step-by-step guide that shows the setup of the Eclipse environment using screen shots. We will use as an example the scenario in which a developer wants to create a tab widget that displays "Hello World!". These steps can be used for developing any plug-in type.
Prerequisites
Before we start, make sure that you have the latest version of Protege 3.x and Eclipse installed.
- Download and install Eclipse from here.
- Download and install latest version of Protege 3.x from here. Let's say you have installed Protege in:
Setting up Eclipse
Step 1. Create a new Java Project
Start Eclipse. Go to File Menu -> New -> Project -> Select Java Project. Click Next. In the next panel choose a project name, say "HelloWorldTab". The screen should look like below:
Click Finish. Congratulations! You have created an empty Java project. Your screen should look like:
Step 2. Configure the project build path
This step assumes that you have Protege 3.x installed on your computer. This example assumes that Protege was installed in /work/protege/Protege_3.4 (On Windows machines, the default installation directory would be something like C:\Program Files\Protege_3.4)
Select the project name, HelloWorldTab', right click, select Build Path -> Configure Build Path.... Switch to the Libraries tab. You should see an something like this:
Click on Add External JARs... and go to the Protege installation directory. Select from there the:
- protege.jar
- looks-2.1.3.jar (version may vary)
Click OK.
If your plug-in is for OWL, you will need to include also all the jars in the protege-owl plug-in folder. Repet the same operation: Click Add External Jars, go to the Protege installation directory/plugins/edu.stanford.smi.protegex.owl and select all the jar files in that directory.
Note If your plug-in depends on other plug-ins (e.g., on the Change Management plug-in), then you need to add to the build path also all the jars in that plug-in folder.