Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Context menu in a wizard
Context menu in a wizard [message #559323] Thu, 16 September 2010 11:53 Go to next message
Mohamed El Fantroussi is currently offline Mohamed El FantroussiFriend
Messages: 1
Registered: December 2009
Junior Member
Hi all,

i'd like to register a context menu on a wizardPage. I cannot find the right solution to do that, and google didn't help me.

I'm using this kind of code to register the menu in a view :

MenuManager menuManager = new MenuManager();
menuManager.add(new Separator("mySeparator"));
tableViewer.getTable().setMenu(menuManager.createContextMenu(tableViewer.getTable()));
getSite().registerContextMenu(menuManager, tableViewer);
getSite().setSelectionProvider(tableViewer);


I thought i could use the same technique, but i cannot find the equivalent of getSite() method whnen i'm on a dialogpage.

I tried :
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActivePart().getSite().registerContextMenu(menuManager, tableViewer);


but it's not successful: it display a popup menu but it does not contain the right elements.

Hope you can help me.
Thanks a lot.

wacho.
Re: Context menu in a wizard [message #559337 is a reply to message #559323] Thu, 16 September 2010 12:06 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

What are you trying to have filled in? i.e. what menu items do you
think you are missing. You can't register a wizard context menu against
a part, it doesn't work.

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Previous Topic:Graphical library for fancy effects
Next Topic:How to add my own annotation column to the left ruler of editor
Goto Forum:
  


Current Time: Thu Apr 25 21:49:33 GMT 2024

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

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

Back to the top