Search code examples
clangdoxygenplantuml

plantuml command over multiple lines


When using plantuml in c style code comments /// then clang adds a \ line break into the comment.


    /// @startuml
    ///  m_alengthyline.xxxxxxxxxxxxxx .[#green].> \
    ///  another.lengthyline.xxxxxxxxxxxxxxxxxxxxxx : reads
    /// @enduml

Then I get a compiler warning multi-line comment [-Wcomment]

I do want to keep the line length constraint and I do want to keep the doxygen comment style. Is there any way to tell plantuml that the command goes over 2 lines or any other trick?

thank you

tried to find a propper command in the plantuml documentation


Solution

  • The only possibility I see is to reorganize your graph a bit like

    @startuml
     package m_alengthyline {
       class "xxxxxxxxxxxxxx" as X
     }
     package another
     {
       package lengthyline
       {
         class "xxxxxxxxxxxxxxxxxxxxx" as Y
       }
     }
     X.[#green].>  Y: reads
    @enduml
    

    Edit Based on the comment (see below): "this will change the character of the diagram and add new boxes If there is no solution, then i mix with multiline comments for lengthy lines /** * ... */ – Mat"

    I created for the original version, assuming this is:

    @startuml
    m_alengthyline.xxxxxxxxxxxxxx .[#green].> another.lengthyline.xxxxxxxxxxxxxxxxxxxxxx : reads
    @enduml
    

    and for the new version the diagram an in bot cases I get: enter image description here

    So the comment is unclear to me.