Skip to content

Commit

Permalink
Fixes #274
Browse files Browse the repository at this point in the history
Co-authored-by: Nicolas Delsaux <nicolas.delsaux@gmx.fr>
  • Loading branch information
Se-C12 and Riduidel authored Jan 2, 2023
1 parent 65d62f4 commit 4ade8da
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
Original file line number Diff line number Diff line change
@@ -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() {
Expand All @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!-- See latest version here: https://mvnrepository.com/artifact/com.structurizr/structurizr-client -->
<version.structurizr.client>1.15.2</version.structurizr.client>
<version.structurizr.client>1.16.2</version.structurizr.client>
<!-- See latest version here: https://mvnrepository.com/artifact/com.structurizr/structurizr-plantuml -->
<version.structurizr.export>1.7.0</version.structurizr.export>
<version.structurizr.analysis>1.3.5</version.structurizr.analysis>
Expand Down Expand Up @@ -105,7 +105,7 @@
<dependency>
<groupId>com.structurizr</groupId>
<artifactId>structurizr-dsl</artifactId>
<version>1.20.0</version>
<version>1.21.1</version>
</dependency>
<dependency>
<groupId>com.structurizr</groupId>
Expand Down

0 comments on commit 4ade8da

Please sign in to comment.