|
Re: How to constraint edges only in the container [message #1547448 is a reply to message #1527965] |
Mon, 05 January 2015 12:39 |
Esteban Dugueperoux Messages: 472 Registered: July 2009 |
Senior Member |
|
|
Hi Xue,
To limit what edges are displayed for your DataFlows, we can use either
the "Semantic Candidates Expression" either the "Precondition Expression".
If I understand correctly your need, you want display edge for your
DataFlow only if its source/target Component belongs to the same
PrivilegeBoundary? If it is your need you can write a Acceleo 3 boolean
expression to set in the "Precondition Expression", for example :
[source.eContainer(PrivilegeBoundary) =
target.eContainer(PrivilegeBoundary)/]
Also you talk about an issue with duplicates edges for a single
DataFlow, this issue can be caused by the "Source Finder Expression" and
the "Target Finder Expression". What have you set for these expressions?
If you can provide your example to test it will be more helpful to check
what is wrong.
Best Regards.
Le 25/12/2014 13:39, Xue Liu a écrit :
> Hello,
>
> I am a newbie of Sirius. Now I want to implement a data flow diagram editor based on Sirius. The meta model is simple and shown below
>
>
> In Sirius, the "PrivilegeBoundary" is represented by a container. The "Component" is represented by a node, and the "DataFlow" is represented by element based edge. It is also clear to see different "PrivilegeBounday"s can contained same "Component" s inside. Now the problem is that there are duplicated "DataFlow"s shown between "PriviliegeBoundary"s, which are not I want. I want "DataFlow"s only shown in the container. I have try constraints in the "Precondition Expression", but they do not work.
>
>
> Thanks in advance and Happy Christmas
>
> Xue Liu
>
--
Esteban Dugueperoux - Obeo
Need professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
Re: How to constraint edges only in the container [message #1548997 is a reply to message #1547523] |
Tue, 06 January 2015 09:00 |
Esteban Dugueperoux Messages: 472 Registered: July 2009 |
Senior Member |
|
|
Hello Xue,
Looking quickly at your example, I see several problems :
1. If you use Acceleo 3, you must reference your metamodel to have
Viewpoint specification model validation succeed, we can reference you
metamodel on Diagram Description in the Metamodels tab of the properties
view.
2. According to your metamodel, as Components are not contained in
PrivilegeBoundary but in DataFlowDiagram, the precondition of the Edge
Mapping is incorrect. You must find an expression to test if the
Components in source and in target are referenced by the same
PrivilegeBoundary according to the PrivilegeBoundary.componetsWithin
references. As there is not EOpposite reference to this last one, we can
either create an EOpposite and use eInverse() Acceleo 3 call [1].
For example :
[source.eInverse(PrivilegeBoundary) = target.eInverse(PrivilegeBoundary)/]
[1]
https://wiki.eclipse.org/Acceleo/Acceleo_Operations_Reference#eInverse_.28OclType_oclType.29_:_Sequence.28oclType.29
Best Regards.
Le 05/01/2015 14:34, Xue Liu a écrit :
> Hello Esteban,
>
> Thank you for your reply. I would like to provide the examples in the attachment.
>
--
Esteban Dugueperoux - Obeo
Need professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03736 seconds