@likec4/language-server 1.40.0 → 1.42.0
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.
- package/browser/package.json +4 -0
- package/browser-worker/package.json +4 -0
- package/dist/LikeC4LanguageServices.d.ts +1 -1
- package/dist/LikeC4LanguageServices.mjs +3 -2
- package/dist/Rpc.mjs +30 -24
- package/dist/ast.d.ts +4 -9
- package/dist/ast.mjs +0 -10
- package/dist/bundled.mjs +4158 -3687
- package/dist/documentation/documentation-provider.mjs +1 -1
- package/dist/filesystem/FileSystemWatcher.d.ts +2 -2
- package/dist/filesystem/index.d.ts +1 -1
- package/dist/formatting/LikeC4Formatter.mjs +42 -10
- package/dist/formatting/utils.d.ts +3 -3
- package/dist/formatting/utils.mjs +1 -1
- package/dist/generated/ast.d.ts +40 -19
- package/dist/generated/ast.mjs +71 -26
- package/dist/generated/grammar.mjs +1 -1
- package/dist/logger.d.ts +1 -1
- package/dist/logger.mjs +3 -0
- package/dist/lsp/CompletionProvider.mjs +1 -1
- package/dist/lsp/DocumentLinkProvider.d.ts +1 -1
- package/dist/lsp/DocumentLinkProvider.mjs +1 -1
- package/dist/lsp/DocumentSymbolProvider.mjs +1 -1
- package/dist/lsp/HoverProvider.mjs +14 -2
- package/dist/mcp/NoopLikeC4MCPServer.d.ts +1 -1
- package/dist/mcp/NoopLikeC4MCPServer.mjs +1 -1
- package/dist/mcp/server/StdioLikeC4MCPServer.mjs +4 -1
- package/dist/mcp/server/StreamableLikeC4MCPServer.mjs +3 -3
- package/dist/mcp/server/WithMCPServer.mjs +2 -2
- package/dist/mcp/tools/_common.mjs +2 -2
- package/dist/model/builder/MergedSpecification.d.ts +3 -3
- package/dist/model/builder/MergedSpecification.mjs +37 -59
- package/dist/model/builder/buildModel.mjs +14 -17
- package/dist/model/model-builder.d.ts +1 -1
- package/dist/model/model-builder.mjs +12 -9
- package/dist/model/model-locator.d.ts +5 -0
- package/dist/model/model-locator.mjs +40 -3
- package/dist/model/model-parser-where.mjs +1 -2
- package/dist/model/model-parser.d.ts +91 -47
- package/dist/model/parser/Base.d.ts +13 -7
- package/dist/model/parser/Base.mjs +32 -21
- package/dist/model/parser/DeploymentModelParser.d.ts +9 -5
- package/dist/model/parser/DeploymentModelParser.mjs +49 -47
- package/dist/model/parser/DeploymentViewParser.d.ts +9 -5
- package/dist/model/parser/DeploymentViewParser.mjs +1 -2
- package/dist/model/parser/FqnRefParser.d.ts +12 -6
- package/dist/model/parser/FqnRefParser.mjs +28 -15
- package/dist/model/parser/GlobalsParser.d.ts +16 -7
- package/dist/model/parser/GlobalsParser.mjs +5 -3
- package/dist/model/parser/ImportsParser.d.ts +8 -5
- package/dist/model/parser/ImportsParser.mjs +4 -2
- package/dist/model/parser/ModelParser.d.ts +9 -5
- package/dist/model/parser/ModelParser.mjs +42 -42
- package/dist/model/parser/PredicatesParser.d.ts +9 -5
- package/dist/model/parser/SpecificationParser.d.ts +8 -5
- package/dist/model/parser/SpecificationParser.mjs +17 -23
- package/dist/model/parser/ValueConverter.mjs +1 -1
- package/dist/model/parser/ViewsParser.d.ts +20 -7
- package/dist/model/parser/ViewsParser.mjs +125 -35
- package/dist/model-change/ModelChanges.d.ts +1 -1
- package/dist/module.mjs +3 -2
- package/dist/protocol.d.ts +28 -4
- package/dist/references/scope-computation.mjs +2 -3
- package/dist/references/scope-provider.d.ts +2 -2
- package/dist/references/scope-provider.mjs +8 -15
- package/dist/test/testServices.d.ts +2 -0
- package/dist/test/testServices.mjs +32 -35
- package/dist/utils/disposable.mjs +2 -2
- package/dist/utils/index.mjs +1 -1
- package/dist/validation/_shared.d.ts +1 -1
- package/dist/validation/deployment-checks.d.ts +1 -1
- package/dist/validation/deployment-checks.mjs +4 -1
- package/dist/validation/dynamic-view.d.ts +3 -2
- package/dist/validation/dynamic-view.mjs +21 -2
- package/dist/validation/element-ref.d.ts +2 -2
- package/dist/validation/element-ref.mjs +1 -1
- package/dist/validation/imports.d.ts +0 -1
- package/dist/validation/imports.mjs +0 -5
- package/dist/validation/index.d.ts +1 -1
- package/dist/validation/index.mjs +19 -13
- package/dist/validation/view-predicates/relation-with.d.ts +1 -1
- package/dist/validation/view.d.ts +1 -1
- package/dist/view-utils/index.d.ts +0 -1
- package/dist/view-utils/index.mjs +0 -1
- package/dist/views/likec4-views.d.ts +6 -0
- package/dist/views/likec4-views.mjs +31 -18
- package/dist/workspace/ProjectsManager.d.ts +23 -31
- package/dist/workspace/ProjectsManager.mjs +78 -89
- package/dist/workspace/WorkspaceManager.mjs +1 -1
- package/likec4lib/package.json +4 -0
- package/package.json +25 -29
- package/protocol/package.json +4 -0
- package/dist/view-utils/resolve-relative-paths.d.ts +0 -2
- 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_ ${
|
|
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 {
|
|
2
|
-
import {
|
|
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
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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(
|
|
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
|
|
150
|
+
let previousNode = null;
|
|
127
151
|
for (const interiorNode of interiorNodes.nodes) {
|
|
128
|
-
if (!
|
|
129
|
-
formatter.cst([interiorNode]).
|
|
152
|
+
if (!multiline) {
|
|
153
|
+
formatter.cst([interiorNode]).surround(FormattingOptions.oneSpace);
|
|
154
|
+
continue;
|
|
130
155
|
}
|
|
131
|
-
|
|
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) {
|
|
@@ -155,6 +186,7 @@ export class LikeC4Formatter extends AbstractFormatter {
|
|
|
155
186
|
"title",
|
|
156
187
|
"description",
|
|
157
188
|
"technology",
|
|
189
|
+
"summary",
|
|
158
190
|
"notation",
|
|
159
191
|
"notes",
|
|
160
192
|
"color",
|
|
@@ -353,11 +385,11 @@ export class LikeC4Formatter extends AbstractFormatter {
|
|
|
353
385
|
if (ast.isExpressions(node)) {
|
|
354
386
|
const formatter = this.getNodeFormatter(node);
|
|
355
387
|
const parent = this.findPredicateExpressionRoot(node);
|
|
356
|
-
const
|
|
357
|
-
if (
|
|
388
|
+
const isMultiline2 = parent?.$cstNode && utils.isMultiline(parent?.$cstNode);
|
|
389
|
+
if (isMultiline2) {
|
|
358
390
|
formatter.property("value").prepend(FormattingOptions.indent);
|
|
359
391
|
}
|
|
360
|
-
formatter.keyword(",").prepend(FormattingOptions.noSpace).append(
|
|
392
|
+
formatter.keyword(",").prepend(FormattingOptions.noSpace).append(isMultiline2 ? FormattingOptions.newLine : FormattingOptions.oneSpace);
|
|
361
393
|
}
|
|
362
394
|
}
|
|
363
395
|
formatRelationExpression(node) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { CstNode } from
|
|
2
|
-
import type { Position, Range } from
|
|
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
|
}
|
package/dist/generated/ast.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export declare const LikeC4Terminals: {
|
|
|
29
29
|
Hex: RegExp;
|
|
30
30
|
};
|
|
31
31
|
export type LikeC4TerminalNames = keyof typeof LikeC4Terminals;
|
|
32
|
-
export type LikeC4KeywordNames = "(" | ")" | "*" | "," | "->" | "-[" | ":" | ";" | "<-" | "<->" | "BottomTop" | "LeftRight" | "RightLeft" | "TopBottom" | "]->" | "amber" | "and" | "autoLayout" | "blue" | "border" | "browser" | "color" | "crow" | "cylinder" | "dashed" | "deployment" | "deploymentNode" | "description" | "diagram" | "diamond" | "dot" | "dotted" | "dynamic" | "dynamicPredicateGroup" | "element" | "element.kind" | "element.tag" | "exclude" | "extend" | "extends" | "from" | "global" | "gray" | "green" | "group" | "head" | "icon" | "icons" | "import" | "include" | "indigo" | "instance" | "instanceOf" | "is" | "kind" | "large" | "lg" | "likec4lib" | "line" | "link" | "md" | "medium" | "metadata" | "mobile" | "model" | "multiple" | "muted" | "navigateTo" | "node" | "none" | "normal" | "not" | "notation" | "notes" | "odiamond" | "odot" | "of" | "onormal" | "opacity" | "open" | "or" | "padding" | "par" | "parallel" | "person" | "predicate" | "predicateGroup" | "primary" | "queue" | "rectangle" | "red" | "relationship" | "rgb" | "rgba" | "secondary" | "sequence" | "shape" | "size" | "sky" | "slate" | "sm" | "small" | "solid" | "source" | "specification" | "storage" | "style" | "styleGroup" | "tag" | "tail" | "target" | "technology" | "textSize" | "title" | "variant" | "vee" | "view" | "views" | "where" | "with" | "xl" | "xlarge" | "xs" | "xsmall" | "{" | "}";
|
|
32
|
+
export type LikeC4KeywordNames = "(" | ")" | "*" | "," | "->" | "-[" | ":" | ";" | "<-" | "<->" | "BottomTop" | "LeftRight" | "RightLeft" | "TopBottom" | "]->" | "amber" | "and" | "autoLayout" | "blue" | "border" | "browser" | "color" | "crow" | "cylinder" | "dashed" | "deployment" | "deploymentNode" | "description" | "diagram" | "diamond" | "dot" | "dotted" | "dynamic" | "dynamicPredicateGroup" | "element" | "element.kind" | "element.tag" | "exclude" | "extend" | "extends" | "from" | "global" | "gray" | "green" | "group" | "head" | "icon" | "icons" | "import" | "include" | "indigo" | "instance" | "instanceOf" | "is" | "kind" | "large" | "lg" | "likec4lib" | "line" | "link" | "md" | "medium" | "metadata" | "mobile" | "model" | "multiple" | "muted" | "navigateTo" | "node" | "none" | "normal" | "not" | "notation" | "notes" | "odiamond" | "odot" | "of" | "onormal" | "opacity" | "open" | "or" | "padding" | "par" | "parallel" | "person" | "predicate" | "predicateGroup" | "primary" | "queue" | "rectangle" | "red" | "relationship" | "rgb" | "rgba" | "secondary" | "sequence" | "shape" | "size" | "sky" | "slate" | "sm" | "small" | "solid" | "source" | "specification" | "storage" | "style" | "styleGroup" | "summary" | "tag" | "tail" | "target" | "technology" | "textSize" | "title" | "variant" | "vee" | "view" | "views" | "where" | "with" | "xl" | "xlarge" | "xs" | "xsmall" | "{" | "}";
|
|
33
33
|
export type LikeC4TokenNames = LikeC4TerminalNames | LikeC4KeywordNames;
|
|
34
34
|
export type ArrowType = 'crow' | 'diamond' | 'dot' | 'none' | 'normal' | 'odiamond' | 'odot' | 'onormal' | 'open' | 'vee';
|
|
35
35
|
export declare function isArrowType(item: unknown): item is ArrowType;
|
|
@@ -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:
|
|
219
|
+
readonly $container: AbstractDynamicStep | RelationExprWith;
|
|
206
220
|
readonly $type: 'CustomRelationProperties';
|
|
207
221
|
props: Array<NotationProperty | NotesProperty | RelationNavigateToProperty | RelationStringProperty | RelationshipStyleProperty>;
|
|
208
222
|
}
|
|
@@ -213,6 +227,7 @@ export interface DeployedInstance extends langium.AstNode {
|
|
|
213
227
|
readonly $type: 'DeployedInstance';
|
|
214
228
|
body?: DeployedInstanceBody;
|
|
215
229
|
name?: Id;
|
|
230
|
+
summary?: string;
|
|
216
231
|
target: ElementRef;
|
|
217
232
|
title?: string;
|
|
218
233
|
}
|
|
@@ -233,6 +248,7 @@ export interface DeploymentNode extends langium.AstNode {
|
|
|
233
248
|
body?: DeploymentNodeBody;
|
|
234
249
|
kind: langium.Reference<DeploymentNodeKind>;
|
|
235
250
|
name: Id;
|
|
251
|
+
summary?: string;
|
|
236
252
|
title?: string;
|
|
237
253
|
}
|
|
238
254
|
export declare const DeploymentNode = "DeploymentNode";
|
|
@@ -371,19 +387,6 @@ export interface DynamicViewRef extends langium.AstNode {
|
|
|
371
387
|
}
|
|
372
388
|
export declare const DynamicViewRef = "DynamicViewRef";
|
|
373
389
|
export declare function isDynamicViewRef(item: unknown): item is DynamicViewRef;
|
|
374
|
-
export interface DynamicViewStep extends langium.AstNode {
|
|
375
|
-
readonly $container: DynamicViewBody | DynamicViewParallelSteps;
|
|
376
|
-
readonly $type: 'DynamicViewStep';
|
|
377
|
-
custom?: CustomRelationProperties;
|
|
378
|
-
dotKind?: RelationKindDotRef;
|
|
379
|
-
isBackward: boolean;
|
|
380
|
-
kind?: langium.Reference<RelationshipKind>;
|
|
381
|
-
source: ElementRef;
|
|
382
|
-
target: ElementRef;
|
|
383
|
-
title?: string;
|
|
384
|
-
}
|
|
385
|
-
export declare const DynamicViewStep = "DynamicViewStep";
|
|
386
|
-
export declare function isDynamicViewStep(item: unknown): item is DynamicViewStep;
|
|
387
390
|
export interface Element extends langium.AstNode {
|
|
388
391
|
readonly $container: ElementBody | ExtendElementBody | Model;
|
|
389
392
|
readonly $type: 'Element';
|
|
@@ -419,7 +422,7 @@ export interface ElementKindExpression extends langium.AstNode {
|
|
|
419
422
|
export declare const ElementKindExpression = "ElementKindExpression";
|
|
420
423
|
export declare function isElementKindExpression(item: unknown): item is ElementKindExpression;
|
|
421
424
|
export interface ElementRef extends langium.AstNode {
|
|
422
|
-
readonly $container: DeployedInstance |
|
|
425
|
+
readonly $container: AbstractDynamicStep | DeployedInstance | DynamicStepSingle | ElementView;
|
|
423
426
|
readonly $type: 'ElementRef';
|
|
424
427
|
modelElement: FqnRef;
|
|
425
428
|
}
|
|
@@ -428,7 +431,7 @@ export declare function isElementRef(item: unknown): item is ElementRef;
|
|
|
428
431
|
export interface ElementStringProperty extends langium.AstNode {
|
|
429
432
|
readonly $container: CustomElementProperties | DeployedInstanceBody | DeploymentNodeBody | ElementBody;
|
|
430
433
|
readonly $type: 'ElementStringProperty';
|
|
431
|
-
key: 'description' | 'technology' | 'title';
|
|
434
|
+
key: 'description' | 'summary' | 'technology' | 'title';
|
|
432
435
|
value: MarkdownOrString;
|
|
433
436
|
}
|
|
434
437
|
export declare const ElementStringProperty = "ElementStringProperty";
|
|
@@ -842,7 +845,7 @@ export interface RelationExprWith extends langium.AstNode {
|
|
|
842
845
|
export declare const RelationExprWith = "RelationExprWith";
|
|
843
846
|
export declare function isRelationExprWith(item: unknown): item is RelationExprWith;
|
|
844
847
|
export interface RelationKindDotRef extends langium.AstNode {
|
|
845
|
-
readonly $container:
|
|
848
|
+
readonly $container: AbstractDynamicStep | DeploymentRelation | OutgoingRelationExpr | Relation;
|
|
846
849
|
readonly $type: 'RelationKindDotRef';
|
|
847
850
|
kind: langium.Reference<RelationshipKind>;
|
|
848
851
|
}
|
|
@@ -934,7 +937,7 @@ export declare function isSpecificationElementKind(item: unknown): item is Speci
|
|
|
934
937
|
export interface SpecificationElementStringProperty extends langium.AstNode {
|
|
935
938
|
readonly $container: SpecificationDeploymentNodeKind | SpecificationElementKind;
|
|
936
939
|
readonly $type: 'SpecificationElementStringProperty';
|
|
937
|
-
key: 'description' | 'notation' | 'technology' | 'title';
|
|
940
|
+
key: 'description' | 'notation' | 'summary' | 'technology' | 'title';
|
|
938
941
|
value: MarkdownOrString;
|
|
939
942
|
}
|
|
940
943
|
export declare const SpecificationElementStringProperty = "SpecificationElementStringProperty";
|
|
@@ -1170,7 +1173,23 @@ export interface WildcardExpression extends langium.AstNode {
|
|
|
1170
1173
|
}
|
|
1171
1174
|
export declare const WildcardExpression = "WildcardExpression";
|
|
1172
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;
|
|
1173
1191
|
export type LikeC4AstType = {
|
|
1192
|
+
AbstractDynamicStep: AbstractDynamicStep;
|
|
1174
1193
|
ArrowProperty: ArrowProperty;
|
|
1175
1194
|
BorderProperty: BorderProperty;
|
|
1176
1195
|
ColorLiteral: ColorLiteral;
|
|
@@ -1193,6 +1212,8 @@ export type LikeC4AstType = {
|
|
|
1193
1212
|
DeploymentViewRulePredicate: DeploymentViewRulePredicate;
|
|
1194
1213
|
DeploymentViewRuleStyle: DeploymentViewRuleStyle;
|
|
1195
1214
|
DirectedRelationExpr: DirectedRelationExpr;
|
|
1215
|
+
DynamicStepChain: DynamicStepChain;
|
|
1216
|
+
DynamicStepSingle: DynamicStepSingle;
|
|
1196
1217
|
DynamicView: DynamicView;
|
|
1197
1218
|
DynamicViewBody: DynamicViewBody;
|
|
1198
1219
|
DynamicViewDisplayVariantProperty: DynamicViewDisplayVariantProperty;
|
package/dist/generated/ast.mjs
CHANGED
|
@@ -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 "
|
|
874
|
-
return CustomColor;
|
|
875
|
-
}
|
|
876
|
-
case "DeploymentNode:kind": {
|
|
877
|
-
return DeploymentNodeKind;
|
|
878
|
-
}
|
|
889
|
+
case "AbstractDynamicStep:kind":
|
|
879
890
|
case "DeploymentRelation:kind":
|
|
880
|
-
case "
|
|
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,
|
|
@@ -989,6 +1019,7 @@ export class LikeC4AstReflection extends langium.AbstractAstReflection {
|
|
|
989
1019
|
properties: [
|
|
990
1020
|
{ name: "body" },
|
|
991
1021
|
{ name: "name" },
|
|
1022
|
+
{ name: "summary" },
|
|
992
1023
|
{ name: "target" },
|
|
993
1024
|
{ name: "title" }
|
|
994
1025
|
]
|
|
@@ -1011,6 +1042,7 @@ export class LikeC4AstReflection extends langium.AbstractAstReflection {
|
|
|
1011
1042
|
{ name: "body" },
|
|
1012
1043
|
{ name: "kind" },
|
|
1013
1044
|
{ name: "name" },
|
|
1045
|
+
{ name: "summary" },
|
|
1014
1046
|
{ name: "title" }
|
|
1015
1047
|
]
|
|
1016
1048
|
};
|
|
@@ -1165,20 +1197,6 @@ export class LikeC4AstReflection extends langium.AbstractAstReflection {
|
|
|
1165
1197
|
]
|
|
1166
1198
|
};
|
|
1167
1199
|
}
|
|
1168
|
-
case DynamicViewStep: {
|
|
1169
|
-
return {
|
|
1170
|
-
name: DynamicViewStep,
|
|
1171
|
-
properties: [
|
|
1172
|
-
{ name: "custom" },
|
|
1173
|
-
{ name: "dotKind" },
|
|
1174
|
-
{ name: "isBackward", defaultValue: false },
|
|
1175
|
-
{ name: "kind" },
|
|
1176
|
-
{ name: "source" },
|
|
1177
|
-
{ name: "target" },
|
|
1178
|
-
{ name: "title" }
|
|
1179
|
-
]
|
|
1180
|
-
};
|
|
1181
|
-
}
|
|
1182
1200
|
case Element: {
|
|
1183
1201
|
return {
|
|
1184
1202
|
name: Element,
|
|
@@ -2061,6 +2079,33 @@ export class LikeC4AstReflection extends langium.AbstractAstReflection {
|
|
|
2061
2079
|
]
|
|
2062
2080
|
};
|
|
2063
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
|
+
}
|
|
2064
2109
|
default: {
|
|
2065
2110
|
return {
|
|
2066
2111
|
name: type,
|