useShortClassNames
Description
With the help of this configuration toggle it is possible to show only the class names in the diagram without the package name (full qualified). Because full qualified names increase the size of the diagram enormously the toggle is activated by default.
The parameter itself targets all class names in the diagram, even the return types of the method calls which can be shown by the show return types parameter.
Example
In the following example there are three dependencies in the maven dependency hierarchy which build the classpath for all further generation:
<dependencies>
<dependency>
<groupId>de.elnarion.util</groupId>
<artifactId>plantuml-generator-util</artifactId>
<version>@project.version@</version>
<classifier>tests</classifier>
<type>test-jar</type>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.16.1</version>
</dependency>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>javax.persistence-api</artifactId>
<version>2.2</version>
</dependency>
</dependencies>
From this classpath the sequence diagram is generated, but here all types are also shown in a fully qualified manner in the diagram. This is similar to the JUnit-tests of the PlantUML generator utility:
<plugin>
<artifactId>plantuml-generator-maven-plugin</artifactId>
<groupId>de.elnarion.maven</groupId>
<version>@project.version@</version>
<executions>
<execution>
<id>generate-simple-diagram</id>
<goals>
<goal>generateSequenceDiagram</goal>
</goals>
<phase>generate-test-sources</phase>
<configuration>
<outputFilename>testsequencediagram1.txt</outputFilename>
<startClass>de.elnarion.test.sequence.t0001.CallerA</startClass>
<startMethod>callSomething</startMethod>
<useShortClassNames>false</useShortClassNames>
</configuration>
</execution>
</executions>
</plugin>
which is rendered this way:
and produces this PlantUML diagram text:
@startuml
participant de.elnarion.test.sequence.t0001.CallerA
participant de.elnarion.test.sequence.t0001.CallerB
activate de.elnarion.test.sequence.t0001.CallerA
de.elnarion.test.sequence.t0001.CallerA -> de.elnarion.test.sequence.t0001.CallerB : callSomething
activate de.elnarion.test.sequence.t0001.CallerB
de.elnarion.test.sequence.t0001.CallerB -> de.elnarion.test.sequence.t0001.CallerB : privateMethodCall
activate de.elnarion.test.sequence.t0001.CallerB
de.elnarion.test.sequence.t0001.CallerB --> de.elnarion.test.sequence.t0001.CallerB
deactivate de.elnarion.test.sequence.t0001.CallerB
de.elnarion.test.sequence.t0001.CallerB -> de.elnarion.test.sequence.t0001.CallerB : protectedMethodCall
activate de.elnarion.test.sequence.t0001.CallerB
de.elnarion.test.sequence.t0001.CallerB --> de.elnarion.test.sequence.t0001.CallerB
deactivate de.elnarion.test.sequence.t0001.CallerB
de.elnarion.test.sequence.t0001.CallerB --> de.elnarion.test.sequence.t0001.CallerA
deactivate de.elnarion.test.sequence.t0001.CallerB
de.elnarion.test.sequence.t0001.CallerA -> de.elnarion.test.sequence.t0001.CallerB : callSomethingElse
activate de.elnarion.test.sequence.t0001.CallerB
de.elnarion.test.sequence.t0001.CallerB --> de.elnarion.test.sequence.t0001.CallerA
deactivate de.elnarion.test.sequence.t0001.CallerB
deactivate de.elnarion.test.sequence.t0001.CallerA
@enduml
Without the parameter the diagram would look like this:
If used with an activated show return types toggle it looks like this: