How to add sub-menu to context menu on Sychronize view. [message #309804] |
Thu, 09 November 2006 09:33  |
Eclipse User |
|
|
|
Originally posted by: priya_kothari.persistent.co.in
Hi,
I am implementing the Team Synchronization featire for a SCM. I want to add
my custom menu as the context menu (pop-up menu) of the synchronize view. I
am able to add simple actions using appendToGroup(
ISynchronizePageConfiguration.P_CONTEXT_MENU,
CONTEXT_MENU_CONTRIBUTION_GROUP, new TeamActionDelegate(new myAction(),
configuration)); in this class that extends SynchronizePageActionGroup.
But I want to add sub-actions in the context menu. For e.g Action is
myAction and it has two sub-actions like action1 and action2. Here I want
action1,action2 to be part of sub-menu of myAction.
myAction (POP-UP menu)
|___________ action1 (actions)
|___________ action2 (actions)
This is similar to context menu 'Edit' in Synchronization view.
Any pointers on how can I achieve this?
TIA
~Priya
|
|
|
Re: How to add sub-menu to context menu on Sychronize view. [message #309814 is a reply to message #309804] |
Thu, 09 November 2006 11:25  |
Eclipse User |
|
|
|
Priya,
There is a second appendToGroup method to which you can add a submenu
(i.e. MenuManager is a subclass of IContributionItem so you can create a
submenu using MenuManager and add it to the context menu).
Michael
Priya wrote:
> Hi,
>
> I am implementing the Team Synchronization featire for a SCM. I want to add
> my custom menu as the context menu (pop-up menu) of the synchronize view. I
> am able to add simple actions using appendToGroup(
> ISynchronizePageConfiguration.P_CONTEXT_MENU,
> CONTEXT_MENU_CONTRIBUTION_GROUP, new TeamActionDelegate(new myAction(),
> configuration)); in this class that extends SynchronizePageActionGroup.
> But I want to add sub-actions in the context menu. For e.g Action is
> myAction and it has two sub-actions like action1 and action2. Here I want
> action1,action2 to be part of sub-menu of myAction.
>
> myAction (POP-UP menu)
> |___________ action1 (actions)
> |___________ action2 (actions)
>
> This is similar to context menu 'Edit' in Synchronization view.
>
> Any pointers on how can I achieve this?
>
> TIA
> ~Priya
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.24138 seconds