...
- Now, compile and jar these files into MyTransformer.jar (the jar command has a -m option for the manifest file).
- At this point, you want to put your jar into a web server using OBR (see above).
- To add the plugin to a web server without OBR, in the plugins directory, from the command line run
java -cp IGB_HOME/igb_server/lib/bindex.jar -jar bindex.jar -n IGB -q -r repository.xml .
- where IGB_HOME is your checked-out copy of the genoviz-trunk repository from Sourceforge.net.
- this will create a repository.xml file listing all the bundles and their requirements.
- make sure the repository.xml file and the bundles directory are accessible to the web server.
- in IGB, open the File>Preferences page, Plugin Repositories tab
- click the Add ... button at the bottom
- enter the web server URL for the directory that has the repositories.xml file that you created - you can use whatever you want for the name.
- Click the "Add Server" button
- close the Preferences page.
- Open the Plugins tab
- you should see your bundle in the table, click on the install checkbox.
- Once you have installed your bundle, select a graph track on the main view, and open the Graph Adjuster tab. Now if you click on the Transformation drop down, you will see
MyTransformer
in the list. Select it and click theGo
button, and you will see a new track using your bundle.
To create plug-ins using
...
Eclipse
See the Quick-Start Guide
...
Eclipse (http://www.eclipse.org) makes it a lot easier to develop bundles. You can create a new project
as a plug in project, and it will give you wizards, etc. for development. see:http://www.vogella.de/articles/OSGi/article.html
(using eclipse Helios)
- Check out IGB from https://genoviz.svn.sourceforge.net/svnroot/genoviz/trunk into a new directory - we will refer to the project directory below as IGB_HOME.
- open a command prompt in IGB_HOME, run "svn co https://genoviz.svn.sourceforge.net/svnroot/genoviz/trunk"
- in eclipse, project explorer, "File>Import"
- in the Import popup, under "General", select "Existing Projects into Workspace"
- "Next >" button
- make sure "Select root directory:" is selected, and fill in the IGB_HOME directory
- click the "Finish" button
- Open a command prompt in IGB_HOME, and do an "ant clean" and "ant jar"
- Make sure Eclipse is displaying the Project Explorer Tab. (If not, click View>Show View>Project Explorer.)
- In Eclipse, Project Explorer, right click the IGB project and select "refresh."
- In Eclipse, Project Explorer, right click on open space, and select "Import..." > "Plug-ins and Fragments" under "Plug-in Development", click the "Next >" button
- under "Import From", select "Directory:"
- under "Plug-ins and Fragments to Import" select "Select from all plug-ins and Fragments"
- under "Import As" select "Binary Projects"
- for "Directory:", click the "Browse..." button and select the IGB_HOME/bundles, click the "OK" button
- click the "Next >" button
- under "Plug-ins and Fragments Found:", select affx_fusion, be.pwnt.jflow, BigWig, colt, org.apache.commons.codec, commons-net, freehep, image4j, jide, jlfgr, jython, log4j, picard, sam, swing-layout, and tribble
- click the "Add -->" button to add these all to "Plug-ins and Fragments to Import:", click the "Finish" button
- Ann's note: The user must have already installed the Eclipse Plug-in Development Environment, under "General" in the Help>Install New Software window.
- Do the following for the directories under IGB_HOME, genometryImpl, common, genoviz_sdk, igb, plugins/igb_service, plugins/window_service
- in eclipse, project explorer, right click on open space, and select "Import..."
- Select "Existing Projects into Workspace" under "General", click the "Next >" button
- click "Select root directory:" and click the "Browse..." button on the right
- select the project folder under IGB_HOME, and click "OK"
- click "Finish"
- note - you will find it easier to debug in eclipse if you use the Debug project. You can add the Activator for your bundle (whatever one you are developing) in com.affymetrix.igb.debug.Debug, in the static statement at the top. Choose Run>Debug>Debug As Then on Debug, you can "Debug As" "Java Application", and
this will run IGB using a dummy OSGi implementation, so that you can easily step through code, set breakpoints, etc. Please explain in more detail.** import the "debug" project** The benefit of this is that Eclipse will be able to compile as you go.** right-click Debug Configure Build Path ,c change it to always put every resource path
Sample plug-in using eclipse
...
- New > Project ... > Plug-in Project > "Next >" button
- Project name: "HelloWorld"
- On "Target Platform" select "an OSGi framework".Select "standard" on the drop down box beside "an OSGi framework" radio button.
- "Next >" button
- Version: "1.0.0"
- check "Generate an activator ..."
- Activator
helloworld.Activator
- "Next >" button
- Uncheck "Create a plug-in using one of the templates"
- "Finish" button
...
- On "Imported Packages" box, click the "Add..." button, in the "Package Selection" popup in the text box, enter
com.affymetrix.genoviz.util
and click the "OK" button.
...
- a context menu comes up, click "Save".
...
- add the import statement
import com.affymetrix.genoviz.util.ErrorHandler;
- at the top, and add the line
ErrorHandler.errorPanel("Hello World");
- at the end of the start() method, and
ErrorHandler.errorPanel("Goodbye World");
- at the end of the stop method
...
- Right click the HelloWorld project
- > "Export ..."
- "Deployable plug-ins and fragments"
- "Next >" button
- Under "Available Plug-ins and Fragments:", check only Hello World
- "Directory:" use any directory you like
- click the "Finish" button.
...
run_igb -install_bundle
file:/
<bundle_directory>/plugins/HelloWorld_1.0.0.jar
(Windows)./run_igb.sh -install_bundle
file:/
<bundle_directory>/plugins/HelloWorld_1.0.0.jar
(Mac and Linux)- where IGB_HOME is your IGB directory, and <bundle_directory> is the directory that you specified
in the export
...
- If you install the plugin you will see an Error popup "Hello World"
- When you uninstall the plugin, you will see an Error popup "Goodbye World"
...
To create plug-ins using NetBeans
...