Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » How to add sub-menu to context menu on Sychronize view.
How to add sub-menu to context menu on Sychronize view. [message #309804] Thu, 09 November 2006 09:33 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
>
>
>
Previous Topic:Persist the synchronization in the Team Sychronziattion view
Next Topic:Warnings and errors
Goto Forum:
  


Current Time: Sun Jun 08 13:46:07 EDT 2025

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

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

Back to the top