Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Workaround for Execution of Creation Tools on different Container
Workaround for Execution of Creation Tools on different Container [message #1749089] Thu, 01 December 2016 17:47 Go to next message
Matt Se is currently offline Matt SeFriend
Messages: 29
Registered: February 2016
Junior Member
The graphical representation hierachy of my diagram differs from the actual meta-model containment architecture.
For example, my diagram displays a parent EObject "A" and its containing EObjects "B" in the same sirius graphical container diagram element "C".
So B.eContainer() == A, but both are represented in the same sirius container diagram element C.

Now I can't execute a palette creation Tool for B on the graphical A element (which is B's EObject container), but only on C (which is B's diagram elements container).

I implemented a workaround by implementing a dummy Node Diagram inside A and then the Node Creation tool simply creates a B instance.
This seems ok though, but the problem appears to be that there is no new LayoutData set inside the C diagram element, so that the newly created B diagram element bounces around in the diagram...
I could intercept the location where the Node Creation is executed and add a corresponding new LayoutData for C container, but that's messy...

Is there a solution for this problem? Is it possible to enable a Creation Tool to be executed on an arbitrary diagram container?

Thanks in advance!

[Updated on: Thu, 01 December 2016 17:48]

Report message to a moderator

Re: Workaround for Execution of Creation Tools on different Container [message #1749178 is a reply to message #1749089] Fri, 02 December 2016 17:26 Go to previous message
Laurent Fasani is currently offline Laurent FasaniFriend
Messages: 182
Registered: October 2014
Senior Member
Hello

To create B element selecting A, just add an extramapping on your tool [1]
In your case just add A as extra-mapping for B creation tool.
You will have to change the preConditionExpression to prevent selecting C.

Regards
Laurent

[1] http://help.eclipse.org/mars/topic/org.eclipse.sirius.doc/doc/specifier/diagrams/Diagrams.html?cp=69_2_1_4#tools


Laurent Fasani - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Variables in the precondition of reconnect edge tool are missing
Next Topic:Automatic Figure Rotation
Goto Forum:
  


Current Time: Thu Apr 25 08:04:47 GMT 2024

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

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

Back to the top