Why would a sequence diagram work directly with PlantUML but not within Doxygen?

0 votes
asked Feb 13 in Question / help by jen

I've embedded a simple PlantUML sequence diagram in a C source file.  When I call plantuml directly with the C file the sequence diagram is produced; however, when I use Doxygen I don't get a sequence diagram or any warnings related to plantuml.

My sequence diagram is basically:
/**
 * @startuml
 * a->b : func()
 * b->c : func()
 * c->d : func()
 * d->e : func()
 * e<-d : func()
 *
 *
a->c : func2()
 * c->e : func2(a)
 *
 * a->c : func3()
 * c->d : func()
 * d->e : func()
 * e<-c : func4()
 * @enduml
*/

Versions: doxygen 1.8.15, plantuml 1.2019.00

Thanks.

commented Feb 14 by albert (3,130 points)
I just tried it with version 1.8.15 and I don't have any problems (I used Plantuml version 1.2019.02beta1 but this should not be a problem).
Can you please post the results of the commands:
- doxygen -x <your_Doxyfile>
- doxygen -d extcmd <your_Doxyfile>
commented Feb 15 by jen
doxygen -x <your_Doxyfile>
# Difference with default Doxyfile 1.8.15
PROJECT_NAME           = "Test"
PROJECT_NUMBER         = P9
ABBREVIATE_BRIEF       =
EXTRACT_ALL            = YES
FILE_PATTERNS          =
EXAMPLE_PATTERNS       =
MATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest
LATEX_CMD_NAME         = latex
HAVE_DOT               = YES
UML_LOOK               = YES
PLANTUML_JAR_PATH      = /home/jbaker/PlantUML/plantuml.jar

I can't send the output of the other command.  Is there something specific?  Basically I get the following:
Searching for include files...
Searching for example files...
Searching for images...
Searching for dot files...
Searching for msc files...
Searching for dia files...
Searching for files to exclude
Searching INPUT for files to process...
Searching for files in directory /home/jbaker/P093/ecs/src
Reading and parsing tag files
Parsing files
Preprocessing ...
Parsing file ...
...
Building group list...
Building directory list...
Building namespace list...
Building file list...
Building class list...
Associating documentation with classes...
Computing nesting relations for classes...
Building example list...
Searching for enumerations...
Searching for documented typedefs...
Searching for members imported via using declarations...
Searching for included using directives...
Searching for documented variables...
Building interface member list...
Building member list...
Searching for friends...
Searching for documented defines...
Computing class inheritance relations...
Computing class usage relations...
Flushing cached template relations that have become invalid...
Computing class relations...
Add enum values to enums...
Searching for member function documentation...
Creating members for template instances...
Building page list...
Search for main page...
Computing page relations...
Determining the scope of groups...
Sorting lists...
Freeing entry tree
Determining which enums are documented
Computing member relations...
Building full member lists recursively...
Adding members to member groups.
Computing member references...
Inheriting documentation...
Generating disk names...
Adding source references...
Adding xrefitems...
Sorting member lists...
Computing dependencies between directories...
Generating citations page...
Counting data structures...
Resolving user defined references...
Finding anchors and sections in the documentation...
Transferring function references...
Combining using relations...
Adding members to index pages...
Generating style sheet...
Generating search indices...
Generating example documentation...
Generating file sources...
Generating code for file
...
Generating page documentation...
Generating group documentation...
Generating class documentation...
Generating docs for compound ...
...
a couple warnings are issued for a h file that is not where the sequence diagram lives.  They are in regards to not have an argument in @param and not documenting a param.  And one other warning that says an unsupported xml/html tag was found in a different h file.
Other than that it's just generating docs...
commented Feb 16 by albert (3,130 points)
I'm essentially looking for lines starting with: "Running PlantUML on generated file" and "Executing external command". What happens when you place your code from the question in a `.h` file and substitute the first line from `/**` to `/** \file`?
commented Feb 19 by jen
I did not have any such lines; however, you mentioned .h file... I had put the sequence diagram in the C file.  I just figured you could put the diagrams anywhere.  I guess that's not true.  I now see a sequence diagram in my doxygen output.  Thank you for your help!!
commented Feb 19 by albert (3,130 points)
In principle you can place a sequence diagram anywhere provided the file is processed by doxygen. I'm a bit confused by the, as far as I can see, contradictory statement: " I just figured you could put the diagrams anywhere.  I guess that's not true. " can you explain  what you meant here?
I just mentioned the `.h` file and the `/** \file` to be 100% sure that in the example the file is processed.

1 Answer

0 votes
answered Feb 20 by jen
For closure purposes: place your PlantUML in the h files and not in the C files.
...