[CSS Display] How to custom the label of a lifeline? [message #1814416] |
Wed, 11 September 2019 08:13 |
Yoann Farré Messages: 235 Registered: November 2017 |
Senior Member |
|
|
Hello,
I would custom the lifeline label in a sequence diagram. However, when the field "Represents" is set, I can't found any way to custom the label , eg for example :
- display only the name of the instance which is represented (without the class)
- display the name of the lifeline instead of the the name of the instance which is represented.
I tried some CSS rule but it has no effect. Probably not surprising as the menu Show/Hide Label is deactivated for the lifeline.
Lifeline > Label[kind=Name] {
visible : true;
}
Is it possible and if yes, how?
Is there a way to do it programmatically? Contribute a LabelProvider or something like this?
Thanks.
Yoann.
[Updated on: Wed, 11 September 2019 08:16] Report message to a moderator
|
|
|
Re: [CSS Display] How to custom the label of a lifeline? [message #1814420 is a reply to message #1814416] |
Wed, 11 September 2019 08:38 |
Camille Letavernier Messages: 952 Registered: February 2011 |
Senior Member |
|
|
Hi Yoann,
By default, the CSS only allow you to customize the visibility of the label control (I.e. the entire text area of the Lifeline). Changing the actual text is only supported for a few specific labels (Properties, Operations...); there is no generic mechanism for that.
It seems that Lifelines don't support this mechanism (Anymore?), so there's nothing CSS can do. If you really need this, you'd have to provide a custom IParser for the Lifeline (LifelineNameEditPart), using the corresponding GMF extension point (IParserProvider / org.eclipse.gmf.runtime.common.ui.services.parserProviders); although I don't guarantee that Papyrus would properly support that.
Btw, for supported elements, the correct property would be maskLabel. The valid values can be found in the Appearance properties for the corresponding element (Property, Operation, ...), in the "Label customization" area:
Property {
maskLabel: name type;
}
Lifeline {
maskLabel: lifelineName representsName representsType; /* No longer supported? */
}
HTH,
Camille
Camille Letavernier
|
|
|
|
Powered by
FUDForum. Page generated in 0.02438 seconds