How to trigger a plugin by right clicking listed items
I am trying write a plugin that is triggered by right clicking listed items and select the option that I will be adding. Is there any documentation on doing that? How should I go about doing this?
Thank you,
Mark
-
http://assets.geneious.com/developer/geneious/javadoc/latest/overview-summary.html#faqAddMenuBar
Normally you would create a DocumentOperation and specify setInPopupMenu(true) in getActionOptions().
0 -
I am already using DocumentOperation for a menu bar triggered GUI, is it possible to have both?
0 -
Yes, you can set both on the same action options and the operation will appear in both places:
actionOptions.setInPopupMenu(true).setMainMenuLocation(GeneiousActionOptions.MainMenu.Tools);
0 -
I meant that I wanted to have different GUIs for different actions, not triggering the same GUI with different actions.
0 -
Actually, to be more specific, how can I add a tab to the "Tree..." option, which is shown after right clicking an alignment?
0 -
Ah ok, in that case you should return two operations from GeneiousPlugin.getDocumentOperations().
To have an operation appear under Tree you have to use the 4 parameter version of the GeneiousActionOptions constructor in your getActionOptions method. You should then pass Category.TreeBuilding as the forth parameter.
0 -
Thank you very much, it works perfectly. On a side note, i noticed that Geneious has updated to version 9.1.2, but when I run my plugin on eclipse, it launches version 9.0.4, where should I modify so it would be tested on the latest version?
0 -
The dev kit has a copy of Geneious bundled inside it so to upgrade you have to download the latest dev kit and move your code over.
0 -
Perfect, thank you.
0
Please sign in to leave a comment.
Comments
9 comments