[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools.gef] setting ContextMenu for TreeViewer
|
- From: gunjan_sir@xxxxxxxxx (Ved Gunjan)
- Date: Fri, 25 Mar 2005 16:21:53 +0000 (UTC)
- Newsgroups: eclipse.tools.gef
- Organization: not organized
- User-agent: NewsPortal/0.36 (http://florian-amrhein.de/newsportal)
hi!
This is with the reference of my previous post " Getting menu on right
click".
I have a SolutionExplorer view in my application which uses JFace
TreeViewer.
I want to register actions on the view (when the right click on it he/she
sholud get menu drop down).
I will have to do something like this...i guess
ContextMenuProvider provider = new LogicContextMenuProvider(getViewer(),
getActionRegistry());
getViewer().setContextMenu(provider);
getSite().registerContextMenu("org.eclipse.gef.examples.logic.outline.contextmenu",
//$NON-NLS-1$
provider, getSite().getSelectionProvider());
getViewer().setKeyHandler(getCommonKeyHandler())
viewer.setContextMenu(provider)
The above viewer is an EditPartViewer,but i have a TreeViewer of JFace.
So how can i do setContextMenu() on a TreeViewer.
Hope im able to convey my situation properly.
Thanking in advance for the suggestions.
Regards
Ved