...
- 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
- In the Project Explorer - blank area, right-click
- New > Project ... > Plug-in Project > "Next >" button
- Project name: "HelloWorld"
- "Next >" button
- Version: "1.0.0"
- check "Generate an activator ..."
- Activator
helloworld.Activator
- Rich Client Application click "No"
- "Next >" button
- Uncheck "Create a plug-in using one of the templates"
- "Finish" button
- Under the new HelloWorld project, find the META-INF directory, and open the MANIFEST.MF file by double-clicking on it.
- Click on the "Dependencies" tab,
- in the "Required Plug-ins" box, highlight org.eclipse.core.runtime, and click the "Remove" button on the right.
- next to the "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. - Do the same for
org.osgi.framework
(there may be a version number in parentheses after the name).
- Right click on the blank area at the top, next to "Dependencies" and
- a context menu comes up, click "Save".
- Open the Activator.java file under src/helloworld
- 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
- Save the file
- In the Project Explorer
- 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.
- The HelloWorld_1.0.0.jar file will be in the plugins directory under the directory the you specified. This is your bundle
- In the HelloWorld's 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 .
The arguments to bindex.jar are:
-n IGB which tells IGB...
-r repository.xml: Creates the file repository.xml with information about the plugin. this information is used by the IGB client to load the plugin from a web server.
- where IGB_HOME is your IGB directory.
- Now, if you can access your plugins directory from a local web server, you can open up the Plug ins tab in IGB
- (http://wiki.transvar.org/confluence/display/igbman/IGB+Tabbed+Panels#IGBTabbedPanels-PluginsPanel)
- click on the "Repositories..." button on the lower right
- Click the "Add..." button
- put the URL for your local plugin directory, fill in the name with whatever you want.
- Click the "Add Server" button
- close the Preferences popup
- You should now see your Hello World plugin.
- 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"
- Congratulations!
...