Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » menuContribution to papyrus model menu
menuContribution to papyrus model menu [message #1750695] Sun, 25 December 2016 17:28 Go to next message
Danny Deina is currently offline Danny DeinaFriend
Messages: 7
Registered: December 2015
Junior Member

i am working on a plugin, and by this plugin i want to extend papyrus plugin by adding command in popup menu when click on lifeline object in sequence diagram.
i have this menuContribution to add command to project explorer
               label="Run mycommand"               
               tooltip="Do something with this project">

i want to add the same command to popup menu when i right click mouse button on lifeline item in the sequence diagram .
i tried to get the id of the menu using plugin Spy but i get Null, so how can i add the command to papyrus popup menu !

Re: menuContribution to papyrus model menu [message #1750778 is a reply to message #1750695] Wed, 28 December 2016 15:55 Go to previous message
Philip Langer is currently offline Philip LangerFriend
Messages: 89
Registered: March 2015
Location: Vienna, Austria


to add a popup menu item to Lifelines in the model explorer, you can use the following:

<extension point="org.eclipse.ui.menus">
  <menuContribution locationURI="popup:org.eclipse.papyrus.views.modelexplorer.modelexplorer.popup">
		<visibleWhen checkEnabled="false">
		   <iterate ifEmpty="false" operator="and">
			  <adapt type="org.eclipse.emf.ecore.EObject">
				 <instanceof  value="org.eclipse.uml2.uml.Lifeline"/>

Hope this helps!

Best wishes,


Philip Langer

Get professional Eclipse developer support:

Philip Langer

Get professional Eclipse developer support:

[Updated on: Wed, 28 December 2016 15:56]

Report message to a moderator

Previous Topic:Thanks to all who made Papyrus my favourite modelling tool
Next Topic:Java Comments and Annotation with Code Generation
Goto Forum:

Current Time: Fri Jan 24 05:51:06 GMT 2020

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

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

Back to the top