Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Is there a specific extension point for diagram context menu?
Is there a specific extension point for diagram context menu? [message #1266146] Fri, 07 March 2014 02:50 Go to next message
Michael Lukaszczyk is currently offline Michael LukaszczykFriend
Messages: 14
Registered: November 2013
Junior Member
Hey there,

is it possible to extend the diagram with an additional context menu entry? I mean by right clicking on the canvas (not on a specific element). Like the org.eclipse.ui.popupMenus extension point for the file browser. Is there a specific sirius extension point or is it gmf specific?

Thanks,

Michael
Re: Is there a specific extension point for diagram context menu? [message #1266507 is a reply to message #1266146] Fri, 07 March 2014 14:53 Go to previous message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 516
Registered: July 2009
Location: Nantes, France
Senior Member
Le 07/03/2014 03:50, Michael Lukaszczyk a écrit :
> Hey there,
Hi,

> is it possible to extend the diagram with an additional context menu
> entry? I mean by right clicking on the canvas (not on a specific
> element). Like the org.eclipse.ui.popupMenus extension point for the
> file browser. Is there a specific sirius extension point or is it gmf
> specific?

It should be possible to extends the diagram contextual menu with
org.eclipse.ui.popupMenus or org.eclipse.ui.menus

This is done by the org.eclipse.sirius.diagram plugin itself for several
menus: Show/Hide (menu), Delete from Diagram (action provided with an
object contribution), Refresh (command provided with a menu contribution).

These menu are created with a locationURI=
popup:org.eclipse.ui.popup.any?after=XXX , with XXX is one of the
contextual menu group, and ?after=XXX is optional, the additional menu
should be added to the addition group if there is no specified placement.

You should when possible add a visibleWhen element to avoid to provide
your menu for all existing contextual menu. For example, if you want to
add the menu for the diagram edit part only (the canvas):

<visibleWhen checkEnabled="false">
<with variable="selection"> <!-- or activeMenuSelection -->
<iterate>
<instanceof
value="org.eclipse.sirius.diagram.edit.api.part.IDDiagramEditPart">
</instanceof>
</iterate>
</with>
</visibleWhen>

>
> Thanks,
>
> Michael


Regards

Maxime


Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:How to save instances ?
Next Topic:Force refresh not working for me
Goto Forum:
  


Current Time: Fri Nov 01 00:19:54 GMT 2024

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

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

Back to the top