Back to Main Page

<br>

# Ideaology

To understand the reasoning behind the manner in which additions are added please see the Workbench Shell page.

All projects that wish to be added to the Workbench Shell must implement the IWorkbenchAddition interface. This interface is included in the WorkbenchUiCommon project; you'll need to add it as a dependency of your project. If you wish to interact with the central project structure in the future then you'll need to also add OntologyProjectCommon as a dependency of your project. This interface is still a work in progress, but these are the currently required methods. Note that they are presented in the order in which the Workbench Shell calls them.

• void setOntologyEditor(OntologyEditor ontologyEditor) - Passes the shared instance of the Ontology Editor to the addition. The addition now can do what it wants with it. If an addition does not need the Ontology Editor this method should do nothing.
• void initAsAddition() - method for initializing the method. This may be the same or different from the initialization method of the user interface when run stand alone.
• Component getMainComponent() - returns the main UI component to add. This component should function independently from the rest of the Workbench Shell.
• String getName() - returns the name that should appear on the tab when it is added.
• void openResource(Resource resource) - passes the resource a user selected to the addition so that is is aware of the user's selection. This method should open the resource if its capable.

<br>

Proposed methods include for interacting with the central project structure are:

void acceptProject(Project project) - passes the central project structure to the addition so that it is aware <br>

<br>

# Update pom.xml File

Add your project as a dependency in the pom.xml file of the WorkbenchShell so that the class path is updated.

<br>

<Addition label="Name on Menu" class="Fully qualified class path" ontologyeditor="true if the ontology editor is part of the addition, false otherwise"/>