From 8042ad5b9a19181a7f2ce9fe2d2a40f0a61b3997 Mon Sep 17 00:00:00 2001 From: Oliver Drotbohm Date: Fri, 21 Feb 2025 23:02:17 +0100 Subject: [PATCH] GH-1063 - Polishing. --- .../springframework/modulith/docs/Documenter.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/spring-modulith-docs/src/main/java/org/springframework/modulith/docs/Documenter.java b/spring-modulith-docs/src/main/java/org/springframework/modulith/docs/Documenter.java index 91c72b59..f2890a7f 100644 --- a/spring-modulith-docs/src/main/java/org/springframework/modulith/docs/Documenter.java +++ b/spring-modulith-docs/src/main/java/org/springframework/modulith/docs/Documenter.java @@ -250,8 +250,8 @@ public class Documenter { // Get diagram file name, e.g. module-inventory.puml var fileNamePattern = diagramOptions.getTargetFileName().orElse(DEFAULT_MODULE_COMPONENTS_FILE); - var filename = fileNamePattern.formatted(it.getName()); - var canvasFilename = canvasOptions.getTargetFileName(it.getName()); + var filename = fileNamePattern.formatted(it.getIdentifier()); + var canvasFilename = canvasOptions.getTargetFileName(it.getIdentifier().toString()); var content = new StringBuilder(); content.append(folder.contains(filename) ? asciidoctor.renderPlantUmlInclude(filename) : "") @@ -361,7 +361,7 @@ public class Documenter { var fileNamePattern = options.getTargetFileName().orElse(DEFAULT_MODULE_COMPONENTS_FILE); - return writeViewAsPlantUml(view, fileNamePattern.formatted(module.getName()), options); + return writeViewAsPlantUml(view, fileNamePattern.formatted(module.getIdentifier()), options); } /** @@ -387,7 +387,7 @@ public class Documenter { modules.forEach(module -> { - var filename = canvasOptions.getTargetFileName(module.getName()); + var filename = canvasOptions.getTargetFileName(module.getIdentifier().toString()); options.outputFolder.writeToFile(filename, toModuleCanvas(module, canvasOptions)); }); @@ -617,7 +617,7 @@ public class Documenter { private ComponentView createComponentView(DiagramOptions options, @Nullable ApplicationModule module) { - String prefix = module == null ? "modules-" : module.getName(); + String prefix = module == null ? "modules-" : module.getIdentifier().toString(); return workspace.getViews() // .createComponentView(container, prefix + options.toString(), ""); @@ -648,7 +648,7 @@ public class Documenter { // Apply custom color if configured selector.apply(module).ifPresent(color -> { - var tag = module.getName() + "-" + color; + var tag = module.getIdentifier() + "-" + color; component.addTags(tag); // Add or update background color