Wiki Markup |
---|
Download and unzip the |
...
Copy the template folder to IGB source plugins folder
Update files:
1. Change the plugin name from 'SamplePlug' to your customized name such as 'MyPlugin' (your plugin name)
...
template file [^SamplePlugin.zip] Copy the template folder to IGB source plugins folder !Screen shot 2013-02-13 at 10.42.28 AM.png|border=1! Update files: 1. Change the plugin name from 'SamplePlug' to your customized name such as 'MyPlugin' (your plugin name) 2. Change the package from 'com.affymetrix.igb.sampleplugin' to your package name i.e. 'com.myorg.myplugin'. |
...
If you IDE does not support create folder directly you can do this from your Finder (MacOS) or Windows Explorer, the directory is IGB_HOME/plugins/MyPlug/src |
...
3. Expand src from your IDE until you see the Activator.java and SamplePlugin.java, update the 'SamplePlugin.java' to your plugin name and change |
...
all the necessary package declaration, class name and constructor(s). |
...
4. Update source code to build your own functions
For more detail refer to the Extension Points section
4. Update MAINFEST.BASE
Panel | |
---|---|
Wiki Markup | !Screen shot 2013-02-13 at 11.01.10 AM.png|border=1! 4. Update source code to build your own functions The sample code is to implement an annotation operation, so in the Activator.java it registers service for Alignment, Annotation and ProbeSet {code:title=Activator.java|borderStyle=solid} @Override protected ServiceRegistration<?>\[\] registerService(IGBService igbService) throws Exception { return new ServiceRegistration\[\] { bundleContext.registerService(Operator.class, new SamplePlugin(FileTypeCategory.Alignment), null), bundleContext.registerService(Operator.class, new SamplePlugin(FileTypeCategory.Annotation), null), bundleContext.registerService(Operator.class, new SamplePlugin(FileTypeCategory.ProbeSet), null) }; {code} } @Override protected ServiceRegistration<?>\[\] registerService(IGBService igbService) throws Exception { return new ServiceRegistration\[\] { bundleContext.registerService(Operator.class, new SamplePlugin(FileTypeCategory.Alignment), null), bundleContext.registerService(Operator.class, new SamplePlugin(FileTypeCategory.Annotation), null), bundleContext.registerService(Operator.class, new SamplePlugin(FileTypeCategory.ProbeSet), null) }; } For more detail refer to the [Extension Points|http://wiki.transvar.org/confluence/display/igbdevelopers/Bundles+and+Plug-Ins#BundlesandPlug-Ins-ExtensionPoints] section 4. Update MAINFEST.BASE {panel} Manifest-Version: 1.0 Bundle-ManifestVersion: 2<span style=" {color: #ff0000 ">Bundle-Name</span><span style="color: #000000">: MyPlugin</span>
<span style="color: #ff0000">Bundle-SymbolicName</span><span style="color: #000000">}Bundle-Name{color}{color:#000000}: MyPlugin{color} {color:#ff0000}Bundle-SymbolicName{color}{color:#000000}: com.myorg.myplugin.MyPlugin</span> <span style=" MyPlugin{color} {color: #ff0000 ">Bundle-Version</span><span style="color: #000000">}Bundle-Version{color}{color:#000000}: 0.0.9</span> <span style=" 9{color} {color: #ff0000 ">Bundle-Activator</span><span style="color: #000000">:</span> <span style="color: #000000">com.myorg.myplugin</span><span style="color: #000000">.Activator</span>
<span style="color: #000000">Bundle-ActivationPolicy: lazy</span>
<span style="color: #000000">Bundle}Bundle-Activator{color}{color:#000000}:{color} {color:#000000}com.myorg.myplugin{color}{color:#000000}.Activator{color} {color:#000000}Bundle-ActivationPolicy: lazy{color} {color:#000000}Bundle-RequiredExecutionEnvironment: JavaSE-1.6</span> <span style=" 6{color} {color: #000000 ">Bundle}Bundle-Description: Plugin to allow the user to create a plugin astemplate</span> template{color} Bundle-DocURL: [http://wiki.transvar.org]<span style=" {color:#ff0000"><a href=" #ff0000}[http://wiki.transvar.org">http://wiki.transvar.org</a></span> <span style="color: #ff0000">Import-Package</span> ]{color} {color:#ff0000}Import-Package{color}: com.affymetrix.common;version="\[ (appVersion), (appVersion)\]", com.affymetrix.genometryImpl, com.affymetrix.genometryImpl.operator, com.affymetrix.genometryImpl.symmetry, com.affymetrix.genometryImpl.parsers, com.affymetrix.igb.osgi.service, org.osgi.framework;version="1.5.0", org.osgi.util.tracker;version="1.4.0" {panel} Bundle-Name - change to your plugin name i.e. MyPlugin |
...
Bundle-SymbolicName - change to your package path i.e. com.myorg.myplugin.MyPlugin |
...
Bundle-Version - change to your plugin version |
...
Bundle-Activation - change to your Activator path i.e. com.myorg.myplugin.Activator |
...
Import-Package - include all the classes your are using in your source code |
...
5. Update ant.properties |
...
Panel |
---|
name=MyPlugin project=MyPlugin classpath=$ {panel} {color:#ff0000}name{color}{color:#000000}=MyPlugin{color} {color:#ff0000}project{color}{color:#000000}=MyPlugin{color} {color:#ff0000}classpath{color}{color:#000000}=$\{igb_service\}/build:$\{window_service\}/build:$\{common\}/build:$\{igb\}/build:$\{genometry\}/build:$\{genoviz\}/build:$\{osgi.impl} \}{color} {color:#000000}plugin-jar=true |
...
{color} {panel} Change the 'name' and 'project' to your plugin name i.e. MyPlugin |
...
Update the 'classpath' with necessary path, refer to project build.xml for the location annotations. |
...
6. Update project's build.properties |
...
On the line 'not.include.bundles=', delete all the existing values and add your plugin name: |
...
{panel |
} not.include.bundles=MyPlugin |
Clean and Build IGB
...
{panel} Clean and Build IGB Delete files in IGB_HOME/plugins/ext |
...
In command line, go to IGB_HOME, run command |
...
{panel |
} antexternalBundles |
Enter your svn password as necessary
...
externalBundles {panel} Enter your svn password as necessary Move the generated files in IGB_HOME/plugins/ext (MyPlugin.jar and repository.xml) to the folder (local or remote HTTP server) where you want your plugin site on |
...
Make sure you are cut from IGB_HOME/plugins/ext (or delete it after copying) |
...
Run IGB \-> "Plug-ins' tab |
...
Click 'Repositories...' button to open the Plugin configuration panel |
...
Enter the name you want to name, this can be any name you like since it will only show in the plugin site list |
...
Enter the URL for your remote server such as [http://www.mysite.com/my_plugin_folder |
...
OR
...
] OR Click '...' button to select the folder in local machine |
...
Click 'Add Repository' button and now you should see your plugin site is added into the site list, also your plugin MyPlugin is showing in the Plug-ins tab in IGB after close the configuration panel |