Component Diagram is not intepretered corrected when having Long Description

0 votes
asked Aug 4, 2024 in Bug by xiaoqi (700 points)

Hello,

I'm trying on the 7.10 of reference guide, which is the Long Description for Component Diagram.

My code is below:

@startuml

component comp1 [

    This component

    has a long comment

    and name on multiple

    lines!

]

interface int1

' component c1

comp1 -> int1

' remove c1

@enduml

Here is the diagram from web server:

//www.plantuml.com/plantuml/png/JSun3i8m30NGtQVuJ4mClG3g8TWGWzKQ6YcsgyJb_2H5HNZw-c_u7cjmYKqpJQwhcrYWfm5tGhlRaYf-j5SBLp2oswk37ZNR36CLk46t76dDiaDE9lL43qeMKfuy2LeQw8o_oO7eEtkv7bf4_IsTHh6vlVW1

When I add one "interface" it's not displayed as the "interface" notation in Component Diagram, but I've already have one Component. Only I create one another normal Component (then "remove" or "hide), the diagram is then intepretered as Component Diagram.

My feeling is the "Component" with long description is not considered as one normal "Component", which is one wrong behavior. Could you please help to check?

Thanks, Xiaoqi

commented Aug 6, 2024 by Martin (9,120 points)
Interesting.  I agree with your guess that a 'long description component' isn't used to determine the diagram type, which feels like a bug.
commented Mar 10 by The-Lu (79,040 points)

[Just for the record]

Here is the corresponding diagrams:

@startuml

component comp1 [
    This component
    has a long comment
    and name on multiple
    lines!
]

interface int1
' component c1
comp1 -> int1
' remove c1

@enduml

VS:

@startuml

component comp1 [
    This component
    has a long comment
    and name on multiple
    lines!
]

interface int1
comp1 -> int1

component c1
remove c1

@enduml

Regards,
Th.

1 Answer

0 votes
answered Mar 8 by dickmaley (4,020 points)

I am not seeing any problems related to a long message.

image

@startuml
!DIAGRAM = "component"
component comp1 [
    This component
    has a long comment
    and name on multiple
    lines!
]
interface int1
component c1

comp1 -> int1
int1 -> c1
@enduml

commented Mar 10 by The-Lu (79,040 points)
...