Skip to main content



      Home
Home » Eclipse Projects » Sirius » Group diagram Elements( Define a group of diagram elements for easier mapping in Viewpoint specification)
Group diagram Elements [message #1743441] Thu, 15 September 2016 09:45 Go to next message
Eclipse UserFriend
Hey everybody,

first of all I think sirius an amzing tool and the more I use it, the more I like it.

I was wondering if there is an easier way of doing the following:

I have a Diagram Description, with around 10 Nodes. All domain classes of those 10 nodes have the same SuperClass.

Now I want to have a new node (completly different domain class with a reference to the superClass) as well as a realtion based edge, which connects to one of the 10 earlier mentioned nodes.

Right now I have to select all 10 nodes in target mapping for the relation based edge. Is there any way to group the 10 nodes and then select the group in target mapping? It is not a problem yet, but as the number of nodes grows, the more it becomes a problem to not miss some nodes at the target mapping for a new realtion based edge.

I appreciate any help and best regards!
Re: Group diagram Elements [message #1743565 is a reply to message #1743441] Fri, 16 September 2016 08:18 Go to previous messageGo to next message
Eclipse UserFriend
Quote:


first of all I think sirius an amzing tool and the more I use it, the more I like it.

Thanks!

Quote:

I was wondering if there is an easier way of doing the following:

I have a Diagram Description, with around 10 Nodes. All domain classes of those 10 nodes have the same SuperClass.

Now I want to have a new node (completly different domain class with a reference to the superClass) as well as a realtion based edge, which connects to one of the 10 earlier mentioned nodes.

Right now I have to select all 10 nodes in target mapping for the relation based edge. Is there any way to group the 10 nodes and then select the group in target mapping? It is not a problem yet, but as the number of nodes grows, the more it becomes a problem to not miss some nodes at the target mapping for a new realtion based edge.


From what I understand, you would like to select the target mapping using some kind of computed expression (i.e. not in extension). This is not possible right now. It's not the first time we get this kind of request, but we've resisted adding this kind of feature because it would require knowledge of the VSM metamodel from users to write the expressions, making the VSMs more complex to understand (almost self-modifying code), to analyse, and to evolve (any change we would make to the metamodel would risk breaking such expressions).

In general when this kind of need arises, there are some other features of Sirius that can solve the issue, or at least mitigate it. The details depend on your concrete case, but one possible approach in a case such as yours would be to reduce the number of Node Mappings (in the extreme, to a single one), and use conditional styles to keep the different variants graphically different. If possible, this would reduce the maintenance (but maybe not completely eliminate) burden as the Edge Mapping would only need to point to one/a few Node.

Another approach would be to create a separate tool to check for domain-specific constraints you want to enforce on your VSMs, and possibly automatically fix any issue found. Because VSMs are EMF models, it is not necessarily difficult to load them, check that all relevant Node Mappings are referenced in your Edge Mapping (and maybe add the missing one) and save the result.

Hope it helps,
Pierre-Charles

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

Re: Group diagram Elements [message #1743660 is a reply to message #1743565] Sun, 18 September 2016 09:41 Go to previous message
Eclipse UserFriend
Thanks for the quick response!

Quote:
From what I understand, you would like to select the target mapping using some kind of computed expression (i.e. not in extension). This is not possible right now. It's not the first time we get this kind of request, but we've resisted adding this kind of feature because it would require knowledge of the VSM metamodel from users to write the expressions, making the VSMs more complex to understand (almost self-modifying code), to analyse, and to evolve (any change we would make to the metamodel would risk breaking such expressions).


A computed expression would probably do the trick, but I see your point why it is not implemented in Sirius. I was hoping for a feature, where it is possible to create some sort of group object, which references already existing nodes/container of a VSM. So when the group itself is referenced as a target mapping by some relation based edge it is equivalent to a reference to each "member" of the group.


Quote:
In general when this kind of need arises, there are some other features of Sirius that can solve the issue, or at least mitigate it. The details depend on your concrete case, but one possible approach in a case such as yours would be to reduce the number of Node Mappings (in the extreme, to a single one), and use conditional styles to keep the different variants graphically different. If possible, this would reduce the maintenance (but maybe not completely eliminate) burden as the Edge Mapping would only need to point to one/a few Node.


Thanks for the hint. It is a promising workaround, but it will only work for a fraction of my nodes, since I mostly need to use imported Nodes from already existing VSMs of multiple different domain specific languages due to consistency/maintainability.

best regards, Lukas

[Updated on: Sun, 18 September 2016 09:42] by Moderator

Previous Topic:[Properties view] Selective customisation possible?
Next Topic:About Layout of sirius
Goto Forum:
  


Current Time: Sat Mar 15 17:44:26 EDT 2025

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

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

Back to the top