How to Create a View without a reference to the model [message #1730831] |
Thu, 28 April 2016 17:37  |
Eclipse User |
|
|
|
Hi,
How can I create a View without referencing to the implemented model?
I need a Creation Tool that creates a Picture (from workspace) in the diagram like the Create Text Tool from the palette.
I tried to create a Node with the workspace image as style, but I don't know which Domain Class I could use for it. (I tried a several ones like diagram.WorkspaceImage, diagram.DNode, diagram.square and so on)
Then I wanted to use the Node Creation Tool with mapping this Node and after Begin I took Create View with mapping this Node and var:containerView as Container View Expression.
Is that the right way or how can I achieve this?
Regards
|
|
|
Re: How to Create a View without a reference to the model [message #1730885 is a reply to message #1730831] |
Fri, 29 April 2016 09:52   |
Eclipse User |
|
|
|
Hi,
In Sirius the behavior is:
- a model's element (semantic element) is mapped with a mapping (node,
container, edge, column, line, treeElement) with a style
- this mapping is represented in a representation (diagram, table, tree).
So, Semantic Element (in model) -> 1..n mapping in Sirius -> n graphical
representation.
In your case you want to display a graphical view that not correspond to
a mapping or that the mapping does not correspond to semantic element.
It's impossible with Sirius.
In your case you can maybe mapped the root element (element on which the
diagram is defined) in mode not synchronized for your image.
is this clearer to you?
Regards,
--
Julien - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
|
Re: How to Create a View without a reference to the model [message #1731679 is a reply to message #1731142] |
Mon, 09 May 2016 04:32  |
Eclipse User |
|
|
|
Le 03/05/2016 09:30, Felix Dorner a écrit :
> Hello Julien. I hop on the train and ask some followup questions:
>
> On 29-Apr-16 15:52, Julien DUPONT wrote:
>> So, Semantic Element (in model) -> 1..n mapping in Sirius -> n graphical
>> representation.
>
> Do you mean that one semantic element may have more than one graphical
> representations in a single diagram?
Yes, you can have several mappings which will create a different
graphical element for a single semantic element.
If you reuse a mapping in several places on the same diagram or if the
semantic candidates expression return a same element in different
contexts, you have the possibility to create several times a graphical
element for the same semantic element in a different container.
The refresh behavior compute "candidates" for each mapping: a candidate
references the mapping, the semantic element and the container (diagram,
node, container, list, ..)
>
> The diagram itself also targets a semantic element. Is it possible to
> have one or more graphical elements that target the same element as the
> diagram itself?
If you want to create a graphical element which represent the same
semantic element than the target of the diagram, you simply create a
mapping with the same domain class (or a super type) than the diagram
description and you put "var:self" as semantic candidates expression.
This is also true for any node/container mapping, if you want to create
a sub node / border node / compartiment or sub container on an element.
>
> Thanks for explaining.
> Felix
>
>
--
Maxime - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
Powered by
FUDForum. Page generated in 0.08002 seconds