Skip to content

Commit 8042ad5

Browse files
committed
GH-1063 - Polishing.
1 parent a800e20 commit 8042ad5

File tree

1 file changed

+6
-6
lines changed
  • spring-modulith-docs/src/main/java/org/springframework/modulith/docs

1 file changed

+6
-6
lines changed

spring-modulith-docs/src/main/java/org/springframework/modulith/docs/Documenter.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,8 @@ public Documenter writeAggregatingDocument(DiagramOptions diagramOptions, Canvas
250250

251251
// Get diagram file name, e.g. module-inventory.puml
252252
var fileNamePattern = diagramOptions.getTargetFileName().orElse(DEFAULT_MODULE_COMPONENTS_FILE);
253-
var filename = fileNamePattern.formatted(it.getName());
254-
var canvasFilename = canvasOptions.getTargetFileName(it.getName());
253+
var filename = fileNamePattern.formatted(it.getIdentifier());
254+
var canvasFilename = canvasOptions.getTargetFileName(it.getIdentifier().toString());
255255
var content = new StringBuilder();
256256

257257
content.append(folder.contains(filename) ? asciidoctor.renderPlantUmlInclude(filename) : "")
@@ -361,7 +361,7 @@ public Documenter writeModuleAsPlantUml(ApplicationModule module, DiagramOptions
361361

362362
var fileNamePattern = options.getTargetFileName().orElse(DEFAULT_MODULE_COMPONENTS_FILE);
363363

364-
return writeViewAsPlantUml(view, fileNamePattern.formatted(module.getName()), options);
364+
return writeViewAsPlantUml(view, fileNamePattern.formatted(module.getIdentifier()), options);
365365
}
366366

367367
/**
@@ -387,7 +387,7 @@ public Documenter writeModuleCanvases(CanvasOptions canvasOptions) {
387387

388388
modules.forEach(module -> {
389389

390-
var filename = canvasOptions.getTargetFileName(module.getName());
390+
var filename = canvasOptions.getTargetFileName(module.getIdentifier().toString());
391391

392392
options.outputFolder.writeToFile(filename, toModuleCanvas(module, canvasOptions));
393393
});
@@ -617,7 +617,7 @@ private ComponentView createComponentView(DiagramOptions options) {
617617

618618
private ComponentView createComponentView(DiagramOptions options, @Nullable ApplicationModule module) {
619619

620-
String prefix = module == null ? "modules-" : module.getName();
620+
String prefix = module == null ? "modules-" : module.getIdentifier().toString();
621621

622622
return workspace.getViews() //
623623
.createComponentView(container, prefix + options.toString(), "");
@@ -648,7 +648,7 @@ private static Component applyBackgroundColor(ApplicationModule module,
648648
// Apply custom color if configured
649649
selector.apply(module).ifPresent(color -> {
650650

651-
var tag = module.getName() + "-" + color;
651+
var tag = module.getIdentifier() + "-" + color;
652652
component.addTags(tag);
653653

654654
// Add or update background color

0 commit comments

Comments
 (0)