Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » hide multiplicity of "1" from class-diagram
hide multiplicity of "1" from class-diagram [message #1806530] Fri, 10 May 2019 08:42 Go to next message
nimo mayr is currently offline nimo mayrFriend
Messages: 13
Registered: April 2019
Junior Member
When creating a class within class-diagram and setting up a property, e.g. "userId", then this "userId" is shown in property compartment with multiplicity of "1".

How can I hide the multiplicity of a property, if it has only "1"?

I did not set up the Multiplicity of that property - it's therefore "undefined". However, Papyrus UML shows multiplicity of "1" even for "undefined" multiplicity.
Re: hide multiplicity of "1" from class-diagram [message #1806546 is a reply to message #1806530] Fri, 10 May 2019 10:12 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6538
Registered: July 2009
Senior Member
Hi

Papyrus is showing what you actually have, as a consequence of the UML default that takes effect unless you specify it.

Even if you have only one, you still need to know the multiplicity. It could be [?] or [1]. As your models get more interesting you will be grateful for the precision.

Regards

Ed Willink
Re: hide multiplicity of "1" from class-diagram [message #1806569 is a reply to message #1806546] Fri, 10 May 2019 13:01 Go to previous messageGo to next message
nimo mayr is currently offline nimo mayrFriend
Messages: 13
Registered: April 2019
Junior Member
But how can I hide the multiplicity on a property with multiplicity of "1" or for each property with unspecified multiplicity with css?

I dont want to add this information to the diagram if a property has a multiplicity of "1" or "unspecified".

Which css class do I have to use?

Something like:

Property > Label[kind=Multiplicity][data-multiplicity="1"], 
Property > Label[kind=Multiplicity][data-multiplicity="unspecified"]{
visible: false;
}

[Updated on: Fri, 10 May 2019 13:04]

Report message to a moderator

Re: hide multiplicity of "1" from class-diagram [message #1806665 is a reply to message #1806569] Mon, 13 May 2019 12:56 Go to previous message
Richard Freggi is currently offline Richard FreggiFriend
Messages: 104
Registered: July 2015
Senior Member
nimo mayr wrote on Fri, 10 May 2019 13:01
But how can I hide the multiplicity on a property with multiplicity of "1" or for each property with unspecified multiplicity with css?

I dont want to add this information to the diagram if a property has a multiplicity of "1" or "unspecified".

Which css class do I have to use?

Something like:

Property > Label[kind=Multiplicity][data-multiplicity="1"], 
Property > Label[kind=Multiplicity][data-multiplicity="unspecified"]{
visible: false;
}



Same as previous comment, either you hide an element/association multiplicity or you show it for whatever it is. I think what you are asking is poor practice, I would not expect a UML tool to support that.
Previous Topic:How to declare a default constructor for C++ in Papyrus
Next Topic:Activity Partition in Papyrus SysML version 1.3
Goto Forum:
  


Current Time: Mon Dec 16 03:17:08 GMT 2019

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

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

Back to the top