@likec4/language-server 1.41.0 → 1.42.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/browser/package.json +4 -0
  2. package/browser-worker/package.json +4 -0
  3. package/dist/LikeC4LanguageServices.d.ts +1 -1
  4. package/dist/LikeC4LanguageServices.mjs +3 -2
  5. package/dist/Rpc.mjs +30 -24
  6. package/dist/ast.d.ts +1 -7
  7. package/dist/ast.mjs +0 -10
  8. package/dist/bundled.mjs +4125 -3660
  9. package/dist/documentation/documentation-provider.mjs +1 -1
  10. package/dist/filesystem/FileSystemWatcher.d.ts +2 -2
  11. package/dist/filesystem/LikeC4FileSystem.mjs +10 -4
  12. package/dist/filesystem/index.d.ts +1 -1
  13. package/dist/formatting/LikeC4Formatter.mjs +41 -10
  14. package/dist/formatting/utils.d.ts +3 -3
  15. package/dist/formatting/utils.mjs +1 -1
  16. package/dist/generated/ast.d.ts +35 -16
  17. package/dist/generated/ast.mjs +69 -26
  18. package/dist/generated/grammar.mjs +1 -1
  19. package/dist/lsp/CompletionProvider.mjs +1 -1
  20. package/dist/lsp/DocumentLinkProvider.d.ts +1 -1
  21. package/dist/lsp/DocumentLinkProvider.mjs +1 -1
  22. package/dist/lsp/DocumentSymbolProvider.mjs +1 -1
  23. package/dist/mcp/NoopLikeC4MCPServer.d.ts +1 -1
  24. package/dist/mcp/NoopLikeC4MCPServer.mjs +1 -1
  25. package/dist/mcp/server/StdioLikeC4MCPServer.mjs +4 -1
  26. package/dist/mcp/server/StreamableLikeC4MCPServer.mjs +3 -3
  27. package/dist/mcp/server/WithMCPServer.mjs +2 -2
  28. package/dist/mcp/tools/_common.mjs +2 -2
  29. package/dist/model/builder/MergedSpecification.d.ts +3 -3
  30. package/dist/model/builder/MergedSpecification.mjs +13 -39
  31. package/dist/model/builder/buildModel.mjs +14 -17
  32. package/dist/model/model-builder.d.ts +1 -1
  33. package/dist/model/model-builder.mjs +12 -9
  34. package/dist/model/model-locator.d.ts +5 -0
  35. package/dist/model/model-locator.mjs +40 -3
  36. package/dist/model/model-parser-where.mjs +1 -2
  37. package/dist/model/model-parser.d.ts +19 -2
  38. package/dist/model/parser/Base.mjs +8 -8
  39. package/dist/model/parser/DeploymentModelParser.d.ts +1 -0
  40. package/dist/model/parser/DeploymentModelParser.mjs +7 -7
  41. package/dist/model/parser/DeploymentViewParser.d.ts +1 -0
  42. package/dist/model/parser/FqnRefParser.d.ts +2 -0
  43. package/dist/model/parser/FqnRefParser.mjs +16 -11
  44. package/dist/model/parser/GlobalsParser.d.ts +8 -2
  45. package/dist/model/parser/ModelParser.d.ts +1 -0
  46. package/dist/model/parser/ModelParser.mjs +16 -11
  47. package/dist/model/parser/PredicatesParser.d.ts +1 -0
  48. package/dist/model/parser/SpecificationParser.mjs +4 -4
  49. package/dist/model/parser/ViewsParser.d.ts +12 -2
  50. package/dist/model/parser/ViewsParser.mjs +123 -31
  51. package/dist/model-change/ModelChanges.d.ts +1 -1
  52. package/dist/module.mjs +3 -2
  53. package/dist/protocol.d.ts +28 -4
  54. package/dist/references/scope-computation.mjs +2 -3
  55. package/dist/references/scope-provider.d.ts +2 -2
  56. package/dist/references/scope-provider.mjs +8 -15
  57. package/dist/test/testServices.d.ts +2 -0
  58. package/dist/test/testServices.mjs +10 -11
  59. package/dist/utils/disposable.mjs +2 -2
  60. package/dist/utils/index.mjs +1 -1
  61. package/dist/validation/_shared.d.ts +1 -1
  62. package/dist/validation/deployment-checks.d.ts +1 -1
  63. package/dist/validation/deployment-checks.mjs +4 -1
  64. package/dist/validation/dynamic-view.d.ts +3 -2
  65. package/dist/validation/dynamic-view.mjs +21 -2
  66. package/dist/validation/element-ref.d.ts +2 -2
  67. package/dist/validation/element-ref.mjs +1 -1
  68. package/dist/validation/imports.d.ts +0 -1
  69. package/dist/validation/imports.mjs +0 -5
  70. package/dist/validation/index.d.ts +1 -1
  71. package/dist/validation/index.mjs +19 -13
  72. package/dist/validation/view-predicates/relation-with.d.ts +1 -1
  73. package/dist/validation/view.d.ts +1 -1
  74. package/dist/view-utils/index.d.ts +0 -1
  75. package/dist/view-utils/index.mjs +0 -1
  76. package/dist/views/likec4-views.d.ts +6 -0
  77. package/dist/views/likec4-views.mjs +31 -18
  78. package/dist/workspace/ProjectsManager.d.ts +23 -31
  79. package/dist/workspace/ProjectsManager.mjs +78 -89
  80. package/dist/workspace/WorkspaceManager.mjs +1 -1
  81. package/likec4lib/package.json +4 -0
  82. package/package.json +24 -28
  83. package/protocol/package.json +4 -0
  84. package/dist/view-utils/resolve-relative-paths.d.ts +0 -2
  85. package/dist/view-utils/resolve-relative-paths.mjs +0 -78
