Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Getting weird error when context menu is opened
Getting weird error when context menu is opened [message #143306] Mon, 13 October 2003 20:06
Eclipse UserFriend
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
Previous Topic:schema based extension
Next Topic:Help! Cannot cast Selection to anything useful
Goto Forum:
  


Current Time: Wed Jan 15 05:15:44 GMT 2025

Powered by FUDForum. Page generated in 0.25213 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top