Skip to main content



      Home
Home » Eclipse Projects » Eclipse 4 » Unable to display context (popup) menu for TreeViewer
Unable to display context (popup) menu for TreeViewer [message #1057821] Thu, 09 May 2013 00:33 Go to next message
Eclipse UserFriend
I am new to Eclipse 4, so need help here.

1) I created a Popup Menu under a Part using ApplicationModel.

2) I have created a TreeViewer in this part. The TreeViewer contents are displaying fine.

3) Registered Popupmenu with MenuService instance using

menuService.registerContextMenu(myTreeViewer,Id);

Id here is the id of pop menu from application model.

4) I now run the application but cannot see the popup menu coming up on right click.

Am I missing something ? I did use Alt-Shift-F9 to confirm that popup menu is part of application model.

Re: Unable to display context (popup) menu for TreeViewer [message #1057877 is a reply to message #1057821] Thu, 09 May 2013 09:54 Go to previous messageGo to next message
Eclipse UserFriend
S Ron wrote on Thu, 09 May 2013 06:33

menuService.registerContextMenu(myTreeViewer,Id);


Try this instead:
menuService.registerContextMenu(myTreeViewer.getControl(),Id);
Re: Unable to display context (popup) menu for TreeViewer [message #1057949 is a reply to message #1057877] Thu, 09 May 2013 22:46 Go to previous message
Eclipse UserFriend
Thank you, that worked I had to add getControl().
Previous Topic:Editor pane tab display policy
Next Topic:How can a member variable be initialized and updated with the @Preference annotation?
Goto Forum:
  


Current Time: Fri Jul 04 12:02:21 EDT 2025

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

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

Back to the top