@@ -25,7 +25,7 @@ export class LikeC4DocumentationProvider {
25
25
  const instance = this.parser.forDocument(doc).parseDeployedInstance(node);
26
26
  const [projectId, fqn] = FqnRef.isImportRef(instance.element) ? [instance.element.project, instance.element.model] : [doc.likec4ProjectId, instance.element.model];
27
27
  const el = projectId ? this.locator.getParsedElement(fqn, projectId) : this.locator.getParsedElement(fqn);
28
- const lines = [instance.id, `_instance of_ ${instance.element}`];
28
+ const lines = [instance.id, `_instance of_ ${fqn}`];
29
29
  if (el) {
30
30
  lines.push(" ", `**${el.title}**`);
31
31
  }
@@ -1,5 +1,5 @@
1
- import { type AsyncDisposable } from 'langium';
2
- import { type LikeC4SharedServices } from '../module';
1
+ import type { AsyncDisposable } from 'langium';
2
+ import type { LikeC4SharedServices } from '../module';
3
3
  export interface FileSystemWatcherModuleContext {
4
4
  fileSystemWatcher: (services: LikeC4SharedServices) => FileSystemWatcher;
5
5
  }
@@ -4,9 +4,10 @@ import { URI } from "langium";
4
4
  import { NodeFileSystemProvider } from "langium/node";
5
5
  import { LikeC4LanguageMetaData } from "../generated/module.mjs";
6
6
  import { Content, isLikeC4Builtin } from "../likec4lib.mjs";
7
- import { logError } from "../logger.mjs";
7
+ import { logger as rootLogger } from "../logger.mjs";
8
8
  import { chokidarFileSystemWatcher } from "./ChokidarWatcher.mjs";
9
9
  import { noopFileSystemWatcher } from "./FileSystemWatcher.mjs";
10
+ const logger = rootLogger.getChild("filesystem");
10
11
  export const LikeC4FileSystem = (ehableWatcher = true) => ({
11
12
  fileSystemProvider: () => new SymLinkTraversingFileSystemProvider(),
12
13
  ...ehableWatcher ? chokidarFileSystemWatcher : noopFileSystemWatcher
@@ -18,7 +19,12 @@ class SymLinkTraversingFileSystemProvider extends NodeFileSystemProvider {
18
19
  if (isLikeC4Builtin(uri)) {
19
20
  return Promise.resolve(Content);
20
21
  }
21
- return await super.readFile(uri);
22
+ try {
23
+ return await super.readFile(uri);
24
+ } catch (error) {
25
+ logger.error(`Failed to read file ${uri.fsPath}`, { error });
26
+ return "";
27
+ }
22
28
  }
23
29
  async readDirectory(folderPath) {
24
30
  const entries = [];
@@ -32,7 +38,7 @@ class SymLinkTraversingFileSystemProvider extends NodeFileSystemProvider {
32
38
  });
33
39
  }
34
40
  } catch (error) {
35
- logError(error);
41
+ logger.error(`Failed to read directory ${folderPath.fsPath}`, { error });
36
42
  }
37
43
  return entries;
38
44
  }
@@ -48,7 +54,7 @@ class SymLinkTraversingFileSystemProvider extends NodeFileSystemProvider {
48
54
  });
49
55
  }
50
56
  } catch (error) {
51
- logError(error);
57
+ logger.error(`Failed to scan project files ${folderUri.fsPath}`, { error });
52
58
  }
53
59
  return entries;
54
60
  }
@@ -1,4 +1,4 @@
1
- import { type LikeC4ProjectConfig } from '@likec4/config';
1
+ import type { LikeC4ProjectConfig } from '@likec4/config';
2
2
  import type { FileSystemNode, FileSystemProvider as LangiumFileSystemProvider, LangiumSharedCoreServices } from 'langium';
3
3
  import { URI } from 'vscode-uri';
4
4
  import { type FileSystemWatcherModuleContext } from './FileSystemWatcher';
@@ -6,6 +6,7 @@ import { AbstractFormatter, Formatting } from "langium/lsp";
6
6
  import { filter, isTruthy } from "remeda";
7
7
  import * as ast from "../generated/ast.mjs";
