1 follower Follow

more than one submenu



I have seen similar thread ( in the geneious forum. 


This was a good idea to use in order to save some space, however due to basic coding skills, I have bit of trouble implementing idea.

My code:

In the my main plugin class:

public GeneiousActionOptions getParentActionOptions() {
                       return new GeneiousActionOptions("Editing Options").setInMainToolbar(true,0);


In class1:

public GeneiousActionOptions getActionOptions() {

MyPlugin k = new MyPlugin();
GeneiousActionOptions parent = k.getParentActionOptions();
GeneiousActionOptions submenuItem1 = new GeneiousActionOptions("Edit");
GeneiousActionOptions sub1 = parent.createSubmenuActionOptions(parent, submenuItem1);

return (sub1);




In class2:

public GeneiousActionOptions getActionOptions() {

MyPlugin k = new MyPlugin();
GeneiousActionOptions parent = k.getParentActionOptions();
GeneiousActionOptions submenuItem2 = new GeneiousActionOptions("Add");
GeneiousActionOptions sub2 = parent.createSubmenuActionOptions(parent, submenuItem2);

return (sub2);


But I can see only one of these two. Is this possible the right way of sharing the parent option?

Thanks for your help.

Srikanth Duddela

Please sign in to leave a comment.

1 comment


All classes that use the parent option must use the exact same instance of the parent options (eg. a singleton). This can easily be done with a static field. In your plugin class:

`public static final GeneiousActionOptions PARENT_OPTIONS = new GeneiousActionOptions("Editing Options").setInMainToolbar(true,0);`

Then in your other classes:

`GeneiousActionOptions sub1 = GeneiousActionOptions.createSubmenuActionOptions(MyPlugin.PARENT_OPTIONS, submenuItem2);`

Richard Moir 0 votes
Comment actions Permalink