Normally you would create a DocumentOperation and specify setInPopupMenu(true) in getActionOptions().
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?
Please sign in to leave a comment.
I am already using DocumentOperation for a menu bar triggered GUI, is it possible to have both?
Yes, you can set both on the same action options and the operation will appear in both places:
I meant that I wanted to have different GUIs for different actions, not triggering the same GUI with different actions.
Actually, to be more specific, how can I add a tab to the "Tree..." option, which is shown after right clicking an alignment?
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.
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?
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.
Perfect, thank you.