8
8
  import * as utils from "./utils.mjs";
9
+ import { isMultiline } from "./utils.mjs";
9
10
  const FormattingOptions = {
10
11
  newLine: Formatting.newLine({ allowMore: true }),
11
12
  oneSpace: Formatting.oneSpace(),
@@ -64,7 +65,7 @@ export class LikeC4Formatter extends AbstractFormatter {
64
65
  }
65
66
  formatTags(node) {
66
67
  this.on(node, ast.isTags, (n, f) => {
67
- const tags = GrammarUtils.findNodesForProperty(n.$cstNode, "values").filter((x) => x).slice(1);
68
+ const tags = GrammarUtils.findNodesForProperty(n.$cstNode, "values").filter(isTruthy).slice(1);
68
69
  f.cst(tags).prepend(FormattingOptions.oneSpace);
69
70
  f.keywords(",").prepend(FormattingOptions.noSpace).append(FormattingOptions.oneSpace);
70
71
  });
@@ -109,6 +110,27 @@ export class LikeC4Formatter extends AbstractFormatter {
109
110
  f.keywords("]->").prepend(FormattingOptions.noSpace).append(FormattingOptions.oneSpace);
110
111
  f.keywords("-[").prepend(FormattingOptions.oneSpace).append(FormattingOptions.noSpace);
111
112
  f.properties("title").prepend(FormattingOptions.oneSpace);
113
+ const wrapToNextLine = (
114
+ // Dynamic step chain with multiline source
115
+ ast.isDynamicStepChain(n) && isMultiline(n.$cstNode) || ast.isDynamicStepSingle(n) && ast.isDynamicStepChain(n.$container) && isMultiline(n.$container.$cstNode)
116
+ );
117
+ if (!wrapToNextLine) {
118
+ return;
119
+ }
120
+ f.property("dotKind").prepend(Formatting.indent({ allowLess: false, allowMore: true, priority: 2 }));
121
+ f.keywords("->", "-[").prepend(Formatting.indent({ allowLess: false, allowMore: true, priority: 2 }));
122
+ if (n.custom?.$cstNode && isMultiline(n.custom.$cstNode)) {
123
+ f.property("custom").prepend({
124
+ options: {
125
+ allowLess: false,
126
+ allowMore: true,
127
+ priority: 2
128
+ },
129
+ moves: [{
130
+ tabs: 1
131
+ }]
132
+ });
133
+ }
112
134
  });
113
135
  }
