Skip to content

protegeproject/protege-plugin-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 

Repository files navigation

protege-plugin-examples

This repository contains example code for developing a tab, view, or menu plug-in for the Protege Desktop ontology editor (versions 5.0.0 and higher). The Maven POM file in the top-level directory demonstrates one possible method for packaging plug-in code into the required OSGi bundle format using the Maven Bundle Plugin.

Prerequisites

To build and run the examples, you must have the following items installed:

  • Apache's Maven.
  • A tool for checking out a Git repository.
  • A Protege distribution (5.0.0 or higher). The Protege 5.2.0 release is available from the main Protege website.

Build and install example plug-ins

  1. Get a copy of the example code:

     git clone https://github.com/protegeproject/protege-plugin-examples.git protege-plugin-examples
    
  2. Change into the protege-plugin-examples directory.

  3. Type mvn clean package. On build completion, the "target" directory will contain a protege.plugin.examples-${version}.jar file.

  4. Copy the JAR file from the target directory to the "plugins" subdirectory of your Protege distribution.

View example plug-ins in Protege

Launch your Protege distribution. Select About from the Help menu to verify successful installation:

Protege Desktop About box

The examples bundle contains:

  • Two custom tabs - "Example Tab" and "Example Tab (2)". Enable either tab via the Window | Tabs menu.
  • One custom view - "Example view component". If you enabled the Example Tab in the previous step, the Example view component will be visible on the right-hand side. Alternatively, you can enable the view via Window | Views | Ontology views.
  • Several custom menu items. Expand the Tools menu to see the custom menu items.
  • A custom top-level menu - "Example Menu". The custom top-level menu appears in the main menu bar between the Server and Tools menus. Select Example Menu to see several submenu items.

Example plug-in screenshots

Example Tab and Example view component:

Example Tab (2):

Example menu items:

Example menu:

Questions

If you have questions about developing Protege plug-ins, please navigate to the main Protege website and subscribe to the Protege Developer Support mailing list. After subscribing, send messages to protege-dev at lists.stanford.edu.