Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Containers and Sub-Containers Problem
Containers and Sub-Containers Problem [message #1732807] Fri, 20 May 2016 11:15 Go to next message
Frank Sorek is currently offline Frank SorekFriend
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 Go to previous messageGo to next message
Julien Dupont is currently offline Julien DupontFriend
Messages: 172
Registered: July 2009
Senior Member
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
Re: Containers and Sub-Containers Problem [message #1733616 is a reply to message #1733336] Mon, 30 May 2016 12:40 Go to previous message
Frank Sorek is currently offline Frank SorekFriend
Messages: 22
Registered: February 2016
Junior Member
Thank you very much, it just works perfectly the way I want now Smile

In my second question I wrote the wrong name of the instance that will be created. It is the containment instead of container.

But with the solution of my first question, the second problem has gone away.
Previous Topic:Fail to use node creation tool to add element
Next Topic:Custom compartment layout
Goto Forum:
  


Current Time: Fri Apr 26 18:45:05 GMT 2024

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

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

Back to the top