2
votes

I'm working on the documentation of a component using Doxygen and I want to include UMLdiagrams in between the text.

I know how to do most of it, as I simply need to copy the .tuml source into my .dox file and run doxygen. However, one of my diagrams is a class diagram that includes other .iuml files, like explained in the PlantUML site.

So, basically, I do:

@mainpage main_page MyDoxygen
\
...
\
@startuml
\
!include iuml_files/Class01.iuml
!include iuml_files/Class02.iuml
\
MainClass <|-- Class01
MainClass <|-- Class02
\
@enduml

Long story short, I don't know how to make Doxygen understand it must look for the .iuml files in the directory (relative path) I'm giving as argument to the include directive.

If I wasn't clear enough as to what I need, please let me know and I will try make it clearer.

Can I please get some help?

2

2 Answers

2
votes

I had a similar problem (I own the Word Add-in for plantuml)

You can specify the java property "plantuml.include.path" in the command line : java -Dplantuml.include.path="c:/mydir" -jar plantuml.jar atest1.txt (see http://plantuml.sourceforge.net/preprocessing.html)

I expect it'll work when you modify the batch file for calling Plantuml http://plantuml.sourceforge.net/doxygen.html

I had a similar request for my Word Addin for Plantuml and here it worked.

0
votes

The Real Answer

Use the PLANTUML_INCLUDE_PATH = ./someRelativeDir configuration, visible in the Doxygen wizard's DOT panel.

The include path is relative to your Doxygen config, ie the starting directory from which the doxygen config is taken.

A Red Herring

I'm leaving the rest of this answer here in case anyone found it previously.

I wrongly reported a bug because I needed new reading glasses and didn't notice a stray character in my path.

This was resolved as not a Doxygen bug

For any interested parties, this is what I saw.

Running PlantUML on generated file /Users/andydent/dev/touchgramdesign/doxygeneratedTG4IM/html/inline_umlgraph_1.pu
Preprocessor Error: Cannot include /Users/andydent/dev/touchgramdesign/doxygeneratedTG4IM/html/handDrawnStyle.iuml
Error line 2 in file: /Users/andydent/dev/touchgramdesign/doxygeneratedTG4IM/html/inline_umlgraph_1.pu
Some diagram description contains errors
error: Problems running PlantUML. Verify that the command 'java -jar "/Library/Java/Extensions/plantuml.jar" -h' works from the command line. Exit code: 1

This is using the configuration setting

PLANTUML_INCLUDE_PATH = ./iumltToCopy

Sharper eyes than mine (at the time) noticed the extra character in the path iuml t ToCopy