Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Layers contribute to same container mapping (reuse/import)
Layers contribute to same container mapping (reuse/import) [message #1723481] Tue, 16 February 2016 00:03 Go to next message
Nikolay Manolov is currently offline Nikolay ManolovFriend
Messages: 24
Registered: June 2012
Junior Member
Hello

I want to be able to contribute(add/remove) nodes to a container by activating(deactivating) layers.

Consider this specification:
Default Layer
Layer 1
 - Node Mapping A
Layer 2
 - Node Mapping B
Layer 3
 - Node Mapping C


In such a diagram any combination of the nodes A,B,C will appear depending on which layers are currently active. (example Layer 1 and 3 will produce nodes A and C)

Now consider a similar specification where we want the same behavior, however, not for the root of the diagram but for a container mapping:

Default Layer
 - Container Mapping Base
Layer 1
 - Imported Container Mapping Base 1
    - Node Mapping A
Layer 2
 - Imported Container Mapping Base 2 
    - Node Mapping B
Layer 3
 - Imported Container Mapping Base 3
    - Node Mapping C


Here each of the layers actually overwrite the Base Container Mapping and only one type of node is displayed no matter how many layers are active.
How can I achieve the behavior of the first specification for the second case?

I imagine, if Layer 2 imports Base 1 and then Layer 3 imports Base 2, it would work? But this is only a simplified situation. The actual case involves a lot more elements, nested containers, etc. and different layers are supposed to contribute different things to different parts.
And so I don't want to reuse-and-overwrite, as is the case right now, but just reuse(/contribute to) an already existing thing.

In this simplified case filters would do the trick, but in reality I am not filtering out elements (at least not always). Mapping A,B and C could be different representations of the same elements and in that case filtering does not help.

Looking forward to your input,

Nik
Re: Layers contribute to same container mapping (reuse/import) [message #1724193 is a reply to message #1723481] Mon, 22 February 2016 09:35 Go to previous message
Florian Barbin is currently offline Florian BarbinFriend
Messages: 253
Registered: August 2010
Senior Member
Hi Nik,

Unfortunately, from what I understand from your example, it is not
possible to achieve this using import mapping. Indeed, if the layer 1 is
activated, activating the layer 2 for instance will override the
imported container mapping of layer 1.
If that may help, filters can be applied on a specific mapping. A set of
filters can be activated by default by using a “Concern”. A concern
references one or several filters and can be activated by default by
selecting this concern in the diagram description “Default Concern” field.

Regards,

Florian


On 02/16/2016 01:03 AM, Nikolay Manolov wrote:
> Hello
> I want to be able to contribute(add/remove) nodes to a container by
> activating(deactivating) layers.
>
> Consider this specification:
> Default Layer
> Layer 1
> - Node Mapping A
> Layer 2
> - Node Mapping B
> Layer 3
> - Node Mapping C
>
> In such a diagram any combination of the nodes A,B,C will appear
> depending on which layers are currently active. (example Layer 1 and 3
> will produce nodes A and C)
>
> Now consider a similar specification where we want the same behavior,
> however, not for the root of the diagram but for a container mapping:
>
> Default Layer
> - Container Mapping Base
> Layer 1
> - Imported Container Mapping Base 1
> - Node Mapping A
> Layer 2
> - Imported Container Mapping Base 2 - Node Mapping B
> Layer 3
> - Imported Container Mapping Base 3
> - Node Mapping C
>
> Here each of the layers actually overwrite the Base Container Mapping
> and only one type of node is displayed no matter how many layers are
> active.
> How can I achieve the behavior of the first specification for the second
> case?
>
> I imagine, if Layer 2 imports Base 1 and then Layer 3 imports Base 2, it
> would work? But this is only a simplified situation. The actual case
> involves a lot more elements, nested containers, etc. and different
> layers are supposed to contribute different things to different parts.
> And so I don't want to reuse-and-overwrite, as is the case right now,
> but just reuse(/contribute to) an already existing thing.
>
> In this simplified case filters would do the trick, but in reality I am
> not filtering out elements (at least not always). Mapping A,B and C
> could be different representations of the same elements and in that case
> filtering does not help.
>
> Looking forward to your input,
>
> Nik
>


--
Florian - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Custom action on activating/deactivating layers
Next Topic:How to access diagram from a tabbar extenstion
Goto Forum:
  


Current Time: Thu Jan 21 19:26:51 GMT 2021

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

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

Back to the top