misintepretation of tooltip as operation

0 votes
asked Sep 4, 2020 in Bug by wolfgang_fahl (160 points)

When rendering:

 class Event_or << Entity >> {

   [[https://www.openresearch.org/wiki/Property:Event_in_series{foreign key(pagename) of the Event series this event belongs to} series]] : TEXT
  }

the attribute ends up in the operation compartment which it shouldn't. The (pagename) is not a parameter of operation but part of the tooltip.

3 Answers

–1 vote
answered Sep 4, 2020 by The-Lu (63,920 points)

Hello W.,

With the current version (V1.2020.17beta5), we does not observe your issue; we observe only:

See the result on the PlantUML online server:
If that can help,
Regards,
Th.
commented Sep 4, 2020 by wolfgang_fahl (160 points)

this is the issue - the series entry is in the lower operation compartment but it should be in the upper attribute compartment
compare to:
diagrams.bitplan.comIf you use the plantuml notation:

class Event_or << Entity >> {

   [[https://www.openresearch.org/wiki/Property:Event_in_series{foreign key  =pagename of the Event series this event belongs to} series]] : TEXT
  }
and paste it to http://diagrams.bitplan.com
commented Sep 5, 2020 by The-Lu (63,920 points)

Hello W,
Sorry I misunderstand the sentence :

the attribute ends up in the operation compartment which it shouldn't.

Now with the clarification, that more clear.

I understand the issue, between:

  • class attribute compartment: fields
  • class operator compartment: method

Regards,
Th.

0 votes
answered Sep 5, 2020 by The-Lu (63,920 points)

Hello W.,

Now I understand the issue, between:

  • class attribute compartment: fields
  • class operator compartment: method
To force the "series entry" to be on the upper attribute compartment, you can use the keyword:  {field}.
Here is the result:
@startuml
class Event_or << Entity >> {
   {field}[[https://www.openresearch.org/wiki/Property:Event_in_series{foreign key(pagename) of the Event series this event belongs to} series]] : TEXT
  }
@enduml
You can use {field} and {method} modifiers to override default behaviour of the parser about fields and methods.
If that can help,
Regards,
Th.
commented Sep 5, 2020 by wolfgang_fahl (160 points)
I'd rather see the parser fixed then having to use this awkward work-around. I think the parser is buggy if it looks for () in the tooltip {} description.  A proper parser e.g. created by a parser generator like ANTLR would never behave this way.
0 votes
answered Sep 22, 2020 by plantuml (294,960 points)
Thanks for the report: this is fixed in last beta http://beta.plantuml.net/plantuml.jar and on the online server
...