diff --git a/architecture-documentation/src/architecture/resources/workspace.dsl b/architecture-documentation/src/architecture/resources/workspace.dsl index df545208..46a6c353 100644 --- a/architecture-documentation/src/architecture/resources/workspace.dsl +++ b/architecture-documentation/src/architecture/resources/workspace.dsl @@ -49,9 +49,17 @@ workspace "aadarchi-documentation-system" { } container "aadarchi" "system_containers" "Agile architecture containers" { include * + + properties { + "aadarchi.auto.update" "true" + } } component "aadarchi_base" "base_components" "Agile architecture base components view" { include * + + properties { + "aadarchi.auto.update" "true" + } } } } \ No newline at end of file diff --git a/base/src/main/java/org/ndx/aadarchi/base/enhancers/ModelElementKeys.java b/base/src/main/java/org/ndx/aadarchi/base/enhancers/ModelElementKeys.java index 73901c36..b13bd81b 100644 --- a/base/src/main/java/org/ndx/aadarchi/base/enhancers/ModelElementKeys.java +++ b/base/src/main/java/org/ndx/aadarchi/base/enhancers/ModelElementKeys.java @@ -72,6 +72,11 @@ interface DisabledFontIcons { String NAME = ModelElementKeys.PREFIX+"fonticon.disabled"; String VALUE = "false"; } + + interface AutoUpdateViews { + String NAME = ModelElementKeys.PREFIX+"auto.update"; + String VALUE = "false"; + } } interface Scm { diff --git a/architecture-documentation/src/main/java/org/ndx/aadarchi/ViewUpdater.java b/base/src/main/java/org/ndx/aadarchi/base/enhancers/graph/ViewUpdater.java similarity index 77% rename from architecture-documentation/src/main/java/org/ndx/aadarchi/ViewUpdater.java rename to base/src/main/java/org/ndx/aadarchi/base/enhancers/graph/ViewUpdater.java index 040c4ced..0321f662 100644 --- a/architecture-documentation/src/main/java/org/ndx/aadarchi/ViewUpdater.java +++ b/base/src/main/java/org/ndx/aadarchi/base/enhancers/graph/ViewUpdater.java @@ -1,17 +1,17 @@ -package org.ndx.aadarchi; - -import java.util.logging.Logger; - -import javax.inject.Inject; +package org.ndx.aadarchi.base.enhancers.graph; +import com.structurizr.view.ComponentView; +import com.structurizr.view.ContainerView; import org.ndx.aadarchi.base.OutputBuilder; - +import org.ndx.aadarchi.base.enhancers.ModelElementKeys; import org.ndx.aadarchi.base.enhancers.ViewEnhancerAdapter; -import com.structurizr.view.ComponentView; -import com.structurizr.view.ContainerView; +import javax.inject.Inject; +import java.util.logging.Logger; public class ViewUpdater extends ViewEnhancerAdapter { + public static final String NAME = ModelElementKeys.ConfigProperties.AutoUpdateViews.NAME; + @Inject Logger logger; @Override public boolean isParallel() { @@ -36,14 +36,14 @@ protected boolean startVisit(ComponentView c) { @Override protected void endVisit(ComponentView c, OutputBuilder builder) { - if(c.getKey().equals("base_components")) { + if(c.getProperties().containsKey(NAME)) { c.addAllComponents(); } super.endVisit(c, builder); } @Override protected void endVisit(ContainerView c, OutputBuilder builder) { - if(c.getKey().equals("system_containers")) { + if (c.getProperties().containsKey(NAME)) { c.addAllContainersAndInfluencers(); } super.endVisit(c, builder); diff --git a/pom.xml b/pom.xml index 15f33989..23d4edb5 100644 --- a/pom.xml +++ b/pom.xml @@ -17,7 +17,7 @@ UTF-8 UTF-8 - 1.15.2 + 1.16.2 1.7.0 1.3.5 @@ -104,7 +104,7 @@ com.structurizr structurizr-dsl - 1.20.0 + 1.21.1 com.structurizr