Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » TreeViewer context menu does not show up
TreeViewer context menu does not show up [message #921737] Mon, 24 September 2012 11:38 Go to next message
Christian Eugster is currently offline Christian EugsterFriend
Messages: 203
Registered: July 2009
Location: St. Gallen Switzerland
Senior Member
Hi,

I have some problems using a context menu in a treeViewer. I follow the readings of Vogella, added two commands, the respective handlers, and a MPopupMenu with the respective Handled MenuItems to the part containing the treeViewer in the Application.d4xmi.

In the coded part I injected the EMenuService and added the code as explained by Vogella:

menuService.registerContextMenu(viewer, "popupmenu");

where "popupmenu" is the id of MPopupMenu in the model.

Am I missing something?

Thanks!
Re: TreeViewer context menu does not show up [message #921832 is a reply to message #921737] Mon, 24 September 2012 13:22 Go to previous messageGo to next message
Christoph Keimel is currently offline Christoph KeimelFriend
Messages: 482
Registered: December 2010
Location: Germany
Senior Member
Hi Christian,

Three questions:
a) Is your MPopupMenu in the model after startup?
b) As child of the part where your viewer is located?
c) With the correct id ("popupmenu")?

You can check by using the Live-Model-Editor to check it during runtime.

1) You need to add some bundles to your product:
- org.eclipse.e4.tools.emf.liveeditor
- org.eclipse.e4.tools.emf.ui
- org.eclipse.e4.tools.emf.ui.script.js
and the required plug-ins
2) After you start the product like this, press Alt-Shift-F9

Hope this helps!
Christoph
Re: TreeViewer context menu does not show up [message #922099 is a reply to message #921832] Mon, 24 September 2012 18:36 Go to previous message
Christian Eugster is currently offline Christian EugsterFriend
Messages: 203
Registered: July 2009
Location: St. Gallen Switzerland
Senior Member
Hi Christoph,

thank you for resolving this. My real id was much longer and had indeed a typo.

Christian
Previous Topic:How to hook the "About" menu on Mac
Next Topic:Juno build trouble
Goto Forum:
  


Current Time: Fri Apr 26 15:39:05 GMT 2024

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

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

Back to the top