|
Re: Display Semantic properties on the Label [message #1696017 is a reply to message #1695998] |
Thu, 21 May 2015 08:02 |
|
Hi Tuan,
Le 21/05/2015 04:47, Tuan Hoang Anh a écrit :
> Hi all,
>
> As the title, I want to display the semantic properties on the Label of
> Node or Container. As usual, the Label display only "Name" property, but
> I want to display the other properties on the Label, too.
You have to modify the Label Expression of the style description of the
corresponding mappings in your odesign model [1].
>
> Ex: I have a Node (Container) as below:
> Property | Value
> Node A |
> Name | sth
> Property1 | p1
> Property2 | p2
> .....
> PropertyN | pn
>
> And on the diagram, the Label of Node (Container) will be displayed as:
> "sth:p1:p2: ... :pn"
You might try to compute such a label using an Acceleo expression by
constructing the collection containing the name and the properties
values and then using the sep operation to insert the separator... [2].
You might also use a Java service to compute the label you want to
display from the semantic element of the node or container [3].
>
> Many thanks,
> Tuan
>
Regards,
--
Maxime - Obeo
Need professional services for Sirius?
http://www.obeodesigner.com/sirius
--
[1]
https://www.eclipse.org/sirius/doc/specifier/diagrams/Diagrams.html#label_style
[2]
http://help.eclipse.org/luna/index.jsp?topic=%2Forg.eclipse.acceleo.doc%2Fpages%2Freference%2Foperations.html&cp=0_3_2
[3]
https://www.eclipse.org/sirius/doc/specifier/general/Writing_Queries.html#service_methods
Maxime Porhel - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
Powered by
FUDForum. Page generated in 0.23502 seconds