<extension
point="net.bioclipse.rhino.scripting">
<ScriptContribution
class="net.bioclipse.biomoby.ui.scripts.MobyServiceScripting"
id="net.bioclipse.biomoby.ui.scripts.MobyServiceScripting"
namespace="moby">
</ScriptContribution>
</extension>
The class must implement IScriptProvider and namespace is the desired namespace you like to have (see examples below). An example is the class net.bioclipse.biomoby.ui.scripts.MobyServiceScripting:
public class MobyServiceScripting implements IScriptProvider{
public void showMessage(String title, String message) {
MessageDialog.openInformation(
getShell(),
title,
message);
}
}
Now it's possible to issue commands in Bioclipse like the following:
moby.showMessage("wee", "how");
Very convenient in my opinion. This will be extensively used in the upcoming Bioclipse2, which currently is in design phase.
No comments:
Post a Comment