Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Features/274 update view after enhancements #288

Merged
merged 7 commits into from
Jan 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 {
Riduidel marked this conversation as resolved.
Show resolved Hide resolved
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 @@ -104,7 +104,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