|
Re: Container - Sub Container Creation [message #1397370 is a reply to message #1397229] |
Wed, 09 July 2014 16:18 |
|
Le 09/07/2014 14:00, VVasanth Kumar a écrit :
> Hi All,
Hi,
>
> I am facing issues in creation of subcontainer for my model.
>
> Let me explain my model:
>
> Actions --> Action --> steps
>
> As mentioned above, I have Actions class that contain the sequence of
> Action and Action in turn contains 'Steps'.
>
> I would like to represent above model by having 'Actions' as a container
> and 'Action' as a subcontainer with 'steps' as nodes of subcontainer.
Here I think you have a container mapping on Actions, with a sub
container mapping on Action, which has a sub node mapping on Step.
>
> But for some reason, I am not able to create subcontainer for 'Action'.
> Whenever I create a subcontainer under 'Actions' container - Diagram
> editor does not display my subcontainer at all.
If you have issues with your mappings: for the "Domain Class" fields,
use the qualified name: epackagename.EClassname, and on the
DiagramDescription, in the Metamodels property tab, select your
metamodel, you will the have only types of the selected metamodels in
the completion (CTRL+SPACE) in the green and yellow property fields.
Then look into your semantic candidates expressions, and check them, (I
think they should just be feature:refActions and feature:refAction where
refActions is the feature which contains the Actions elements of the
model element on which you created the diagram, and refAction is the
feature of Actions which contians the Action elements). Remember that
you can test your expressions in the Acceleo Model to Text > Interpreter
view (in the Sirius Interpreter mode) if you open a test model in its
EMF generated editor for example.
If you also have issue with the tools:
How many Action/Actions container creation tool do you have ?
If you have only one and if you have the #2. mapping structure, you
should add both container mapping in the "Container mappings" list of
the tool properties (General tab). This will enable the tool when the
mouse hovers the diagram and when it hovers an Actions container.
Or you could create an Actions container creation tool and an Action
container creation tool, each of them on its respective mapping.
>
> I am able to create 'Action' as a node under 'Actions' container.
> Could you please provide me some help regarding creation of subcontainers?
Then for the model operations:
If you have two tools, each tool will have its structure:
.. ChangeContext var:container
. CreateInstance Actions (in refActions)
.. ChangeContext var:container
. CreateInstance Action (in refAction)
Where refActions and refAction are the feature of your metamodels which
can contains the corresponding types.
If you have only one common Action/Actions tool, you have to check the
type of the container (two 'if' operation?) and then to do make each
corresponding create instance on the right features.
>
> Thanks,
> V.Vasanth
Regards
Maxime
Maxime Porhel - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
Powered by
FUDForum. Page generated in 0.02431 seconds