|
Re: Can't find the target of the diagram [message #1608211 is a reply to message #1603696] |
Mon, 09 February 2015 10:55 |
|
On 02/06/2015 03:47 PM, Emi Su wrote:
> Hi,
Hi Emi,
If your context is a DSemanticDiagram, [target/] should give you the
current semantic element on which the diagram is based.
You can also test your expressions by using the interpreter view (Window
> Show View > Interpreter)
>
> I struggled a while with finding the target of the current diagram
> (DSemanticDiagram) from Acceleo 3 expression.
>
> Does anyone know how to find it?
>
> Thanks,
> Emi
Regards,
--
Florian - Obeo
Need professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
Re: Can't find the target of the diagram [message #1614810 is a reply to message #1613025] |
Fri, 13 February 2015 14:11 |
|
On 02/12/2015 12:03 PM, Emi Su wrote:
> Hi Florian,
Hi,
>
> I tried your suggestion [target/], but it complained about 'unrecognized variable(target)'.
> I also tried the 'interpreter', it also gave me the same error.
>
> Any idea? Does it might be the version problem? Which verison you are working on?
It depends on where you set the focus. The focus has to be set on the
diagram or a diagram element.
>
> Fangyi
>
Regards,
--
Florian - Obeo
Need professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
Re: Can't find the target of the diagram [message #1614976 is a reply to message #1614946] |
Fri, 13 February 2015 16:17 |
|
On 02/13/2015 04:59 PM, Emi Su wrote:
> Hi Florian,
> I think my focus is on a diagram element.
> Here is an image, the focus is on the 'ContainerA', which is a Container element. But still there is an error to find the target.
>
You set the focus on a *odesign element (which is not a semantic
decorator but a definition to bind a semantic element with a graphical one)
The Acceleo Interpreter view aims to test the Acceleo expressions on a
representation (a diagram a table or tree).
In what context do you need to access the target?
--
Florian - Obeo
Need professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
Re: Can't find the target of the diagram [message #1619419 is a reply to message #1615229] |
Mon, 16 February 2015 15:15 |
|
Hi Emi Su,
Le 13/02/2015 21:07, Emi Su a écrit :
> I have to find the target within the context of 'ContainerA'. I need all the actions which refer to 'ContainerA'.
>
> My ecore model is:
>
>
From the screenshot you attached to a previous post, the structure of
your VSM looks like:
Viewpoint Root
. Diagram description root
. Default layer
. ContainerMapping ContainerA
. ContainerMapping ContainerB
This seems to indicate you want to display some ContainerB elements
(described by the ContainerB mapping) in ContainerA elements (described
by the ContainerA mapping).
I assume the domain class of your diagram description is "Root" and your
Root diagram will be created on a Root.
Your inital question was "I struggled a while with finding the target of
the current diagram (DSemanticDiagram) from Acceleo 3 expression."
It will depend in which interpreted expreted expression your are. For
exemple:
. semantic candidate expression of the ContainerA mapping : this a
root level mapping, the expression context of the evaluation will be the
semantic target of the diagram, ie the "Root" element on which the user
created it.
. semantic candidate expression of the ContainerB mapping: this
expression context of the evaluation will be the semantic target of the
container (created from the ContainerA mapping, see the mapping
structure) for which Sirius tries to refresh children: so I think you
are on a ContainerA element which should be contained by the root (your
screenshot does not show the containment). So in this case
feature:eContainer should be sufficient to retrieve the "Root" element.
We will need more information on the location from which you are looking
for the target to be able to give more help.
Do not hesitate to look into the documentation on mapping[1] and queries [2]
Regards,
--
Maxime - Obeo
Need professional services for Sirius?
http://www.obeodesigner.com/sirius
--
[1]
https://www.eclipse.org/sirius/doc/specifier/diagrams/Diagrams.html#layers_graphical_elements
[2]
https://www.eclipse.org/sirius/doc/specifier/general/Writing_Queries.html
Maxime Porhel - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
Powered by
FUDForum. Page generated in 0.04487 seconds