Contributing a data plugin to Bioclipse

From Bioclipse
Jump to: navigation, search
Development tutorial
Responsible author:Ola
Bioclipse version:N/A
"N/A" is not a number.
Last updated:2009-10-10
Tags:


A plugin can contribute installable data in three ways:

1. Use the install extension point from plugin net.bioclipse.data

This way you contribute folders and files to the WizardPage in the NewWizard: "New Sample Data Project". Simply use the extenion point in the following way:

<extension
     point="net.bioclipse.data.install">
     <folder 
     	name="2D structures"
     	description="Sample structures with 2D coordinates"
     	location="data/2DStructures"
     />
</extension>

Then locate your data to be installed in the folder specified by the location attribute. And that's it! Simple, right? For examples, see plugin net.bioclipse.data.sampledata.


2. Use the install extension point from plugin net.bioclipse.data and a dedicated NewWizard

Here you specify that you want a new Wizard as well, and reference this wizard in the net.bioclipse.data.install extension. Note that you do not need to write any code, simply change the id of the wizard and let the class point to net.bioclipse.data.wizards.NewDataProjectWizard. The example below is from plugin net.bioclipse.data.drugbank.

  <extension
     point = "org.eclipse.ui.newWizards">
	<wizard
          id = "net.bioclipse.data.drugbank.wizards.NewDrugbankProjectWizard"
          name = "New Drugbank Data Project"
          project="true"
          class="net.bioclipse.data.wizards.NewDataProjectWizard"
          category="net.bioclipse.data"
          icon="icons/drug_icon.gif">
          <description>Install a Project with sample data set</description>
          <selection class="org.eclipse.core.resources.IResource"/>
       </wizard>
</extension>

 <extension
     point="net.bioclipse.data.install">
     <folder 
     	name="DrugBank"
     	description="DrugBank database"
     	location="data/DrugBank"
     	wizard="net.bioclipse.data.drugbank.wizards.NewDrugbankProjectWizard"
 	    icon="icons/drug_icon.gif"/>
 </extension>



3. Write your own wizard

You're pretty much on your own here. See the net.bioclipse.data plugin for inspiration.