Skip to content

Commit

Permalink
mka feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Drakae committed Feb 20, 2024
1 parent 0816bf1 commit 8c77644
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions extension/src-language-server/stpa/diagram/diagram-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ export class StpaDiagramGenerator extends LangiumDiagramGenerator {
const sysCons = collectElementsWithSubComps(filteredModel.systemLevelConstraints);
stpaChildren = stpaChildren?.concat([
...hazards
.map(sh =>
.map(hazard =>
this.generateAspectWithEdges(
sh,
hazard,
showLabels === showLabelsValue.ALL ||
showLabels === showLabelsValue.HAZARDS ||
(showLabels === showLabelsValue.AUTOMATIC &&
Expand All @@ -124,9 +124,9 @@ export class StpaDiagramGenerator extends LangiumDiagramGenerator {
)
.flat(1),
...sysCons
.map(ssc =>
.map(systemConstraint =>
this.generateAspectWithEdges(
ssc,
systemConstraint,
showLabels === showLabelsValue.ALL ||
showLabels === showLabelsValue.SYSTEM_CONSTRAINTS ||
(showLabels === showLabelsValue.AUTOMATIC &&
Expand All @@ -140,9 +140,9 @@ export class StpaDiagramGenerator extends LangiumDiagramGenerator {
// subcomponents are contained in the parent
stpaChildren = stpaChildren?.concat([
...filteredModel.hazards
?.map(h =>
?.map(hazard =>
this.generateAspectWithEdges(
h,
hazard,
showLabels === showLabelsValue.ALL ||
showLabels === showLabelsValue.HAZARDS ||
(showLabels === showLabelsValue.AUTOMATIC &&
Expand All @@ -152,9 +152,9 @@ export class StpaDiagramGenerator extends LangiumDiagramGenerator {
)
.flat(1),
...filteredModel.systemLevelConstraints
?.map(sc =>
?.map(systemConstraint =>
this.generateAspectWithEdges(
sc,
systemConstraint,
showLabels === showLabelsValue.ALL ||
showLabels === showLabelsValue.SYSTEM_CONSTRAINTS ||
(showLabels === showLabelsValue.AUTOMATIC &&
Expand All @@ -164,7 +164,7 @@ export class StpaDiagramGenerator extends LangiumDiagramGenerator {
)
.flat(1),
...filteredModel.systemLevelConstraints
?.map(sc => sc.subComponents?.map(ssc => this.generateEdgesForSTPANode(ssc, args)))
?.map(systemConstraint => systemConstraint.subComponents?.map(subsystemConstraint => this.generateEdgesForSTPANode(subsystemConstraint, args)))
.flat(2),
]);
}
Expand Down
2 changes: 1 addition & 1 deletion extension/src-webview/stpa/stpa-views.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -259,4 +259,4 @@ export class HeaderLabelView extends SLabelView {
{super.render(label, context)}
</g>
}
}
}

0 comments on commit 8c77644

Please sign in to comment.