Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Multiline style in association labels
Multiline style in association labels [message #1835198] Thu, 26 November 2020 23:13 Go to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

Hi, Team,

I'm doing some metamodelling with the class diagram and so have a need to show subsets and redefines constraints on association ends in the diagram. I'm using CSS styling of the mask label for this purpose, and it works, but I end up with labels stretched out very long horizontally, e.g.,

   + /owningTarget { unique, subsets owningType, subsets target }


I thought I could address this problem by using the multiline style, e.g.

    .hasSubsets {
        maskLabel: visibility derived name modifiers multiline;
    }


which works insofar as it generates better label text, e.g.,

   + /owningTarget
     { unique,
       subsets owningType,
       subsets target }


but it doesn't actually work in the diagram because the labels don't resize vertically to show this text. They only show the first line, which omits all of the constraints. e.g.,

    + /owningTarget


Am I missing some way to tell the diagram to expand these labels vertically to show all of the text?

Thanks,
Christian
Re: Multiline style in association labels [message #1835447 is a reply to message #1835198] Thu, 03 December 2020 14:14 Go to previous messageGo to next message
Pauline Deville is currently offline Pauline DevilleFriend
Messages: 122
Registered: November 2016
Location: Paris Saclay, France
Senior Member
Hello,

I tried something, and I succeed to display a label in multiline, see the picture.

* {
bodyCutLength:-1;
}


Regards,
Pauline

index.php/fa/39468/0/

[Updated on: Thu, 03 December 2020 14:14]

Report message to a moderator

Re: Multiline style in association labels [message #1835448 is a reply to message #1835447] Thu, 03 December 2020 14:27 Go to previous messageGo to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

Cool! Thanks, Pauline!

I did not know about this attribute.

Christian
Re: Multiline style in association labels [message #1835545 is a reply to message #1835448] Sun, 06 December 2020 15:15 Go to previous message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

Well, it turns out that this won't help me in my class diagrams because the 'bodyCutLength' CSS attribute is implemented only in state machine diagrams.

Christian
Previous Topic:Class attributes and methods missing when deleting it and dragging it again to the diagram.
Next Topic:Model validation failed
Goto Forum:
  


Current Time: Sat Apr 20 01:19:04 GMT 2024

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

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

Back to the top