view action delegate with sub menu ... [message #332277] |
Thu, 16 October 2008 08:22  |
Eclipse User |
|
|
|
Hi all,
I need to implement a view action that will display, as a submenu, a list of
actions when selected ... the action comes from extension point (view action
delegate)
VIEW CONTEXT MENU
________________
- Action 1
- Action 2
- List Action
- sub action a
- sub action b
- sub action c
- sub action d
- Action 3
I'll try to describe what I need to do ...
I have a list of names that I know at runtime ...
When I select an item in my view I would like to see in the context menu my
"List Action" action with a submenu that will list the actions (each one
named with the name I read when the application when it starts ...)
I have found a way to do this via a normal action (jface.action) where I can
override the setMenuCreator (with IMenuCreator) ...
But what shall I do here ...
This action is contributed to my view from a fragment so I cannot directly
add the action to the context menu and I cannot create in the
Any suggestion, or a better approach will be appreciated.
Thanks
Kar
<fragment>
<extension
point="org.eclipse.ui.popupMenus">
<viewerContribution
id="org.eclipse.ui.articles.action.contribution.popup.navigator "
targetID="com.xxx..views.DBView">
<action
class=" org.eclipse.ui.articles.action.contribution.ViewAction1Deleg ate "
icon="icons/command.gif"
menubarPath="additions"
id=" org.eclipse.ui.articles.action.contribution.navigator.action 1 "
label="View Action 1">
</action>
<menu
id=" org.eclipse.ui.articles.action.contribution.navigator.subMen u "
label="View Sub Menu"
path="additions">
<separator
name="group1">
</separator>
</menu>
....
....
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.08802 seconds