Skip to main content



      Home
Home » Modeling » Papyrus » [CSS Display] How to custom the label of a lifeline?
[CSS Display] How to custom the label of a lifeline? [message #1814416] Wed, 11 September 2019 04:13 Go to next message
Eclipse UserFriend
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 04:16] by Moderator

Re: [CSS Display] How to custom the label of a lifeline? [message #1814420 is a reply to message #1814416] Wed, 11 September 2019 04:38 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: [CSS Display] How to custom the label of a lifeline? [message #1814422 is a reply to message #1814420] Wed, 11 September 2019 05:04 Go to previous message
Eclipse UserFriend
Hi Camille,

Thanks for your reply.

I just tried the CSS rule with maskLabel, it seems it is not (no more) supported for Lifeline. As you're not sure the IParser contribution is properly supported by Papyrus, it could be more appropriate to contribute a "Label customization" area (like for Property of Operation) for an UML element (specifically for a diagram or not), is there a support/way to do that easily?

Yoann.
Previous Topic:About modeling with MARTE
Next Topic:[Duplicated post]
Goto Forum:
  


Current Time: Wed Jul 16 22:10:20 EDT 2025

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

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

Back to the top