Creating submenus does not work in SequenceAnnotationGenerator
class myplugin extends GeneiousPlugin{
public static final GeneiousActionOptions p=new GeneiousActionOptions("name","description").setMainMenuLocation(MainMenu.Tools);
}
class mygenerator extends SequenceAnnotationGenerator{
public GeneiousActionOptions getActionOptions() { return GeneiousActionOptions.createSubmenuActionOptions(myplugin.p, new GeneiousActionOptions(...));}
}
It will create an item "name" under "Tools", but the item is always disabled.
But the same method in my DocumentOperation to create submenus works.
Is there anything wrong?
-
Firstly, are you sure that you have selected some documents in Geneious which match the DocumentSelectionSignature from your SequenceAnnotationGenerator.getSelectionSignatures()?
0 -
Yes. If I do not use the submenu and directly create an item under "Tools", it is enabled.
0 -
That appears to be a bug in the API. I found a slightly ugly workaround though: add a divider to your submenu like this:
public static final GeneiousActionOptions p=new GeneiousActionOptions("name","description").setMainMenuLocation(MainMenu.Tools).addSubmenuDivider(0.6);
0 -
It will also be fixed if you have another DocumentOperation in the same menu.
0 -
Thanks very much!
0
Please sign in to leave a comment.
Comments
5 comments