...
Open Activator.java and update the code with your package declaration as well as occurrences of your plug in class name. The sample code implements an annotation operation, so the Activator.java registers service for Alignment, Annotation and ProbeSet. The new Your plugin class name is "MyPlugin" inserted in the file as shown in the following code, as "MyPlugin".
Code Block | ||||
---|---|---|---|---|
| ||||
@Override protected ServiceRegistration<?>\[\] registerService(IGBService igbService) throws Exception { return new ServiceRegistration\[\] { bundleContext.registerService(Operator.class, new MyPlugin(FileTypeCategory.Alignment), null), bundleContext.registerService(Operator.class, new MyPlugin(FileTypeCategory.Annotation), null), bundleContext.registerService(Operator.class, new MyPlugin(FileTypeCategory.ProbeSet), null) }; } |
For more options refer to the Extension Points section
Step 6. Update SamplePlugin.java: Open SamplePlugin.java in the same /src directory. Start by updating the class with your plugin name (e.g. MyPlugin), your package declarations , your class name and constructor(s). Overriding getDisplay() sets the display name in IGB (e.g. "My Operation"). This sample code inherits AbstractAnnotationOperator and implements Operator interface to work as a new annotation operation. For more options refer to the Extension Points section.
Code Block | ||||
---|---|---|---|---|
| ||||
public class MyPlugin extends AbstractAnnotationOperator implements Operator { MyPlugin(FileTypeCategory category){ super(category); } @Override public String getName() { return this.category.toString().toLowerCase() +"_my_plugin"; } @Override public String getDisplay() { return "My Operation"; } private boolean overlap(BioSeq aseq, SeqSymmetry s0, SeqSymmetry s1) { } @Override public SeqSymmetry operate(BioSeq aseq, List<SeqSymmetry> symList) { } } |
...
Change name and project to your plugin name. Update classpath with the necessary path; refer to the project build.xml for the location annotationsactual paths listed, i.e. the path for igb_service or windows_service.
6. Update build.properties for the project (not the one in plugin folder)
...