DZone Forums
Go Back   DZone Forums > Community > Tools & IDEs > Eclipse
Reload this Page Register a Context Menu from a Dialog
Notices
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  (#1 (permalink)) Old
Member
 
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Nov 2009
Default Register a Context Menu from a Dialog - 11-17-2009, 03:08 PM

I currently have a wizard page that summarizes the actions that the wizard is about to perform in a table. I would like to add my Copy command to the context menu for this table.

I know how to register context menus when those menus exist in a view or editor
Code:
viewPart.getSite().registerContextMenu(menuManger, viewer)
and then associate Commands with that those menus.

However, a wizard page is not a view or editor part and therefore does not have a Site associated with it. Because of this I cannot register the context menu for the wizard page.

Is it possible to register this context menu so that I can contribute Commands to the menu via the Command, Menu and Handler extension points in the plugin.xml file?

If this is not possible, is the next best solution, to create an Action that invokes a Command via
Code:
handlerService.executeCommand()
and manually add the Action to the context menu in the wizard page?\

Any help would be greatly appreciated.

Thanks.
Reply With Quote
Reply

Tags
command, dialog, handler, menu, plugin.xml

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
To open modeless dialog from modal window sandeep.goel Usability 2 02-13-2010 08:51 PM
internationalize swing context menu short key text lchandra Eclipse 0 10-13-2009 02:46 PM
CellModifier does not work in JFace Dialog eazyigz@gmail.com Eclipse 4 06-25-2009 10:14 PM
Problem with deleting Items from the Context Menu of my RCP App. alwin74 Eclipse 0 07-30-2008 08:09 AM
Popup dialog box sync with workbench joesusai Eclipse 0 07-24-2008 12:59 AM


Copyright 1997-2009, DZone, Inc.
vBulletin Skin developed by: vBStyles.com