Containers and Sub-Containers Problem [message #1732807] |
Fri, 20 May 2016 11:15 |
Frank Sorek Messages: 22 Registered: February 2016 |
Junior Member |
|
|
Hello,
I have a very complicated problem.
As described in a few topics earlier, I have a model in which containers should contain other containers, but in my model they are on the same level and the containment is regulated with a "Containment" model element which has the features "contained Node" and "containing Node".
To display the containers I described 2 Containers (AgentContainer and ContainedAgents) where ContainedAgents is a Sub-Container of AgentContainer. In Addition I set ContainedAgents as Reused Container Mappings to ContainedAgents.
First Question: Is it possible to display the containers with only one Container?
Furthermore, I created a Container Drop with Containers: diagram, AgentContainer,ContainedAgents
and Mappings: AgentContainer and ContainedAgents
After Begin I create a new ContainerInstance and I set the childrens feature from the newSemanticContainer and the containers feature from the element to the new instance.
Now, when I drop an AgentContainer(p1) to another AgentContainer(p2), p1 changes from AgentContainer to ContainedAgents and so it also changes the style. In Addition, the position in p2 is not there where I leave the it. It just arranges itself.
Second Question: How can I avoid this?
Regards
|
|
|
Re: Containers and Sub-Containers Problem [message #1733336 is a reply to message #1732807] |
Thu, 26 May 2016 14:06 |
|
Hi Franck,
> First Question: Is it possible to display the containers with only one
> Container?
Yes, you must use a java service to calculate the semantic candidate
expression.
If I correctly understand your environment you can find an example
joined*, to explain you how use the service.
This example is a very sample case with an element named Agent with a bi
directional relation as you explained in your previous message.
> Second Question: How can I avoid this?
I don't understand why you create a new element. As you can see in
exemple no need to create a new instance. The element is moving where
you want.
To reproduce, use project fr.obeo.dsl.sample and open representation
named diagramContainer and drag'n drop AgentToMove in containedAgents or
AgentContainer.
*To use example.
- Import fr.obeo.dsl.container.zip in first Sirius (containing 3
projects, the Métamodel project, the edit and the editor)
- Launch a runtime from first sirius and import
fr.obeo.dsl.container.design-samples.zip. it contains the VSM in .design
project and an example in samples.
Regards,
--
Julien - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
Powered by
FUDForum. Page generated in 0.05072 seconds