-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #407 from bci-oss/406-improve-diagram-generation
Improve Aspect Model Diagram generation
- Loading branch information
Showing
181 changed files
with
2,250 additions
and
11,096 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,8 +20,8 @@ jobs: | |
- name: Setup JDK | ||
uses: graalvm/setup-graalvm@v1 | ||
with: | ||
version: '22.3.1' | ||
java-version: '17' | ||
java-version: '17.0.8' | ||
distribution: 'graalvm' | ||
components: 'native-image,js' | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
native-image-job-reports: 'true' | ||
|
@@ -42,8 +42,8 @@ jobs: | |
# https://github.com/actions/virtual-environments/issues/3420#issuecomment-861342418 | ||
uses: al-cheb/[email protected] | ||
with: | ||
minimum-size: 16GB | ||
maximum-size: 16GB | ||
minimum-size: 32GB | ||
maximum-size: 32GB | ||
disk-root: "C:" | ||
|
||
- name: Set Swap Space (Linux) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,8 +66,8 @@ jobs: | |
- name: Setup JDK | ||
uses: graalvm/setup-graalvm@v1 | ||
with: | ||
version: '22.3.1' | ||
java-version: '17' | ||
java-version: '17.0.8' | ||
distribution: 'graalvm' | ||
components: 'native-image,js' | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
native-image-job-reports: 'true' | ||
|
@@ -135,8 +135,8 @@ jobs: | |
- name: Setup JDK | ||
uses: graalvm/setup-graalvm@v1 | ||
with: | ||
version: '22.3.1' | ||
java-version: '17' | ||
java-version: '17.0.8' | ||
distribution: 'graalvm' | ||
components: 'native-image,js' | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
native-image-job-reports: 'true' | ||
|
@@ -156,8 +156,8 @@ jobs: | |
# https://github.com/actions/virtual-environments/issues/3420#issuecomment-861342418 | ||
uses: al-cheb/[email protected] | ||
with: | ||
minimum-size: 16GB | ||
maximum-size: 16GB | ||
minimum-size: 32GB | ||
maximum-size: 32GB | ||
disk-root: "C:" | ||
|
||
- name: Build and run tests | ||
|
@@ -211,8 +211,8 @@ jobs: | |
- name: Setup JDK | ||
uses: graalvm/setup-graalvm@v1 | ||
with: | ||
version: '22.3.1' | ||
java-version: '17' | ||
java-version: '17.0.8' | ||
distribution: 'graalvm' | ||
components: 'native-image,js' | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
native-image-job-reports: 'false' | ||
|
@@ -230,7 +230,7 @@ jobs: | |
- name: Prepare release | ||
run: | | ||
# Create Windows CLI zip | ||
zip -9 -r samm-cli-windows.zip samm.exe *.dll lib/ | ||
zip -9 -r samm-cli-windows.zip samm.exe *.dll | ||
# Full release: Maven Central | ||
# The (apparently) only way to retrieve the staging profile id | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
...erators/src/main/java/org/eclipse/esmf/aspectmodel/generator/diagram/AbstractDiagram.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
/* | ||
* Copyright (c) 2023 Robert Bosch Manufacturing Solutions GmbH | ||
* | ||
* See the AUTHORS file(s) distributed with this work for additional | ||
* information regarding authorship. | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
* | ||
* SPDX-License-Identifier: MPL-2.0 | ||
*/ | ||
|
||
package org.eclipse.esmf.aspectmodel.generator.diagram; | ||
|
||
import java.util.Collection; | ||
import java.util.HashSet; | ||
import java.util.Set; | ||
|
||
class AbstractDiagram { | ||
private final Box focusBox; | ||
private final Set<Box> boxes; | ||
private final Set<Edge> edges; | ||
|
||
// Used for the special case where a value element is rendered as a string (as part of a parent's attribute) | ||
private String scalarValue = null; | ||
|
||
public AbstractDiagram( final Box focusBox ) { | ||
this.focusBox = focusBox; | ||
boxes = new HashSet<>(); | ||
addBox( focusBox ); | ||
edges = new HashSet<>(); | ||
} | ||
|
||
static final AbstractDiagram EMPTY = new AbstractDiagram( null ); | ||
|
||
public void addBox( final Box box ) { | ||
if ( box != null ) { | ||
boxes.add( box ); | ||
} | ||
} | ||
|
||
public void addEdge( final Edge edge ) { | ||
edges.add( edge ); | ||
} | ||
|
||
public void addBoxes( final Collection<Box> boxes ) { | ||
for ( final Box box : boxes ) { | ||
addBox( box ); | ||
} | ||
} | ||
|
||
public void addEdges( final Collection<Edge> edges ) { | ||
this.edges.addAll( edges ); | ||
} | ||
|
||
public void add( final AbstractDiagram abstractDiagram ) { | ||
addBoxes( abstractDiagram.getBoxes() ); | ||
addEdges( abstractDiagram.getEdges() ); | ||
} | ||
|
||
public void setScalarValue( final String value ) { | ||
scalarValue = value; | ||
} | ||
|
||
public Set<Box> getBoxes() { | ||
return boxes; | ||
} | ||
|
||
public Set<Edge> getEdges() { | ||
return edges; | ||
} | ||
|
||
public Box getFocusBox() { | ||
return focusBox; | ||
} | ||
|
||
public String getScalarValue() { | ||
return scalarValue; | ||
} | ||
} |
Oops, something went wrong.