Getting weird error when context menu is opened [message #143306] |
Mon, 13 October 2003 20:06 |
Eclipse User |
|
|
|
Originally posted by: mharp.seapine.com
I have a ViewPart, where I created a context menu for it like this...
MenuManager menuMgr = new MenuManager();
org.eclipse.swt.widgets.Menu menu = menuMgr.createContextMenu(
m_tableview.getTable());
menuMgr.addMenuListener(
new IMenuListener() {
public void menuAboutToShow(IMenuManager menuMgr)
{
menuMgr.add(new Separator("group.file"));
menuMgr.add(new GetAction());
menuMgr.add(new DifferencesAction());
menuMgr.add(new RefreshAction());
}
});
menuMgr.setRemoveAllWhenShown(true);
m_tableview.getTable().setMenu(menu);
getSite().registerContextMenu(menuMgr, m_tableview);
Each of the actions I new is a subclass of my ViewPart class.
Whenever I right click thought, I get the following error in the cmd-line
window (running with -debug or whatever the flag is)
Context menu missing standard group
'org.eclipse.ui.IWorkbenchActionConstants.MB
_ADDITIONS'. (menu id =
com.seapine.surroundscm.eclipse.views.SSCMEHistoryView)
part id = com.seapine.surroundscm.eclipse.views.SSCMEHistoryView)
The menu id there is the id of the menu item that the user clicks on you
open the view in the first place (defined in plugin.xml). Do I have to
defined menu items for the view in the plugin.xml manifest? If so, where do
these go? The view element doesn't appear to support any kind of menu
sub-elements... The menu and all the actions work just fine, but I'd like to
get rid of this message if I can.
Thanks for any help you can provide.
-harpstein
|
|
|
Powered by
FUDForum. Page generated in 0.25213 seconds