useSmetana

Description

With this configuration toggle you can activte smetana as replacement for GraphViz/Dot for layouting (see smetana-documentation ).

Default value

The default value of this configuration option is false (smetana is not activated).

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+", ""));
1 activate the useSmetana toggle in the configuration

which is rendered this way:

0027_use_semtana_diagram

and produces this PlantUML diagram text:

@startuml
!pragma layout smetana

class de.elnarion.test.domain.t0027.TestClass {
    {field} -testString : String
}

@enduml