Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BPMN Modeler » Add item in context menu
Add item in context menu [message #12668] Thu, 04 June 2009 11:06 Go to next message
mio is currently offline mio
Messages: 4
Registered: July 2009
Junior Member
hi
a question: it's possible to add an item in the context menu when there is
a right click over a pool ?
what is the best way (if it's possible) ?
best regards
Re: Add item in context menu [message #12709 is a reply to message #12668] Fri, 05 June 2009 05:04 Go to previous message
Eclipse User
Originally posted by: atoulme.intalio.com

mio wrote:
> hi
> a question: it's possible to add an item in the context menu when there
> is a right click over a pool ?
> what is the best way (if it's possible) ?
> best regards
>
Sure, it's part of the GMF standard extensions.

You will need to plug your own
org.eclipse.gmf.runtime.common.ui.services.action.contributi onItemProviders
extension point and provide a new popupContribution, like this one:

<popupContribution

class=" org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextM enuProvider ">
<popupStructuredContributionCriteria

objectClass=" org.eclipse.stp.bpmn.diagram.edit.parts.SequenceEdgeEditPart "
objectCount="1">
</popupStructuredContributionCriteria>
<popupMenu
id="conditionType"
path="/additionsGroup">
</popupMenu>
<popupMenuGroup
id="group1"
path="/conditionType/"
separator="true">
</popupMenuGroup>
<popupAction
id="conditionTypeNone"
path="/conditionType/group1">
</popupAction>
</popupContribution>

You will need to implement your own action provider, extending
AbstractContributionItemProvider and bind to the extension point as well.

I am sure the GMF developers have that documented somewhere in a more
complete way.

Thanks,

Antoine
Previous Topic:Cannot open Europa based models in Ganymede Modeller
Next Topic:Re: Traverse a BPMN diagram
Goto Forum:
  


Current Time: Wed Apr 16 09:29:26 EDT 2014

Powered by FUDForum. Page generated in 0.02331 seconds