PlantUML using Doxygen

0 votes
asked Jul 6, 2016 in Closed question / help by HankB (140 points)
I'm striving to incorporate PlantUML output in Doxygen output and driving this with the Cygwin toolkit. I'm running into two problems that probably relate to mixing Cygwin and DOS/Win programs. I have the following script which automates the process:

#!/bin/bash

export PATH="$PATH":'/cygdrive/c/Program Files (x86)/Java/jre6/bin'

export GRAPHVIZ_DOT="C:/Program Files (x86)/Graphviz2.38/bin/dot.exe"

export PLANTUML_JAR=bin/plantuml.jar

export PLANTUML_JAR_PATH=$PLANTUML_JAR

# Create *.png files from text @startuml code and output *.png images to ./doc-src/images folder

# Recusively search from current folder scanning *.c, *.cpp, *.h, and *.doc files

java  -Djava.awt.headless=true -jar `cygpath -wa $PLANTUML_JAR` -v -o doc-src/images  "./**.(c|cpp|doc|h)"

#doxygen

If I run the script I get the following output:

hank.barta@US-L16-0033 ~/Documents/process/template

$ bin/PlantUML.sh

(0.000 - 15 Mo) 14 Mo - PlantUML Version 8043

(0.003 - 15 Mo) 14 Mo - GraphicsEnvironment.isHeadless() true

(0.003 - 15 Mo) 14 Mo - Forcing -Djava.awt.headless=true

(0.003 - 15 Mo) 14 Mo - java.awt.headless set as true

If I copy/paste the script contents to the bash command line it produces the desired output file:

hank.barta@US-L16-0033 ~/Documents/process/template

$ java  -Djava.awt.headless=true -jar `cygpath -wa $PLANTUML_JAR` -v -o doc-src/images  "./**.(c|cpp|doc|h)"

(0.000 - 15 Mo) 14 Mo - PlantUML Version 8043

(0.002 - 15 Mo) 14 Mo - GraphicsEnvironment.isHeadless() true

(0.002 - 15 Mo) 14 Mo - Forcing -Djava.awt.headless=true

(0.002 - 15 Mo) 14 Mo - java.awt.headless set as true

(0.085 - 15 Mo) 13 Mo - Setting current dir: .

(0.085 - 15 Mo) 13 Mo - Setting current dir: C:\Users\hank.barta\Documents\process\template\.

(0.086 - 15 Mo) 12 Mo - Using default charset

(0.089 - 15 Mo) 12 Mo - Setting current dir: C:\Users\hank.barta\Documents\process\template\.

(0.102 - 15 Mo) 11 Mo - Setting current dir: C:\Users\hank.barta\Documents\process\template\.

(0.102 - 15 Mo) 11 Mo - Reading file: .\hello_sandc.cpp

(0.102 - 15 Mo) 11 Mo - name from block=ZipCmd_ZipComp_Communication.png

(0.102 - 15 Mo) 11 Mo - Checking=ZipCmd_ZipComp_Communication.png

(0.102 - 15 Mo) 11 Mo - f=ZipCmd_ZipComp_Communication.png

(0.102 - 15 Mo) 11 Mo - Relative, so let's change it

(0.102 - 15 Mo) 11 Mo - f=C:\Users\hank.barta\Documents\process\template\doc-src\images\ZipCmd_ZipComp_Communication.png

(0.103 - 15 Mo) 11 Mo - It's not a directory

(0.103 - 15 Mo) 11 Mo - ZipCmd_ZipComp_Communication.png is not taken as a directory

(0.103 - 15 Mo) 11 Mo - We are going to put data in C:\Users\hank.barta\Documents\process\template\doc-src\images\ZipCmd_Zi                                pComp_Communication.png

(0.437 - 15 Mo) 10 Mo - Creating file: C:\Users\hank.barta\Documents\process\template\doc-src\images\ZipCmd_ZipComp_Communi                                cation.png

(0.479 - 15 Mo) 10 Mo - Creating image 271x222

(0.518 - 15 Mo) 9 Mo - Ok for com.sun.imageio.plugins.png.PNGMetadata

(0.586 - 15 Mo) 9 Mo - File size : 5915

(0.588 - 15 Mo) 8 Mo - Number of image(s): 1

(0.588 - 15 Mo) 8 Mo - Setting current dir: C:\Users\hank.barta\Documents\process\template\.

(0.589 - 15 Mo) 8 Mo - Using default charset

(0.589 - 15 Mo) 8 Mo - Setting current dir: C:\Users\hank.barta\Documents\process\template\.

(0.591 - 15 Mo) 8 Mo - Setting current dir: C:\Users\hank.barta\Documents\process\template\.

(0.591 - 15 Mo) 8 Mo - Reading file: .\hello_sandc.h

(0.591 - 15 Mo) 8 Mo - Number of image(s): 0

hank.barta@US-L16-0033 ~/Documents/process/template

(commands to set the environment variables left out for brevity.)

Any help resolving this are most welcome. I can provide more information on request. (If I try to include it all in the original post, it is rejected.)

Thanks!

1 Answer

0 votes
answered Jul 6, 2016 by plantuml (298,440 points)
Ok.
If I translate to English this:
- PlantUML reads hello_sandc.cpp
- There seems to be a @startuml in hello_sandc.cpp
- An image is successfully created in C:\Users\hank.barta\Documents\process\template\doc-src\images\
- PlantUML reads hello_sandc.h
- There is no @startuml in hello_sandc.h

From the log point of view everything looks fine, so we need more information here.
commented Jul 6, 2016 by HankB (140 points)
Thank you for the reply.

There are actually two logs above. (I had tried to format that to show this a little better but the post was repeatedly rejected because it exceeded the 8k character count. Apparently the formatting characters take a lot of space.)

The first log is when the command is run from within a script and produces the following lines:
  $ bin/PlantUML.sh
  (0.000 - 15 Mo) 14 Mo - PlantUML Version 8043
  (0.003 - 15 Mo) 14 Mo - GraphicsEnvironment.isHeadless() true
  (0.003 - 15 Mo) 14 Mo - Forcing -Djava.awt.headless=true
  (0.003 - 15 Mo) 14 Mo - java.awt.headless set as true
 
The other log is when run directly from the command line and indicates expected operation (as summarized in your post.) This is likely a Cygwin issue (too) but I thought I'd ask here in case someone had run into this before and resolved it.

Thanks!
...