Search Mailing List Archives
[p4-feedback] How to get hold of the menubar from a plugin?
sielists at gmail.com
Tue Apr 20 15:08:44 PDT 2010
Thanks for the link. However, I still can't figure out how I can add a
custom JMenuItem/JMenu (JCheckBoxMenuItem in this case) from my
EditorKitMenuAction extension to the menu bar without modifying one of
the core managers. Is there an easier way for doing this?
Timothy Redmond wrote:
> Also there is another link .
>  http://protegewiki.stanford.edu/wiki/PluginAnatomy#Adding_Menu_Plugins
> On 04/19/2010 09:27 AM, Matthew Horridge wrote:
>> Hi Shahim,
>> You should add extra menu items as plugins in their own right  rather than fiddling with other bits of the GUI that might or might not be there when your plugin is initialised. I can't remember off the top of my head, but it might be that you can't add a checked menu item (just a plain one). If this is the case then this new plugin type should be added by the Protege developers.
>> On 19 Apr 2010, at 00:55, Shahim Essaid wrote:
>>> Hi all,
>>> I am trying to add a JCheckBoxMenuItem to a menu from a plugin. How can I get hold of the WorkspaceFrame menu bar from a plugin (especially action plugins) in P4.1 when a plugin is being instantiated or initialized?
>>> I tried ProtegeManager.getInstance().getFrame(ws) from initialise() in an action plugin but the ProtegeManger still dosen't have the WorkspaceFrame by this point.
>>> I see that the Workspace has a initialiseExtraMenuItems(JMenduBar mb). It would be nice if there is a listener for this so plugins can do some extra menu setup when this is called. Also, I notices that there are no Protege-specific listeners in Workspace, WorkspaceFrame, WorksspaceManager or ProtegeManager that could be used by plugins to do any customization. Are there plans to add few listeners to these classes?
>>> Thank you,
>>> Shahim Essaid
>>> p4-feedback mailing list
>>> p4-feedback at lists.stanford.edu
>> p4-feedback mailing list
>> p4-feedback at lists.stanford.edu
> p4-feedback mailing list
> p4-feedback at lists.stanford.edu
More information about the p4-feedback