useSmetana
Description
With this configuration toggle you can activte smetana as replacement for GraphViz/Dot for layouting (see smetana-documentation ).
Example
Here is an example from the JUnit tests using this configuration parameter:
List<String> scanPackages = new ArrayList<>();
scanPackages.add("de.elnarion.test.domain.t0027");
PlantUMLClassDiagramConfig config = new PlantUMLClassDiagramConfigBuilder(scanPackages)
.withUseSmetana(true).build(); (1)
PlantUMLClassDiagramGenerator generator = new PlantUMLClassDiagramGenerator(config);
String result = generator.generateDiagramText();
String expectedDiagramText = IOUtils.toString(
Objects.requireNonNull(classLoader.getResource("class/0027_use_smetana.txt")), StandardCharsets.UTF_8);
assertNotNull(result);
assertNotNull(expectedDiagramText);
assertEquals(expectedDiagramText.replaceAll("\\s+", ""), result.replaceAll("\\s+", ""));
which is rendered this way:
and produces this PlantUML diagram text:
@startuml
!pragma layout smetana
class de.elnarion.test.domain.t0027.TestClass {
{field} -testString : String
}
@enduml