note does not work inside class, while works fine within component

0 votes
asked Dec 24, 2018 in Bug by boshka (3,940 points)
edited Dec 24, 2018 by boshka

Please have a look:

@startuml

/' note does not work inside class '/

package "Package 1" as package_1 #undefinedCOLOR {

class "Class 1" as class_1 #undefinedCOLOR {

note top of class_1: note is not handled

}

}

@enduml

@startuml

/' note does workds fine within component '/

package "Package 1" as package_1 #undefinedCOLOR {

component "Class 1" as class_1 {

note top of class_1: if you replace the component with type class - the note will break

}

}

@enduml

Here are samples:

working (inside component): http://www.plantuml.com/plantuml/uml/RO-noeDG38NtFCN1Vt0KrtyI75kmz0NAnSJseYPYhdGeVVVMQhT2XaF8-VXIUGfpMiQ1YXngIS0clYRSRUuHrICBsY6u8o-8fj3suIh8JdieCmJ7lhwK-5kKfOigN3V7vem7KMlZP2gQaDKhQEjiqD-DZqco2TPzp_utlUYu1UL16Cs1wBbE9Shl5ru0

not working (inside class): http://www.plantuml.com/plantuml/uml/RO-n2i9038RtFCLF7JgMhaw5haB55v2ZIVNecIlD5GVntRMzkWc1_8GluKjZoSrfUGIYgeJ69E0ejYOyupp2gtaMzC6PeQo89jUFxYOepdke2pZ3FhxME2pACdWLRhjJTy6BA6yNxTeodm_-fpUB52V4uOSTivhFOdUd78I9tbirelpzu0C0

commented Dec 24, 2018 by albert (3,520 points)
Which version of plantuml are you using?

3 Answers

0 votes
answered Dec 24, 2018 by albert (3,520 points)

I'm not sure whether or not I got your question rifht but when I try:

@startuml
/' note does workds fine within component '/

package "Package 1" as package_1 #undefinedCOLOR {

class "Class 1" as class_1 {

note top of class_1: if you replace the component with type class - the note will break

}

}
@enduml

In the PlantUML Web Server I get :

http://www.plantuml.com/plantuml/png/JO_1QiOW48JlFiMG7d8g8TUU0haMKle2nUgcaHXNr112wRjNJNxuHL3cczsT7MAI8UsR5TVfMZXE1CqKSN1OTSHi7E4mQJ4EYZVFZbn2smdXfLhb3w7vk3zz0nbnoryzNdQdgTJhSNgVFl4hXB8oHZHZVIv_bR8xqpeyiGVF3_aDPiR9Em9vArN62ptbAC6GJa-N7w-LbpuPMOllG78Lug_SWPpEk_u3

So looks OK to me.

Which version of PlantUML are you using (PlantUML Web  Server is currently 1.2018.14)?

commented Dec 24, 2018 by boshka (3,940 points)
edited Dec 24, 2018 by boshka
no, it doesn't look ok. See the note is not handled properly - you just see it as a text "note top of..." etc.
commented Dec 25, 2018 by albert (3,520 points)
OK I see. when I looked at it I just saw the text and concluded it to be OK, but I see that it is just text and not a note.
0 votes
answered Dec 24, 2018 by boshka (3,940 points)
0 votes
answered Jan 5, 2019 by plantuml (295,000 points)

I must say I'm confused about the expected result.

Right now, you can have :

http://www.plantuml.com/plantuml/uml/ROun2i9044NxESKd5Yb3Mgj0MY7Y1MJ9J7H9d0sP3HRYtOsxiREQp-CDlCQYM-BwcAWgeI4AE8Xz5vvX6U7LF0lwoPcXh8Xcru_k9YZE-wWBECEEhpKEgx8CNeNRxjHTy2BAtqMRJlOJ-ck_AMN4C2CCF--OstmkkplbIPXeanjHtl8_

But I think it's not exactly what you are expecting.

Could you use some image editor to modify this result ? This way, we could better understand your need.

Thanks!

commented Jan 9, 2019 by boshka (3,940 points)
edited Jan 9, 2019 by boshka
I want almost the same result as you provided above BUT I want to place the note inside {...} of the class (not outside of {}). And in this case I want the note to be displayed somehow inside the class rectangle (not outside)

I am expecting this since it works the way I desribed for component already (please see example in the main description).

So, in short, I am expecting the same result as in http://www.plantuml.com/plantuml/uml/RO-noeDG38NtFCN1Vt0KrtyI75kmz0NAnSJseYPYhdGeVVVMQhT2XaF8-VXIUGfpMiQ1YXngIS0clYRSRUuHrICBsY6u8o-8fj3suIh8JdieCmJ7lhwK-5kKfOigN3V7vem7KMlZP2gQaDKhQEjiqD-DZqco2TPzp_utlUYu1UL16Cs1wBbE9Shl5ru0
BUT for class (that is, if you replace "component" with "class")

Does it make more sense?
...