Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Display Semantic properties on the Label
Display Semantic properties on the Label [message #1695998] Thu, 21 May 2015 02:47 Go to next message
Tuan Hoang Anh is currently offline Tuan Hoang AnhFriend
Messages: 42
Registered: May 2015
Member
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.

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"

Many thanks,
Tuan
Re: Display Semantic properties on the Label [message #1696017 is a reply to message #1695998] Thu, 21 May 2015 08:02 Go to previous message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 516
Registered: July 2009
Location: Nantes, France
Senior Member
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
Previous Topic:Eclipse Sirius: How to access ancestors of the EObject of a line mapping?
Next Topic:Edit value in a table
Goto Forum:
  


Current Time: Fri Apr 26 11:23:53 GMT 2024

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

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

Back to the top