Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Draw edges after dragging an entity on the diagram
Draw edges after dragging an entity on the diagram [message #1597395] Mon, 02 February 2015 09:03 Go to next message
Wilbert Alberts is currently offline Wilbert AlbertsFriend
Messages: 193
Registered: June 2010
Senior Member
Hi,

I would like to mimic the behavior of the ecore diagram editor in the sense that it is largely unsynchronized and you have to drag classes into the diagram to get them displayed. A nice feature is that in case an association exists between two classes, it is automatically drawn.

My metamodel contains elements representing an association between to entities; e.g. I use element based edges.

So far I managed to create a tool that allows me to drag an entity from a tree into a diagram.

What would be the most elegant way to draw any related edges? Do I have to iterate manually over all association elements and create edge views one by one? How does the ecore editor manage this?

Greetings,
Wilbert.
Re: Draw edges after dragging an entity on the diagram [message #1599764 is a reply to message #1597395] Tue, 03 February 2015 21:40 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 482
Registered: July 2009
Location: Nantes, France
Senior Member
Le 02/02/2015 10:03, Wilbert Alberts a écrit :
> Hi,

Hi,

>
> I would like to mimic the behavior of the ecore diagram editor in the
> sense that it is largely unsynchronized and you have to drag classes
> into the diagram to get them displayed. A nice feature is that in case
> an association exists between two classes, it is automatically drawn.
>
> My metamodel contains elements representing an association between to
> entities; e.g. I use element based edges.
>
> So far I managed to create a tool that allows me to drag an entity from
> a tree into a diagram.
>
> What would be the most elegant way to draw any related edges? Do I have
> to iterate manually over all association elements and create edge views
> one by one? How does the ecore editor manage this?

The most elegant way to draw any related edge between existing
nodes/containers (or list elements, border nodes, ..) on an
unsynchronized diagram would be to force the synchronization of the
corresponding edge (resp. node, container) mappings: select your mapping
(Edge, Node, Container) in the VSM editor, then select the Advanced tab
and select "Synchronized". You will find detailed information in the
Synchronization section of [1].

>
> Greetings,
> Wilbert.
>

Regards,

--
Maxime - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius
--

[1]
https://www.eclipse.org/sirius/doc/specifier/diagrams/Diagrams.html#graphical_elements


Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius

Join the Sirius community at SiriusCon. Register for free: Nov. 9th Paris
http://www.siriuscon.org/
Re: Draw edges after dragging an entity on the diagram [message #1600359 is a reply to message #1599764] Wed, 04 February 2015 07:16 Go to previous message
Wilbert Alberts is currently offline Wilbert AlbertsFriend
Messages: 193
Registered: June 2010
Senior Member
Thanx Maxime. That is indeed the way to solve it.

I don't know whether I've mentioned it before but Sirius is indeed a great tool as is the support in the forum!

Greetings,
Wilbert.
Previous Topic:AcceleoEvaluationException: Unresolved compilation error in generation module
Next Topic:Containers and recursion: container A has container B and container B has container A
Goto Forum:
  


Current Time: Wed Apr 01 11:22:06 GMT 2020

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

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

Back to the top