114
136
  removeIndentFromTopLevelStatements(node) {
@@ -121,17 +143,26 @@ export class LikeC4Formatter extends AbstractFormatter {
121
143
  if (ast.isLikeC4Lib(node) || ast.isSpecificationRule(node) || ast.isSpecificationElementKind(node) || ast.isSpecificationRelationshipKind(node) || ast.isSpecificationDeploymentNodeKind(node) || ast.isGlobals(node) || ast.isGlobalStyle(node) || ast.isGlobalStyleGroup(node) || ast.isGlobalPredicateGroup(node) || ast.isGlobalDynamicPredicateGroup(node) || ast.isGlobalStyleGroup(node) || ast.isModel(node) || ast.isElementBody(node) || ast.isExtendElementBody(node) || ast.isRelationBody(node) || ast.isRelationStyleProperty(node) || ast.isMetadataBody(node) || ast.isModelViews(node) || ast.isElementViewBody(node) || ast.isDynamicViewBody(node) || ast.isDeploymentViewBody(node) || ast.isViewRuleStyle(node) || ast.isViewRuleGroup(node) || ast.isCustomElementProperties(node) || ast.isCustomRelationProperties(node) || ast.isElementStyleProperty(node) || ast.isDynamicViewParallelSteps(node) || ast.isModelDeployments(node) || ast.isDeploymentNodeBody(node) || ast.isDeploymentRelationBody(node) || ast.isDeployedInstanceBody(node) || ast.isExtendDeploymentBody(node)) {
122
144
  const formatter = this.getNodeFormatter(node);
123
145
  const openBrace = formatter.keywords("{");
146
+ openBrace.prepend(FormattingOptions.noIndent).prepend(FormattingOptions.oneSpace);
147
+ const multiline = isMultiline(node.$cstNode);
124
148
  const closeBrace = formatter.keywords("}");
125
149
  const interiorNodes = formatter.interior(openBrace, closeBrace);
126
- let perviousNode = null;
150
+ let previousNode = null;
127
151
  for (const interiorNode of interiorNodes.nodes) {
128
- if (!perviousNode || !utils.areOverlap(perviousNode, interiorNode)) {
129
- formatter.cst([interiorNode]).prepend(FormattingOptions.indent);
152
+ if (!multiline) {
153
+ formatter.cst([interiorNode]).surround(FormattingOptions.oneSpace);
154
+ continue;
130
155
  }
131
- perviousNode = interiorNode;
156
+ if (!previousNode || !utils.areOverlap(previousNode, interiorNode)) {
157
+ formatter.cst([interiorNode]).prepend(Formatting.newLine({ allowMore: true })).prepend(FormattingOptions.indent);
158
+ }
159
+ previousNode = interiorNode;
160
+ }
161
+ if (multiline) {
162
+ closeBrace.prepend(FormattingOptions.noIndent).prepend(Formatting.newLine({ allowMore: true }));
163
+ } else {
164
+ closeBrace.prepend(Formatting.oneSpace({ allowLess: true }));
132
165
  }
133
- openBrace.prepend(FormattingOptions.noIndent).prepend(FormattingOptions.oneSpace);
134
- closeBrace.prepend(FormattingOptions.noIndent).prepend(Formatting.newLine({ allowMore: true }));
135
166
  }
136
167
  }
137
168
  appendKeywordsWithSpace(node) {
@@ -354,11 +385,11 @@ export class LikeC4Formatter extends AbstractFormatter {
354
385
  if (ast.isExpressions(node)) {
355
386
  const formatter = this.getNodeFormatter(node);
356
387
  const parent = this.findPredicateExpressionRoot(node);
357
- const isMultiline = parent?.$cstNode && utils.isMultiline(parent?.$cstNode);
358
- if (isMultiline) {
388
+ const isMultiline2 = parent?.$cstNode && utils.isMultiline(parent?.$cstNode);
389
+ if (isMultiline2) {
359
390
  formatter.property("value").prepend(FormattingOptions.indent);
360
391
  }
361
- formatter.keyword(",").prepend(FormattingOptions.noSpace).append(isMultiline ? FormattingOptions.newLine : FormattingOptions.oneSpace);
392
+ formatter.keyword(",").prepend(FormattingOptions.noSpace).append(isMultiline2 ? FormattingOptions.newLine : FormattingOptions.oneSpace);
362
393
  }
363
394
  }
364
395
  formatRelationExpression(node) {
@@ -1,6 +1,6 @@
1
- import type { CstNode } from "langium";
2
- import type { Position, Range } from "vscode-languageserver-types";
1
+ import type { CstNode } from 'langium';
2
+ import type { Position, Range } from 'vscode-languageserver-types';
3
3
  export declare function areOverlap(a: CstNode, b: CstNode): boolean;
4
4
  export declare function compareRanges(a: CstNode, b: CstNode): number;
5
5
  export declare function isInRagne(range: Range, pos: Position): boolean;
6
- export declare function isMultiline(node: CstNode): boolean;
6
+ export declare function isMultiline(node: CstNode | undefined): boolean;
@@ -11,5 +11,5 @@ export function isInRagne(range, pos) {
11
11
  return !(pos.line < range.start.line || pos.line > range.end.line || pos.line == range.start.line && pos.character < range.start.character || pos.line == range.end.line && pos.character > range.end.character);
12
12
  }
13
13
  export function isMultiline(node) {
14
- return node.range.start.line != node.range.end.line;
14
+ return !!node && node.range.start.line != node.range.end.line;
15
15
  }
@@ -57,6 +57,9 @@ export declare function isDynamicViewProperty(item: unknown): item is DynamicVie
57
57
  export type DynamicViewRule = DynamicViewGlobalPredicateRef | DynamicViewIncludePredicate | ViewRuleAutoLayout | ViewRuleStyleOrGlobalRef;
58
58
  export declare const DynamicViewRule = "DynamicViewRule";
59
59
  export declare function isDynamicViewRule(item: unknown): item is DynamicViewRule;
60
+ export type DynamicViewStep = DynamicStepChain | DynamicStepSingle;
61
+ export declare const DynamicViewStep = "DynamicViewStep";
62
+ export declare function isDynamicViewStep(item: unknown): item is DynamicViewStep;
60
63
  export type ElementProperty = ElementStringProperty | ElementStyleProperty | IconProperty | LinkProperty | MetadataProperty;
61
64
  export declare const ElementProperty = "ElementProperty";
62
65
  export declare function isElementProperty(item: unknown): item is ElementProperty;
@@ -162,6 +165,17 @@ export declare function isWhereRelationExpression(item: unknown): item is WhereR
162
165
  export type WhereTagEqual = WhereElementTag | WhereRelationParticipantTag | WhereRelationTag;
163
166
  export declare const WhereTagEqual = "WhereTagEqual";
164
167
  export declare function isWhereTagEqual(item: unknown): item is WhereTagEqual;
168
+ export interface AbstractDynamicStep extends langium.AstNode {
169
+ readonly $container: DynamicStepChain | DynamicViewBody | DynamicViewParallelSteps;
170
+ readonly $type: 'AbstractDynamicStep' | 'DynamicStepChain' | 'DynamicStepSingle';
171
+ custom?: CustomRelationProperties;
172
+ dotKind?: RelationKindDotRef;
173
+ kind?: langium.Reference<RelationshipKind>;
174
+ target: ElementRef;
175
+ title?: string;
176
+ }
177
+ export declare const AbstractDynamicStep = "AbstractDynamicStep";
178
+ export declare function isAbstractDynamicStep(item: unknown): item is AbstractDynamicStep;
165
179
  export interface ArrowProperty extends langium.AstNode {
166
180
  readonly $container: CustomRelationProperties | RelationStyleProperty | SpecificationRelationshipKind;
167
181
  readonly $type: 'ArrowProperty';
@@ -202,7 +216,7 @@ export interface CustomElementProperties extends langium.AstNode {
202
216
  export declare const CustomElementProperties = "CustomElementProperties";
203
217
  export declare function isCustomElementProperties(item: unknown): item is CustomElementProperties;
204
218
  export interface CustomRelationProperties extends langium.AstNode {
205
- readonly $container: DynamicViewStep | RelationExprWith;
219
+ readonly $container: AbstractDynamicStep | RelationExprWith;
206
220
  readonly $type: 'CustomRelationProperties';
207
221
  props: Array<NotationProperty | NotesProperty | RelationNavigateToProperty | RelationStringProperty | RelationshipStyleProperty>;
208
222
  }
@@ -373,19 +387,6 @@ export interface DynamicViewRef extends langium.AstNode {
373
387
  }
374
388
  export declare const DynamicViewRef = "DynamicViewRef";
375
389
  export declare function isDynamicViewRef(item: unknown): item is DynamicViewRef;
376
- export interface DynamicViewStep extends langium.AstNode {
377
- readonly $container: DynamicViewBody | DynamicViewParallelSteps;
378
- readonly $type: 'DynamicViewStep';
379
- custom?: CustomRelationProperties;
380
- dotKind?: RelationKindDotRef;
381
- isBackward: boolean;
382
- kind?: langium.Reference<RelationshipKind>;
383
- source: ElementRef;
384
- target: ElementRef;
385
- title?: string;
386
- }
387
- export declare const DynamicViewStep = "DynamicViewStep";
388
- export declare function isDynamicViewStep(item: unknown): item is DynamicViewStep;
389
390
  export interface Element extends langium.AstNode {
390
391
  readonly $container: ElementBody | ExtendElementBody | Model;
391
392
  readonly $type: 'Element';
@@ -421,7 +422,7 @@ export interface ElementKindExpression extends langium.AstNode {
421
422
  export declare const ElementKindExpression = "ElementKindExpression";
422
423
  export declare function isElementKindExpression(item: unknown): item is ElementKindExpression;
423
424
  export interface ElementRef extends langium.AstNode {
424
- readonly $container: DeployedInstance | DynamicViewStep | ElementView;
425
+ readonly $container: AbstractDynamicStep | DeployedInstance | DynamicStepSingle | ElementView;
425
426
  readonly $type: 'ElementRef';
426
427
  modelElement: FqnRef;
427
428
  }
@@ -844,7 +845,7 @@ export interface RelationExprWith extends langium.AstNode {
844
845
  export declare const RelationExprWith = "RelationExprWith";
845
846
  export declare function isRelationExprWith(item: unknown): item is RelationExprWith;
846
847
  export interface RelationKindDotRef extends langium.AstNode {
847
- readonly $container: DeploymentRelation | DynamicViewStep | OutgoingRelationExpr | Relation;
848
+ readonly $container: AbstractDynamicStep | DeploymentRelation | OutgoingRelationExpr | Relation;
848
849
  readonly $type: 'RelationKindDotRef';
849
850
  kind: langium.Reference<RelationshipKind>;
850
851
  }
@@ -1172,7 +1173,23 @@ export interface WildcardExpression extends langium.AstNode {
1172
1173
  }
1173
1174
  export declare const WildcardExpression = "WildcardExpression";
1174
1175
  export declare function isWildcardExpression(item: unknown): item is WildcardExpression;
1176
+ export interface DynamicStepChain extends AbstractDynamicStep {
1177
+ readonly $container: DynamicStepChain | DynamicViewBody | DynamicViewParallelSteps;
1178
+ readonly $type: 'DynamicStepChain';
1179
+ source: DynamicStepChain | DynamicStepSingle;
1180
+ }
1181
+ export declare const DynamicStepChain = "DynamicStepChain";
1182
+ export declare function isDynamicStepChain(item: unknown): item is DynamicStepChain;
1183
+ export interface DynamicStepSingle extends AbstractDynamicStep {
1184
+ readonly $container: DynamicStepChain | DynamicViewBody | DynamicViewParallelSteps;
1185
+ readonly $type: 'DynamicStepSingle';
1186
+ isBackward: boolean;
1187
+ source: ElementRef;
1188
+ }
1189
+ export declare const DynamicStepSingle = "DynamicStepSingle";
1190
+ export declare function isDynamicStepSingle(item: unknown): item is DynamicStepSingle;
1175
1191
  export type LikeC4AstType = {
1192
+ AbstractDynamicStep: AbstractDynamicStep;
1176
1193
  ArrowProperty: ArrowProperty;
1177
1194
  BorderProperty: BorderProperty;
1178
1195
  ColorLiteral: ColorLiteral;
@@ -1195,6 +1212,8 @@ export type LikeC4AstType = {
1195
1212
  DeploymentViewRulePredicate: DeploymentViewRulePredicate;
1196
1213
  DeploymentViewRuleStyle: DeploymentViewRuleStyle;
1197
1214
  DirectedRelationExpr: DirectedRelationExpr;
1215
+ DynamicStepChain: DynamicStepChain;
1216
+ DynamicStepSingle: DynamicStepSingle;
1198
1217
  DynamicView: DynamicView;
1199
1218
  DynamicViewBody: DynamicViewBody;
1200
1219
  DynamicViewDisplayVariantProperty: DynamicViewDisplayVariantProperty;
@@ -60,6 +60,10 @@ export const DynamicViewRule = "DynamicViewRule";
60
60
  export function isDynamicViewRule(item) {
61
61
  return reflection.isInstance(item, DynamicViewRule);
62
62
  }
63
+ export const DynamicViewStep = "DynamicViewStep";
64
+ export function isDynamicViewStep(item) {
65
+ return reflection.isInstance(item, DynamicViewStep);
66
+ }
63
67
  export const ElementProperty = "ElementProperty";
64
68
  export function isElementProperty(item) {
65
69
  return reflection.isInstance(item, ElementProperty);
@@ -203,6 +207,10 @@ export const WhereTagEqual = "WhereTagEqual";
203
207
  export function isWhereTagEqual(item) {
204
208
  return reflection.isInstance(item, WhereTagEqual);
205
209
  }
210
+ export const AbstractDynamicStep = "AbstractDynamicStep";
211
+ export function isAbstractDynamicStep(item) {
212
+ return reflection.isInstance(item, AbstractDynamicStep);
213
+ }
206
214
  export const ArrowProperty = "ArrowProperty";
207
215
  export function isArrowProperty(item) {
208
216
  return reflection.isInstance(item, ArrowProperty);
@@ -303,10 +311,6 @@ export const DynamicViewRef = "DynamicViewRef";
303
311
  export function isDynamicViewRef(item) {
304
312
  return reflection.isInstance(item, DynamicViewRef);
305
313
  }
306
- export const DynamicViewStep = "DynamicViewStep";
307
- export function isDynamicViewStep(item) {
308
- return reflection.isInstance(item, DynamicViewStep);
309
- }
310
314
  export const Element = "Element";
311
315
  export function isElement(item) {
312
316
  return reflection.isInstance(item, Element);
@@ -687,9 +691,17 @@ export const WildcardExpression = "WildcardExpression";
687
691
  export function isWildcardExpression(item) {
688
692
  return reflection.isInstance(item, WildcardExpression);
689
693
  }
694
+ export const DynamicStepChain = "DynamicStepChain";
695
+ export function isDynamicStepChain(item) {
696
+ return reflection.isInstance(item, DynamicStepChain);
697
+ }
698
+ export const DynamicStepSingle = "DynamicStepSingle";
699
+ export function isDynamicStepSingle(item) {
700
+ return reflection.isInstance(item, DynamicStepSingle);
701
+ }
690
702
  export class LikeC4AstReflection extends langium.AbstractAstReflection {
691
703
  getAllTypes() {
692
- return [ArrowProperty, BorderProperty, ColorLiteral, ColorProperty, CustomColor, CustomElementProperties, CustomRelationProperties, DeployedInstance, DeployedInstanceBody, DeploymentElement, DeploymentNode, DeploymentNodeBody, DeploymentNodeKind, DeploymentNodeOrElementKind, DeploymentRelation, DeploymentRelationBody, DeploymentView, DeploymentViewBody, DeploymentViewRule, DeploymentViewRulePredicate, DeploymentViewRuleStyle, DirectedRelationExpr, DynamicView, DynamicViewBody, DynamicViewDisplayVariantProperty, DynamicViewGlobalPredicateRef, DynamicViewIncludePredicate, DynamicViewParallelSteps, DynamicViewProperty, DynamicViewRef, DynamicViewRule, DynamicViewStep, Element, ElementBody, ElementKind, ElementKindExpression, ElementProperty, ElementRef, ElementStringProperty, ElementStyleProperty, ElementTagExpression, ElementView, ElementViewBody, ElementViewRef, ExpressionV2, Expressions, ExtendDeployment, ExtendDeploymentBody, ExtendElement, ExtendElementBody, ExtendElementProperty, FqnExpr, FqnExprOrWhere, FqnExprOrWith, FqnExprWhere, FqnExprWith, FqnExpressions, FqnRef, FqnRefExpr, FqnReferenceable, GlobalDynamicPredicateGroup, GlobalPredicateGroup, GlobalStyle, GlobalStyleGroup, GlobalStyleId, Globals, HexColor, IconProperty, Imported, ImportsFromPoject, InOutRelationExpr, IncomingRelationExpr, LibIcon, LikeC4Grammar, LikeC4Lib, LikeC4View, LineProperty, LinkProperty, MarkdownOrString, MetadataAttribute, MetadataBody, MetadataProperty, Model, ModelDeployments, ModelReferenceable, ModelViews, MultipleProperty, NavigateToProperty, NotationProperty, NotesProperty, OpacityProperty, OutgoingRelationExpr, PaddingSizeProperty, RGBAColor, Referenceable, Relation, RelationBody, RelationExpr, RelationExprOrWhere, RelationExprOrWith, RelationExprWhere, RelationExprWith, RelationKindDotRef, RelationNavigateToProperty, RelationProperty, RelationStringProperty, RelationStyleProperty, RelationshipKind, RelationshipStyleProperty, ShapeProperty, ShapeSizeProperty, SizeProperty, SpecificationColor, SpecificationDeploymentNodeKind, SpecificationElementKind, SpecificationElementStringProperty, SpecificationRelationshipKind, SpecificationRelationshipStringProperty, SpecificationRule, SpecificationTag, StrictFqnElementRef, StrictFqnRef, StringProperty, StyleProperty, Tag, TagRef, Tags, TextSizeProperty, ViewProperty, ViewRef, ViewRule, ViewRuleAutoLayout, ViewRuleGlobalPredicateRef, ViewRuleGlobalStyle, ViewRuleGroup, ViewRulePredicate, ViewRuleStyle, ViewRuleStyleOrGlobalRef, ViewStringProperty, WhereBinaryExpression, WhereElement, WhereElementExpression, WhereElementKind, WhereElementNegation, WhereElementTag, WhereExpression, WhereKindEqual, WhereRelation, WhereRelationExpression, WhereRelationKind, WhereRelationNegation, WhereRelationParticipantKind, WhereRelationParticipantTag, WhereRelationTag, WhereTagEqual, WildcardExpression];
704
+ return [AbstractDynamicStep, ArrowProperty, BorderProperty, ColorLiteral, ColorProperty, CustomColor, CustomElementProperties, CustomRelationProperties, DeployedInstance, DeployedInstanceBody, DeploymentElement, DeploymentNode, DeploymentNodeBody, DeploymentNodeKind, DeploymentNodeOrElementKind, DeploymentRelation, DeploymentRelationBody, DeploymentView, DeploymentViewBody, DeploymentViewRule, DeploymentViewRulePredicate, DeploymentViewRuleStyle, DirectedRelationExpr, DynamicStepChain, DynamicStepSingle, DynamicView, DynamicViewBody, DynamicViewDisplayVariantProperty, DynamicViewGlobalPredicateRef, DynamicViewIncludePredicate, DynamicViewParallelSteps, DynamicViewProperty, DynamicViewRef, DynamicViewRule, DynamicViewStep, Element, ElementBody, ElementKind, ElementKindExpression, ElementProperty, ElementRef, ElementStringProperty, ElementStyleProperty, ElementTagExpression, ElementView, ElementViewBody, ElementViewRef, ExpressionV2, Expressions, ExtendDeployment, ExtendDeploymentBody, ExtendElement, ExtendElementBody, ExtendElementProperty, FqnExpr, FqnExprOrWhere, FqnExprOrWith, FqnExprWhere, FqnExprWith, FqnExpressions, FqnRef, FqnRefExpr, FqnReferenceable, GlobalDynamicPredicateGroup, GlobalPredicateGroup, GlobalStyle, GlobalStyleGroup, GlobalStyleId, Globals, HexColor, IconProperty, Imported, ImportsFromPoject, InOutRelationExpr, IncomingRelationExpr, LibIcon, LikeC4Grammar, LikeC4Lib, LikeC4View, LineProperty, LinkProperty, MarkdownOrString, MetadataAttribute, MetadataBody, MetadataProperty, Model, ModelDeployments, ModelReferenceable, ModelViews, MultipleProperty, NavigateToProperty, NotationProperty, NotesProperty, OpacityProperty, OutgoingRelationExpr, PaddingSizeProperty, RGBAColor, Referenceable, Relation, RelationBody, RelationExpr, RelationExprOrWhere, RelationExprOrWith, RelationExprWhere, RelationExprWith, RelationKindDotRef, RelationNavigateToProperty, RelationProperty, RelationStringProperty, RelationStyleProperty, RelationshipKind, RelationshipStyleProperty, ShapeProperty, ShapeSizeProperty, SizeProperty, SpecificationColor, SpecificationDeploymentNodeKind, SpecificationElementKind, SpecificationElementStringProperty, SpecificationRelationshipKind, SpecificationRelationshipStringProperty, SpecificationRule, SpecificationTag, StrictFqnElementRef, StrictFqnRef, StringProperty, StyleProperty, Tag, TagRef, Tags, TextSizeProperty, ViewProperty, ViewRef, ViewRule, ViewRuleAutoLayout, ViewRuleGlobalPredicateRef, ViewRuleGlobalStyle, ViewRuleGroup, ViewRulePredicate, ViewRuleStyle, ViewRuleStyleOrGlobalRef, ViewStringProperty, WhereBinaryExpression, WhereElement, WhereElementExpression, WhereElementKind, WhereElementNegation, WhereElementTag, WhereExpression, WhereKindEqual, WhereRelation, WhereRelationExpression, WhereRelationKind, WhereRelationNegation, WhereRelationParticipantKind, WhereRelationParticipantTag, WhereRelationTag, WhereTagEqual, WildcardExpression];
693
705
  }
694
706
  computeIsSubtype(subtype, supertype) {
695
707
  switch (subtype) {
@@ -729,6 +741,10 @@ export class LikeC4AstReflection extends langium.AbstractAstReflection {
729
741
  case OutgoingRelationExpr: {
730
742
  return this.isSubtype(RelationExpr, supertype);
731
743
  }
744
+ case DynamicStepChain:
745
+ case DynamicStepSingle: {
746
+ return this.isSubtype(AbstractDynamicStep, supertype) || this.isSubtype(DynamicViewStep, supertype);
747
+ }
732
748
  case DynamicViewDisplayVariantProperty:
733
749
  case ViewProperty: {
734
750
  return this.isSubtype(DynamicViewProperty, supertype);
@@ -870,20 +886,22 @@ export class LikeC4AstReflection extends langium.AbstractAstReflection {
870
886
  getReferenceType(refInfo) {
871
887
  const referenceId = `${refInfo.container.$type}:${refInfo.property}`;
872
888
  switch (referenceId) {
873
- case "ColorProperty:customColor": {
874
- return CustomColor;
875
- }
876
- case "DeploymentNode:kind": {
877
- return DeploymentNodeKind;
878
- }
889
+ case "AbstractDynamicStep:kind":
879
890
  case "DeploymentRelation:kind":
880
- case "DynamicViewStep:kind":
891
+ case "DynamicStepChain:kind":
892
+ case "DynamicStepSingle:kind":
881
893
  case "OutgoingRelationExpr:kind":
882
894
  case "Relation:kind":
883
895
  case "RelationKindDotRef:kind":
884
896
  case "WhereRelationKind:value": {
885
897
  return RelationshipKind;
886
898
  }
899
+ case "ColorProperty:customColor": {
900
+ return CustomColor;
901
+ }
902
+ case "DeploymentNode:kind": {
903
+ return DeploymentNodeKind;
904
+ }
887
905
  case "DynamicViewGlobalPredicateRef:predicate": {
888
906
  return GlobalDynamicPredicateGroup;
889
907
  }
@@ -931,6 +949,18 @@ export class LikeC4AstReflection extends langium.AbstractAstReflection {
931
949
  }
932
950
  getTypeMetaData(type) {
933
951
  switch (type) {
952
+ case AbstractDynamicStep: {
953
+ return {
954
+ name: AbstractDynamicStep,
955
+ properties: [
956
+ { name: "custom" },
957
+ { name: "dotKind" },
958
+ { name: "kind" },
959
+ { name: "target" },
960
+ { name: "title" }
961
+ ]
962
+ };
963
+ }
934
964
  case ArrowProperty: {
935
965
  return {
936
966
  name: ArrowProperty,
@@ -1167,20 +1197,6 @@ export class LikeC4AstReflection extends langium.AbstractAstReflection {
1167
1197
  ]
1168
1198
  };
1169
1199
  }
1170
- case DynamicViewStep: {
1171
- return {
1172
- name: DynamicViewStep,
1173
- properties: [
1174
- { name: "custom" },
1175
- { name: "dotKind" },
1176
- { name: "isBackward", defaultValue: false },
1177
- { name: "kind" },
1178
- { name: "source" },
1179
- { name: "target" },
1180
- { name: "title" }
1181
- ]
1182
- };
1183
- }
1184
1200
  case Element: {
1185
1201
  return {
1186
1202
  name: Element,
@@ -2063,6 +2079,33 @@ export class LikeC4AstReflection extends langium.AbstractAstReflection {
2063
2079
  ]
2064
2080
  };
2065
2081
  }
2082
+ case DynamicStepChain: {
2083
+ return {
2084
+ name: DynamicStepChain,
2085
+ properties: [
2086
+ { name: "custom" },
2087
+ { name: "dotKind" },
2088
+ { name: "kind" },
2089
+ { name: "source" },
2090
+ { name: "target" },
2091
+ { name: "title" }
2092
+ ]
2093
+ };
2094
+ }
2095
+ case DynamicStepSingle: {
2096
+ return {
2097
+ name: DynamicStepSingle,
2098
+ properties: [
2099
+ { name: "custom" },
2100
+ { name: "dotKind" },
2101
+ { name: "isBackward", defaultValue: false },
2102
+ { name: "kind" },
2103
+ { name: "source" },
2104
+ { name: "target" },
2105
+ { name: "title" }
2106
+ ]
2107
+ };
2108
+ }
2066
2109
  default: {
2067
2110
  return {
2068
2111
  name: type,