Developing FrameAction Plugins for the OWL Plugin

A FrameAction is an Action that can appear in a "right-click" context menu of a selected class, property or individual. This type of plugin basically allows you to add arbitrary items to the menus. For example, if the user right-clicks on a class in the classes tree, then the menu will include customized actions, if the action tells the system that it is suitable for the selected class.

FrameAction plugins need to subclass the class edu.stanford.smi.protegex.owl.ui.actions.FrameAction. The most important step here is to implement the isSuitable method, which determines dynamically whether the action should appear in the menu of the selected item in the given surrounding component. Next, the actionPerformed method must be implemented that "does" the action. In this method you can access the currently selected item using getFrame(), and the current component using getComponent().

For each FrameAction plugin that the system shall use, you must add an entry to the local manifest file like in the following example:


Name: edu/stanford/smi/protegex/owl/ui/search/SearchNamedClsAction.class
FrameAction: True