Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Can't find the target of the diagram
Can't find the target of the diagram [message #1603696] Fri, 06 February 2015 10:30 Go to next message
Emi Su is currently offline Emi SuFriend
Messages: 8
Registered: February 2015
Junior Member
Hi,

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
Re: Can't find the target of the diagram [message #1608211 is a reply to message #1603696] Mon, 09 February 2015 10:55 Go to previous messageGo to next message
Florian Barbin is currently offline Florian BarbinFriend
Messages: 236
Registered: August 2010
Senior Member
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 #1613025 is a reply to message #1608211] Thu, 12 February 2015 11:03 Go to previous messageGo to next message
Emi Su is currently offline Emi SuFriend
Messages: 8
Registered: February 2015
Junior Member
Hi Florian,

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?

Emi

[Updated on: Thu, 12 February 2015 11:04]

Report message to a moderator

Re: Can't find the target of the diagram [message #1614810 is a reply to message #1613025] Fri, 13 February 2015 14:11 Go to previous messageGo to next message
Florian Barbin is currently offline Florian BarbinFriend
Messages: 236
Registered: August 2010
Senior Member
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 #1614946 is a reply to message #1614810] Fri, 13 February 2015 15:59 Go to previous messageGo to next message
Emi Su is currently offline Emi SuFriend
Messages: 8
Registered: February 2015
Junior Member
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.
index.php/fa/20849/0/
Re: Can't find the target of the diagram [message #1614976 is a reply to message #1614946] Fri, 13 February 2015 16:17 Go to previous messageGo to next message
Florian Barbin is currently offline Florian BarbinFriend
Messages: 236
Registered: August 2010
Senior Member
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 #1615229 is a reply to message #1614976] Fri, 13 February 2015 20:07 Go to previous messageGo to next message
Emi Su is currently offline Emi SuFriend
Messages: 8
Registered: February 2015
Junior Member
I have to find the target within the context of 'ContainerA'. I need all the actions which refer to 'ContainerA'.

My ecore model is:
index.php/fa/20856/0/
Re: Can't find the target of the diagram [message #1619419 is a reply to message #1615229] Mon, 16 February 2015 15:15 Go to previous message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 482
Registered: July 2009
Location: Nantes, France
Senior Member
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

Join the Sirius community at SiriusCon. Register for free: Nov. 9th Paris
http://www.siriuscon.org/
Previous Topic:[Popup menu] How to disable a context menu item by service
Next Topic:Container Drop, Move Operation
Goto Forum:
  


Current Time: Fri Apr 10 20:35:55 GMT 2020

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

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

Back to the top