Skip to main content



      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 04:03 Go to next message
Eclipse UserFriend
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 16:40 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Draw edges after dragging an entity on the diagram [message #1600359 is a reply to message #1599764] Wed, 04 February 2015 02:16 Go to previous message
Eclipse UserFriend
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: Sat May 24 05:21:26 EDT 2025

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

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

Back to the top