Skip to content

Commit

Permalink
structurizr-dsl: !elements and !relationships now work inside dep…
Browse files Browse the repository at this point in the history
…loyment environment blocks.
  • Loading branch information
simonbrowndotje committed Nov 23, 2024
1 parent 69b7d39 commit 5cc29d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## 3.2.0 (unreleased)

- structurizr-dsl: Adds support for `element!=` expressions.
- structurizr-dsl: `!elements` and `!relationships` now work inside deployment environment blocks.

## 3.1.0 (4th November 2024)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,14 +383,14 @@ void parse(List<String> lines, File dslFile, boolean fragment, boolean includeIn
}
}

} else if (FIND_ELEMENTS_TOKEN.equalsIgnoreCase(firstToken) && (inContext(ModelDslContext.class) || inContext(ElementDslContext.class))) {
} else if (FIND_ELEMENTS_TOKEN.equalsIgnoreCase(firstToken) && (inContext(ModelDslContext.class) || inContext(DeploymentEnvironmentDslContext.class) || inContext(ElementDslContext.class))) {
Set<Element> elements = new FindElementsParser().parse(getContext(), tokens.withoutContextStartToken());

if (shouldStartContext(tokens)) {
startContext(new ElementsDslContext(getContext(), elements));
}

} else if (FIND_RELATIONSHIPS_TOKEN.equalsIgnoreCase(firstToken) && (inContext(ModelDslContext.class) || inContext(ElementDslContext.class))) {
} else if (FIND_RELATIONSHIPS_TOKEN.equalsIgnoreCase(firstToken) && (inContext(ModelDslContext.class) || inContext(DeploymentEnvironmentDslContext.class) || inContext(ElementDslContext.class))) {
Set<Relationship> relationships = new FindRelationshipsParser().parse(getContext(), tokens.withoutContextStartToken());

if (shouldStartContext(tokens)) {
Expand Down

0 comments on commit 5cc29d0

Please sign in to comment.