Skip to content

Commit 5df4252

Browse files
committed
improve reusability of PlantUMLBuilder
1 parent a8a074c commit 5df4252

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/language/generators/plantuml/ComponentDiagramGenerator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export class ComponentDiagramGenerator implements PlantUMLDiagramGenerator<Conte
3333

3434
createDiagram (node: ContextMap): string {
3535
if (node.boundedContexts.length === 0) {
36-
this.plantUMLBuilder.addEmptyDiagramNote()
36+
this.plantUMLBuilder.addEmptyDiagramNote('"Sorry, we cannot generate a component diagram. Your Context Map seems to be empty."')
3737
return this.plantUMLBuilder.build()
3838
}
3939

src/language/generators/plantuml/PlantUMLBuilder.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ export class PlantUMLBuilder {
99
this._content.push(content)
1010
}
1111

12-
addEmptyDiagramNote () {
13-
this.add('note "Sorry, we cannot generate a component diagram. Your Context Map seems to be empty." as EmptyDiagramError')
12+
addEmptyDiagramNote (message: string) {
13+
this.add(`note ${message} as EmptyDiagramError`)
1414
this.addLinebreak()
1515
}
1616

0 commit comments

Comments
 (0)