use of com.structurizr.io.plantuml.C4PlantUMLWriter in project agile-architecture-documentation-system by Riduidel.
the class GraphEmitter method writeAllViews.
private void writeAllViews(Workspace workspace) {
Layout layout = C4PlantUMLWriter.Layout.valueOf(layoutMode);
PlantUMLWriter plantUMLWriter = new C4PlantUMLWriter(layout, plantumlPencils);
// Hints to have arrows more easily visible
plantUMLWriter.addSkinParam("pathHoverColor", "GreenYellow");
plantUMLWriter.addSkinParam("ArrowThickness", "3");
plantUMLWriter.addSkinParam("svgLinkTarget", "_parent");
destination.mkdirs();
plantUMLWriter.toPlantUMLDiagrams(workspace).stream().parallel().forEach(diagram -> {
// Incredibly enough, that's not a view!
Path path = new File(destination, diagram.getKey() + ".plantuml").toPath();
try {
Files.write(path, diagram.getDefinition().getBytes(Charset.forName("UTF-8")));
logger.info(String.format("Generated diagram %s in file %s", diagram.getKey(), path));
} catch (IOException e) {
throw new CantWriteDiagram(String.format("Can't write diagram %s in file %s", diagram.getKey(), path), e);
}
});
}
Aggregations