Skip to main content



      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 07:38 Go to next message
Eclipse UserFriend
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 09:22 Go to previous messageGo to next message
Eclipse UserFriend
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 14:36 Go to previous message
Eclipse UserFriend
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: Wed Jul 23 10:50:50 EDT 2025

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

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

Back to the top