Skip to content

Commit

Permalink
Fixes #5
Browse files Browse the repository at this point in the history
  • Loading branch information
sprymiker committed Jun 20, 2023
1 parent fed5165 commit dd29dfe
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
Binary file modified dsl/plantuml-and-mermaid/dsl/plugins/plugin-1.0-SNAPSHOT.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import com.structurizr.dsl.StructurizrDslPlugin;
import com.structurizr.dsl.StructurizrDslPluginContext;
import com.structurizr.model.SoftwareSystem;
import com.structurizr.model.Container;
import com.structurizr.model.Component;

public class MermaidEncoderPlugin implements StructurizrDslPlugin {

Expand All @@ -27,6 +29,16 @@ public void run(StructurizrDslPluginContext context) {
for (Section section : softwareSystem.getDocumentation().getSections()) {
section.setContent(encodeMermaid(context, section.getContent(), section.getFormat()));
}
for (Container container : softwareSystem.getContainers()) {
for (Section section : container.getDocumentation().getSections()) {
section.setContent(encodeMermaid(context, section.getContent(), section.getFormat()));
}
for (Component component : container.getComponents()) {
for (Section section : component.getDocumentation().getSections()) {
section.setContent(encodeMermaid(context, section.getContent(), section.getFormat()));
}
}
}
}

for (Decision decision : workspace.getDocumentation().getDecisions()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import com.structurizr.dsl.StructurizrDslPlugin;
import com.structurizr.dsl.StructurizrDslPluginContext;
import com.structurizr.model.SoftwareSystem;
import com.structurizr.model.Container;
import com.structurizr.model.Component;

public class PlantUMLEncoderPlugin implements StructurizrDslPlugin {

Expand All @@ -27,6 +29,16 @@ public void run(StructurizrDslPluginContext context) {
for (Section section : softwareSystem.getDocumentation().getSections()) {
section.setContent(encodePlantUML(context, section.getContent(), section.getFormat()));
}
for (Container container : softwareSystem.getContainers()) {
for (Section section : container.getDocumentation().getSections()) {
section.setContent(encodePlantUML(context, section.getContent(), section.getFormat()));
}
for (Component component : container.getComponents()) {
for (Section section : component.getDocumentation().getSections()) {
section.setContent(encodePlantUML(context, section.getContent(), section.getFormat()));
}
}
}
}

for (Decision decision : workspace.getDocumentation().getDecisions()) {
Expand Down

0 comments on commit dd29dfe

Please sign in to comment.