yUML protected and static attributes

64 views
Skip to first unread message

Johannes Tümler

unread,
Mar 6, 2020, 3:52:15 AM3/6/20
to yuml
I saw here that protected attributes should be possible. But when I add # to my attributes the diagram can't be created.

Next to that: Static attributes should be underlined. How can I make an attribute underlined?

Thx

Johannes Tümler

unread,
Mar 6, 2020, 3:59:39 AM3/6/20
to yuml
Example 1 -- this does work for protected:

[Fahrzeug|Höchstgeschwindigkeit:int;#abgeschlossen:bool;-aktuelleGeschwindigkeit:int|fahre()]^-[Kraftfahrzeug|Antriebsart:string;Reichweite:string;Sitzplätze:int;Leistung:int|tanken()]
[Kraftfahrzeug]^-[PKW|Kofferraumvolumen:int;Tempomat:boolean;Tieferlegung:bool|radio()],[Kraftfahrzeug]^-[Motorrad|Einarmschwinge:bool;ABS:bool|wheely()],[Kraftfahrzeug]^-[LKW|KapazitätLadefläche:int|beladen();entladen()]
[Fahrzeug]^-[Fahrrad|Federgabel:bool;Gänge:int|luftAufpumpen()]

Example 2 -- this does not work for protected:

[Fahrzeug|Höchstgeschwindigkeit:int;#abgeschlossen:bool;-aktuelleGeschwindigkeit:int|fahre()]


Tobin Harris

unread,
Mar 8, 2020, 12:29:42 AM3/8/20
to yuml
It's a bit of an ugly hack, but if you use a different # character, it works. E.g.

[Fahrzeug|Höchstgeschwindigkeit:int;#abgeschlossen:bool;-aktuelleGeschwindigkeit:int|fahre()]

We're looking at how to do more flexible encoding of special characters soon, including hash, brackets etc.

Johannes Tümler

unread,
Mar 9, 2020, 4:34:38 AM3/9/20
to yuml
Alright, thanks - that works :)

How about underlined static parameters?

Tobin Harris

unread,
Mar 17, 2020, 2:25:59 PM3/17/20
to yuml
UPDATE: We have a new parser launching soon that supports # without any hacks, and a few other things. I'll announce once it's launched.

Underlined static parameters... I had a quick look at this a few days back but didn't find a solution. Will keep digging, a few people have requested more text formatting options. 

Will keep you posted.

Tobin Harris

unread,
Apr 2, 2020, 4:55:29 PM4/2/20
to yuml
You can now do this for underline

[Customer|__underlined_thing__;#not_underlined;*bold*]

Looks like this


T


On Monday, 9 March 2020 08:34:38 UTC, Johannes Tümler wrote:

fabrice audouard

unread,
Apr 4, 2020, 6:28:34 AM4/4/20
to yuml
Hi Tobin,

Very usefull for format some fragments.
It will be intersting to format class name or other part.
A little suggestion : separate defintion of entites with each presentation like this :

[a;*class A*|+attr1 int;+attr2 string]
[root;__AbstractRoot__|...]

and reference "class A" entites with his "id", like this :

[a]->[b]
[a]->[c]
[a]->[d]
[subClass1]-^[root]
[subClass2]-^[root]

?

Fabrice

Tobin Harris

unread,
Apr 6, 2020, 6:22:16 PM4/6/20
to yuml
That's a nice idea. Let me have a play with that, thanks Fabrice!
Reply all
Reply to author
Forward
0 new messages