@hydranium/glsp-server 1.0.0-next.32 → 1.0.0-next.33
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/lib/messages/index.d.ts +1 -1
- package/lib/messages/index.d.ts.map +1 -1
- package/lib/messages/index.js +1 -1
- package/lib/messages/index.js.map +1 -1
- package/lib/storage/hydranium-glsp-storage.d.ts +78 -16
- package/lib/storage/hydranium-glsp-storage.d.ts.map +1 -1
- package/lib/storage/hydranium-glsp-storage.js +91 -18
- package/lib/storage/hydranium-glsp-storage.js.map +1 -1
- package/package.json +7 -7
- package/src/messages/index.ts +1 -1
- package/src/storage/hydranium-glsp-storage.ts +95 -18
package/lib/messages/index.d.ts
CHANGED
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
* The barrel is also how an adopter rendering their own diagram chrome
|
|
21
21
|
* discovers the codes exist.
|
|
22
22
|
*/
|
|
23
|
-
export { SAVE_TARGET_UNKNOWN, SOURCE_URI_MISSING } from '../storage/hydranium-glsp-storage.js';
|
|
23
|
+
export { DIAGRAM_READONLY_PARSE_ERROR, SAVE_TARGET_UNKNOWN, SOURCE_URI_MISSING } from '../storage/hydranium-glsp-storage.js';
|
|
24
24
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,4BAA4B,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC"}
|
package/lib/messages/index.js
CHANGED
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
* The barrel is also how an adopter rendering their own diagram chrome
|
|
21
21
|
* discovers the codes exist.
|
|
22
22
|
*/
|
|
23
|
-
export { SAVE_TARGET_UNKNOWN, SOURCE_URI_MISSING } from '../storage/hydranium-glsp-storage.js';
|
|
23
|
+
export { DIAGRAM_READONLY_PARSE_ERROR, SAVE_TARGET_UNKNOWN, SOURCE_URI_MISSING } from '../storage/hydranium-glsp-storage.js';
|
|
24
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,4BAA4B,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC"}
|
|
@@ -32,6 +32,26 @@ export declare const SAVE_TARGET_UNKNOWN: import("@hydranium/protocol").MessageD
|
|
|
32
32
|
* reason.
|
|
33
33
|
*/
|
|
34
34
|
export declare const SOURCE_URI_MISSING: import("@hydranium/protocol").MessageDefinition<"Could not open this model: the request did not say which document to load">;
|
|
35
|
+
/**
|
|
36
|
+
* Why the canvas has stopped accepting edits.
|
|
37
|
+
*
|
|
38
|
+
* **A READONLY canvas is otherwise indistinguishable from a broken one.** The
|
|
39
|
+
* client's answer to {@link SetEditModeAction} is to withdraw the tool palette,
|
|
40
|
+
* so the surface a reader was working in silently loses the only control it had,
|
|
41
|
+
* with the cause — a syntax error in a document that may not even be open —
|
|
42
|
+
* nowhere on screen. The mode flip is the mechanism; this is the only part of it
|
|
43
|
+
* a user can see.
|
|
44
|
+
*
|
|
45
|
+
* Rendered at the raise site, like its two siblings above and for the same
|
|
46
|
+
* reason: every member of GLSP's status action is prose or an enum.
|
|
47
|
+
*
|
|
48
|
+
* It names the recovery rather than the fault, because the fault already has a
|
|
49
|
+
* surface — the squiggle and the problems list, both of which say WHICH
|
|
50
|
+
* character — and repeating it here would put a second, less precise account of
|
|
51
|
+
* the same error on screen. What no other surface says is that the diagram is
|
|
52
|
+
* waiting on it.
|
|
53
|
+
*/
|
|
54
|
+
export declare const DIAGRAM_READONLY_PARSE_ERROR: import("@hydranium/protocol").MessageDefinition<"Read-only: this document has a syntax error. Fix it to edit the diagram again.">;
|
|
35
55
|
/**
|
|
36
56
|
* GLSP source-model storage base shared by all hydranium adopters.
|
|
37
57
|
* Provides the DI signature, the {@link ClientSessionListener} +
|
|
@@ -139,12 +159,29 @@ export declare class HydraniumGlspStorage<TRoot extends AstNode, TSourceModel =
|
|
|
139
159
|
loadSourceModel(action: RequestModelAction): MaybePromise<void>;
|
|
140
160
|
protected doLoadSourceModel(action: RequestModelAction): Promise<void>;
|
|
141
161
|
/**
|
|
142
|
-
* Capture the initial settled root and apply the initial edit mode.
|
|
143
|
-
*
|
|
144
|
-
* the first {@link handleModelUpdated} (at `Validated`, with diagnostics) flips
|
|
145
|
-
* it READONLY if the document has structural parse errors. Edit-mode +
|
|
146
|
-
* settle-hook actions are dispatched on a macrotask so the initial
|
|
162
|
+
* Capture the initial settled root and apply the initial edit mode. Edit-mode
|
|
163
|
+
* + settle-hook actions are dispatched on a macrotask so the initial
|
|
147
164
|
* `requestModel → setModel` handshake isn't perturbed.
|
|
165
|
+
*
|
|
166
|
+
* **Whether the settled document carries diagnostics depends on how far it
|
|
167
|
+
* had already got, so the initial edit mode has two correct outcomes rather
|
|
168
|
+
* than one.** `settled()` strips nothing: it resolves AT OR ABOVE the
|
|
169
|
+
* integrity landmark and hands back the live document's own array. Its
|
|
170
|
+
* `AstDocument<TAst, never>` return type asserts emptiness for a document the
|
|
171
|
+
* wait had to DRIVE to that landmark, which is pre-validation — and for that
|
|
172
|
+
* one the mode here is `EDITABLE` and the flip to READONLY arrives with the
|
|
173
|
+
* first {@link handleModelUpdated}. A document already past `Validated` when
|
|
174
|
+
* the session opened resolves immediately with its diagnostics intact, and is
|
|
175
|
+
* decided correctly here with no later update owed. Any host that validates
|
|
176
|
+
* its workspace before a diagram is opened produces the second case, so
|
|
177
|
+
* neither is exceptional.
|
|
178
|
+
*
|
|
179
|
+
* **A correct decision is not a delivered one.** This dispatch happens inside
|
|
180
|
+
* the initial `requestModel`, before the client has the model — so the UI
|
|
181
|
+
* extensions that answer {@link onParseErrorChanged}'s actions are not yet
|
|
182
|
+
* constructed, and a canvas that opens READONLY over a broken document shows
|
|
183
|
+
* none of that feedback. The same timer carries {@link onSourceModelSettled},
|
|
184
|
+
* so an adopter's own initial actions have it too.
|
|
148
185
|
*/
|
|
149
186
|
protected captureSettledRoot(rootUri: string, document: AstDocument<AstNode, never>): Promise<void>;
|
|
150
187
|
/**
|
|
@@ -197,9 +234,10 @@ export declare class HydraniumGlspStorage<TRoot extends AstNode, TSourceModel =
|
|
|
197
234
|
*
|
|
198
235
|
* Synchronous by construction — the phase-agnostic lookup door plus the shared
|
|
199
236
|
* projection — so reacting to a secondary neither waits nor can force a build.
|
|
200
|
-
* `settled()` is not an alternative:
|
|
201
|
-
*
|
|
202
|
-
*
|
|
237
|
+
* `settled()` is not an alternative: besides being asynchronous, it cannot be
|
|
238
|
+
* relied on to carry diagnostics — a document it has to drive to the landmark
|
|
239
|
+
* arrives pre-validation with an empty array — and diagnostics are the reason
|
|
240
|
+
* {@link doUpdateAndSubmit} takes a separate event document at all.
|
|
203
241
|
*/
|
|
204
242
|
protected currentPrimaryDocument(): AstDocument<AstNode, unknown> | undefined;
|
|
205
243
|
/**
|
|
@@ -241,8 +279,10 @@ export declare class HydraniumGlspStorage<TRoot extends AstNode, TSourceModel =
|
|
|
241
279
|
/**
|
|
242
280
|
* Re-settle to a guaranteed fully-linked + reprojected root, capture it, and
|
|
243
281
|
* (unless suppressed) resubmit a deduped external GModel. Diagnostics for the
|
|
244
|
-
* edit-mode decision come from the event document
|
|
245
|
-
*
|
|
282
|
+
* edit-mode decision come from the event document, because the re-settled one
|
|
283
|
+
* cannot be relied on to have any: a document driven to the landmark arrives
|
|
284
|
+
* pre-validation, and this path re-settles precisely to escape a transient
|
|
285
|
+
* mid-rebuild snapshot.
|
|
246
286
|
*/
|
|
247
287
|
protected doUpdateAndSubmit(rootUri: string, eventDocument: AstDocument<AstNode, unknown>): Promise<Action[]>;
|
|
248
288
|
/**
|
|
@@ -260,12 +300,34 @@ export declare class HydraniumGlspStorage<TRoot extends AstNode, TSourceModel =
|
|
|
260
300
|
*/
|
|
261
301
|
protected isStructurallyBroken(document: AstDocument<AstNode, unknown>): boolean;
|
|
262
302
|
/**
|
|
263
|
-
* Seam: actions to emit when the structural-broken state transitions.
|
|
264
|
-
* a
|
|
265
|
-
* disabled while the syntax is broken but re-enabled once it parses, a
|
|
266
|
-
* generic for any Langium-backed diagram
|
|
267
|
-
*
|
|
268
|
-
*
|
|
303
|
+
* Seam: actions to emit when the structural-broken state transitions.
|
|
304
|
+
* Default: a {@link SetEditModeAction} toggling READONLY ↔ EDITABLE — editing
|
|
305
|
+
* is disabled while the syntax is broken but re-enabled once it parses, a
|
|
306
|
+
* sound generic for any Langium-backed diagram — plus the
|
|
307
|
+
* {@link DIAGRAM_READONLY_PARSE_ERROR} band that says why, cleared on the way
|
|
308
|
+
* back. Adopters override to add or replace the transition feedback. The
|
|
309
|
+
* {@link AbstractHydraniumGlspState.editMode} flip itself is owned by
|
|
310
|
+
* {@link refreshEditMode}.
|
|
311
|
+
*
|
|
312
|
+
* **Both actions or neither, which is why they are one seam rather than
|
|
313
|
+
* two.** The mode flip removes the tool palette and the band is the only
|
|
314
|
+
* account of that, so an override that keeps one and drops the other produces
|
|
315
|
+
* either an unexplained loss of the palette or a warning about a restriction
|
|
316
|
+
* that is not in force.
|
|
317
|
+
*
|
|
318
|
+
* **The status is dispatched with no `timeout`, so it persists** — a
|
|
319
|
+
* time-limited band would describe a condition that outlasts it.
|
|
320
|
+
*
|
|
321
|
+
* **The slot is SHARED, and the other writer wins on one path.**
|
|
322
|
+
* `ModelSubmissionHandler`'s live validation writes the same slot, clearing
|
|
323
|
+
* it with `severity: 'NONE'` when it finishes, and an adopter dispatching its
|
|
324
|
+
* own `StatusAction` replaces this one too. Nothing re-asserts it. That is
|
|
325
|
+
* harmless while a document is being edited, because a resubmit is skipped
|
|
326
|
+
* once the AST is broken (see {@link doUpdateAndSubmit}) — but NOT at load:
|
|
327
|
+
* the initial `requestModel` submit is not that skipped path, so a diagram
|
|
328
|
+
* opened on an already-broken document shows this band and then loses it to
|
|
329
|
+
* the validation clear a moment later. Measured on a browser host, polling the
|
|
330
|
+
* overlay: no element, empty, the sentence, empty again.
|
|
269
331
|
*/
|
|
270
332
|
protected onParseErrorChanged(_document: AstDocument<AstNode, unknown>, broken: boolean): Action[];
|
|
271
333
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hydranium-glsp-storage.d.ts","sourceRoot":"","sources":["../../src/storage/hydranium-glsp-storage.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAGlF,OAAO,EACJ,KAAK,MAAM,EACX,gBAAgB,EAChB,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,oBAAoB,EAEpB,KAAK,mBAAmB,EACxB,KAAK,UAAU,EAGf,MAAM,IAAI,UAAU,EACpB,KAAK,YAAY,EAGjB,cAAc,EACd,KAAK,kBAAkB,EAEvB,KAAK,eAAe,EAEpB,KAAK,kBAAkB,EAEzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAiB,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAErF,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,WAAW,EAAE,K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;IAWrD;;;;;;;;;;;;OAYG;IACG,wBAAwB,IAAI,OAAO,CAAC,IAAI,CAAC;IAQ/C,eAAe,CAAC,cAAc,EAAE,aAAa,GAAG,IAAI;IAIpD;;;;;OAKG;IACH,OAAO,IAAI,IAAI;CAQjB"}
|
|
@@ -15,7 +15,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
15
15
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
16
16
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
17
17
|
};
|
|
18
|
-
import { MarkersReason, SetMarkersAction } from '@eclipse-glsp/protocol';
|
|
18
|
+
import { MarkersReason, SetMarkersAction, StatusAction } from '@eclipse-glsp/protocol';
|
|
19
19
|
import { ActionDispatcher, ClientSessionManager, CommandStack, EditMode, GLSPServerError, Logger as GlspLogger, ModelState, ModelSubmissionHandler, ModelValidator, SOURCE_URI_ARG, SetEditModeAction, TEMPORARY_CLIENT_ID } from '@eclipse-glsp/server';
|
|
20
20
|
import { Debouncer, defineMessage, DisposableCollection } from '@hydranium/protocol';
|
|
21
21
|
import { inject, injectable, optional, postConstruct } from 'inversify';
|
|
@@ -43,6 +43,26 @@ export const SAVE_TARGET_UNKNOWN = defineMessage('hydranium/glsp-server/save-tar
|
|
|
43
43
|
* reason.
|
|
44
44
|
*/
|
|
45
45
|
export const SOURCE_URI_MISSING = defineMessage('hydranium/glsp-server/source-uri-missing', 'Could not open this model: the request did not say which document to load');
|
|
46
|
+
/**
|
|
47
|
+
* Why the canvas has stopped accepting edits.
|
|
48
|
+
*
|
|
49
|
+
* **A READONLY canvas is otherwise indistinguishable from a broken one.** The
|
|
50
|
+
* client's answer to {@link SetEditModeAction} is to withdraw the tool palette,
|
|
51
|
+
* so the surface a reader was working in silently loses the only control it had,
|
|
52
|
+
* with the cause — a syntax error in a document that may not even be open —
|
|
53
|
+
* nowhere on screen. The mode flip is the mechanism; this is the only part of it
|
|
54
|
+
* a user can see.
|
|
55
|
+
*
|
|
56
|
+
* Rendered at the raise site, like its two siblings above and for the same
|
|
57
|
+
* reason: every member of GLSP's status action is prose or an enum.
|
|
58
|
+
*
|
|
59
|
+
* It names the recovery rather than the fault, because the fault already has a
|
|
60
|
+
* surface — the squiggle and the problems list, both of which say WHICH
|
|
61
|
+
* character — and repeating it here would put a second, less precise account of
|
|
62
|
+
* the same error on screen. What no other surface says is that the diagram is
|
|
63
|
+
* waiting on it.
|
|
64
|
+
*/
|
|
65
|
+
export const DIAGRAM_READONLY_PARSE_ERROR = defineMessage('hydranium/glsp-server/diagram-readonly-parse-error', 'Read-only: this document has a syntax error. Fix it to edit the diagram again.');
|
|
46
66
|
/** Window (ms) over which back-to-back external rebuilds collapse into one resubmit. */
|
|
47
67
|
const EXTERNAL_SUBMIT_DEBOUNCE_MS = 250;
|
|
48
68
|
/**
|
|
@@ -211,12 +231,29 @@ let HydraniumGlspStorage = class HydraniumGlspStorage {
|
|
|
211
231
|
await this.captureSettledRoot(rootUri, document);
|
|
212
232
|
}
|
|
213
233
|
/**
|
|
214
|
-
* Capture the initial settled root and apply the initial edit mode.
|
|
215
|
-
*
|
|
216
|
-
* the first {@link handleModelUpdated} (at `Validated`, with diagnostics) flips
|
|
217
|
-
* it READONLY if the document has structural parse errors. Edit-mode +
|
|
218
|
-
* settle-hook actions are dispatched on a macrotask so the initial
|
|
234
|
+
* Capture the initial settled root and apply the initial edit mode. Edit-mode
|
|
235
|
+
* + settle-hook actions are dispatched on a macrotask so the initial
|
|
219
236
|
* `requestModel → setModel` handshake isn't perturbed.
|
|
237
|
+
*
|
|
238
|
+
* **Whether the settled document carries diagnostics depends on how far it
|
|
239
|
+
* had already got, so the initial edit mode has two correct outcomes rather
|
|
240
|
+
* than one.** `settled()` strips nothing: it resolves AT OR ABOVE the
|
|
241
|
+
* integrity landmark and hands back the live document's own array. Its
|
|
242
|
+
* `AstDocument<TAst, never>` return type asserts emptiness for a document the
|
|
243
|
+
* wait had to DRIVE to that landmark, which is pre-validation — and for that
|
|
244
|
+
* one the mode here is `EDITABLE` and the flip to READONLY arrives with the
|
|
245
|
+
* first {@link handleModelUpdated}. A document already past `Validated` when
|
|
246
|
+
* the session opened resolves immediately with its diagnostics intact, and is
|
|
247
|
+
* decided correctly here with no later update owed. Any host that validates
|
|
248
|
+
* its workspace before a diagram is opened produces the second case, so
|
|
249
|
+
* neither is exceptional.
|
|
250
|
+
*
|
|
251
|
+
* **A correct decision is not a delivered one.** This dispatch happens inside
|
|
252
|
+
* the initial `requestModel`, before the client has the model — so the UI
|
|
253
|
+
* extensions that answer {@link onParseErrorChanged}'s actions are not yet
|
|
254
|
+
* constructed, and a canvas that opens READONLY over a broken document shows
|
|
255
|
+
* none of that feedback. The same timer carries {@link onSourceModelSettled},
|
|
256
|
+
* so an adopter's own initial actions have it too.
|
|
220
257
|
*/
|
|
221
258
|
async captureSettledRoot(rootUri, document) {
|
|
222
259
|
this.state.setSourceRoot(rootUri, document.root);
|
|
@@ -303,9 +340,10 @@ let HydraniumGlspStorage = class HydraniumGlspStorage {
|
|
|
303
340
|
*
|
|
304
341
|
* Synchronous by construction — the phase-agnostic lookup door plus the shared
|
|
305
342
|
* projection — so reacting to a secondary neither waits nor can force a build.
|
|
306
|
-
* `settled()` is not an alternative:
|
|
307
|
-
*
|
|
308
|
-
*
|
|
343
|
+
* `settled()` is not an alternative: besides being asynchronous, it cannot be
|
|
344
|
+
* relied on to carry diagnostics — a document it has to drive to the landmark
|
|
345
|
+
* arrives pre-validation with an empty array — and diagnostics are the reason
|
|
346
|
+
* {@link doUpdateAndSubmit} takes a separate event document at all.
|
|
309
347
|
*/
|
|
310
348
|
currentPrimaryDocument() {
|
|
311
349
|
const document = this.sharedServices.model.ModelService.getDocument(this.state.sourceUri);
|
|
@@ -379,8 +417,10 @@ let HydraniumGlspStorage = class HydraniumGlspStorage {
|
|
|
379
417
|
/**
|
|
380
418
|
* Re-settle to a guaranteed fully-linked + reprojected root, capture it, and
|
|
381
419
|
* (unless suppressed) resubmit a deduped external GModel. Diagnostics for the
|
|
382
|
-
* edit-mode decision come from the event document
|
|
383
|
-
*
|
|
420
|
+
* edit-mode decision come from the event document, because the re-settled one
|
|
421
|
+
* cannot be relied on to have any: a document driven to the landmark arrives
|
|
422
|
+
* pre-validation, and this path re-settles precisely to escape a transient
|
|
423
|
+
* mid-rebuild snapshot.
|
|
384
424
|
*/
|
|
385
425
|
async doUpdateAndSubmit(rootUri, eventDocument) {
|
|
386
426
|
// Settle-gate the capture: never setSourceRoot off the event's possibly-transient
|
|
@@ -438,15 +478,48 @@ let HydraniumGlspStorage = class HydraniumGlspStorage {
|
|
|
438
478
|
return document.diagnostics.some(diagnostic => isStructuralDiagnostic(diagnostic));
|
|
439
479
|
}
|
|
440
480
|
/**
|
|
441
|
-
* Seam: actions to emit when the structural-broken state transitions.
|
|
442
|
-
* a
|
|
443
|
-
* disabled while the syntax is broken but re-enabled once it parses, a
|
|
444
|
-
* generic for any Langium-backed diagram
|
|
445
|
-
*
|
|
446
|
-
*
|
|
481
|
+
* Seam: actions to emit when the structural-broken state transitions.
|
|
482
|
+
* Default: a {@link SetEditModeAction} toggling READONLY ↔ EDITABLE — editing
|
|
483
|
+
* is disabled while the syntax is broken but re-enabled once it parses, a
|
|
484
|
+
* sound generic for any Langium-backed diagram — plus the
|
|
485
|
+
* {@link DIAGRAM_READONLY_PARSE_ERROR} band that says why, cleared on the way
|
|
486
|
+
* back. Adopters override to add or replace the transition feedback. The
|
|
487
|
+
* {@link AbstractHydraniumGlspState.editMode} flip itself is owned by
|
|
488
|
+
* {@link refreshEditMode}.
|
|
489
|
+
*
|
|
490
|
+
* **Both actions or neither, which is why they are one seam rather than
|
|
491
|
+
* two.** The mode flip removes the tool palette and the band is the only
|
|
492
|
+
* account of that, so an override that keeps one and drops the other produces
|
|
493
|
+
* either an unexplained loss of the palette or a warning about a restriction
|
|
494
|
+
* that is not in force.
|
|
495
|
+
*
|
|
496
|
+
* **The status is dispatched with no `timeout`, so it persists** — a
|
|
497
|
+
* time-limited band would describe a condition that outlasts it.
|
|
498
|
+
*
|
|
499
|
+
* **The slot is SHARED, and the other writer wins on one path.**
|
|
500
|
+
* `ModelSubmissionHandler`'s live validation writes the same slot, clearing
|
|
501
|
+
* it with `severity: 'NONE'` when it finishes, and an adopter dispatching its
|
|
502
|
+
* own `StatusAction` replaces this one too. Nothing re-asserts it. That is
|
|
503
|
+
* harmless while a document is being edited, because a resubmit is skipped
|
|
504
|
+
* once the AST is broken (see {@link doUpdateAndSubmit}) — but NOT at load:
|
|
505
|
+
* the initial `requestModel` submit is not that skipped path, so a diagram
|
|
506
|
+
* opened on an already-broken document shows this band and then loses it to
|
|
507
|
+
* the validation clear a moment later. Measured on a browser host, polling the
|
|
508
|
+
* overlay: no element, empty, the sentence, empty again.
|
|
447
509
|
*/
|
|
448
510
|
onParseErrorChanged(_document, broken) {
|
|
449
|
-
return [
|
|
511
|
+
return [
|
|
512
|
+
SetEditModeAction.create(broken ? EditMode.READONLY : EditMode.EDITABLE),
|
|
513
|
+
broken
|
|
514
|
+
? StatusAction.create(this.sharedServices.MessageRenderer.renderMessage(DIAGRAM_READONLY_PARSE_ERROR), {
|
|
515
|
+
severity: 'WARNING'
|
|
516
|
+
})
|
|
517
|
+
: // `NONE` is the client's own spelling for "clear", not a severity it
|
|
518
|
+
// renders: `StatusOverlay.handle` branches on it before touching the
|
|
519
|
+
// DOM. An empty message at any other severity leaves an empty band
|
|
520
|
+
// with a warning icon standing on the canvas.
|
|
521
|
+
StatusAction.create('', { severity: 'NONE' })
|
|
522
|
+
];
|
|
450
523
|
}
|
|
451
524
|
/**
|
|
452
525
|
* Seam: extra actions to dispatch right after the initial settled root is
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hydranium-glsp-storage.js","sourceRoot":"","sources":["../../src/storage/hydranium-glsp-storage.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;;;;;;;;;;AAElF,OAAO,EAAE,aAAa,EAAE,gB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"version": "1.0.0-next.
|
|
3
|
+
"version": "1.0.0-next.33",
|
|
4
4
|
"description": "GLSP protocol head for the hydranium framework. Peer of @hydranium/core/lsp and @hydranium/data-server; built on @hydranium/core.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"hydranium",
|
|
@@ -87,9 +87,9 @@
|
|
|
87
87
|
"devDependencies": {
|
|
88
88
|
"@eclipse-glsp/protocol": "2.7.0",
|
|
89
89
|
"@eclipse-glsp/server": "2.7.0",
|
|
90
|
-
"@hydranium/core": "1.0.0-next.
|
|
91
|
-
"@hydranium/langium": "1.0.0-next.
|
|
92
|
-
"@hydranium/protocol": "1.0.0-next.
|
|
90
|
+
"@hydranium/core": "1.0.0-next.33",
|
|
91
|
+
"@hydranium/langium": "1.0.0-next.33",
|
|
92
|
+
"@hydranium/protocol": "1.0.0-next.33",
|
|
93
93
|
"inversify": "6.2.2",
|
|
94
94
|
"reflect-metadata": "0.2.2",
|
|
95
95
|
"rimraf": "^5.0.0",
|
|
@@ -100,9 +100,9 @@
|
|
|
100
100
|
"peerDependencies": {
|
|
101
101
|
"@eclipse-glsp/protocol": "^2.6.0",
|
|
102
102
|
"@eclipse-glsp/server": "^2.6.0",
|
|
103
|
-
"@hydranium/core": "1.0.0-next.
|
|
104
|
-
"@hydranium/langium": "1.0.0-next.
|
|
105
|
-
"@hydranium/protocol": "1.0.0-next.
|
|
103
|
+
"@hydranium/core": "1.0.0-next.33",
|
|
104
|
+
"@hydranium/langium": "1.0.0-next.33",
|
|
105
|
+
"@hydranium/protocol": "1.0.0-next.33",
|
|
106
106
|
"inversify": "^6.0.0",
|
|
107
107
|
"reflect-metadata": "^0.2.2",
|
|
108
108
|
"vscode-jsonrpc": "9.0.1",
|
package/src/messages/index.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* SPDX-License-Identifier: MIT
|
|
8
8
|
********************************************************************************/
|
|
9
9
|
|
|
10
|
-
import { MarkersReason, SetMarkersAction } from '@eclipse-glsp/protocol';
|
|
10
|
+
import { MarkersReason, SetMarkersAction, StatusAction } from '@eclipse-glsp/protocol';
|
|
11
11
|
import {
|
|
12
12
|
type Action,
|
|
13
13
|
ActionDispatcher,
|
|
@@ -69,6 +69,30 @@ export const SOURCE_URI_MISSING = defineMessage(
|
|
|
69
69
|
'Could not open this model: the request did not say which document to load'
|
|
70
70
|
);
|
|
71
71
|
|
|
72
|
+
/**
|
|
73
|
+
* Why the canvas has stopped accepting edits.
|
|
74
|
+
*
|
|
75
|
+
* **A READONLY canvas is otherwise indistinguishable from a broken one.** The
|
|
76
|
+
* client's answer to {@link SetEditModeAction} is to withdraw the tool palette,
|
|
77
|
+
* so the surface a reader was working in silently loses the only control it had,
|
|
78
|
+
* with the cause — a syntax error in a document that may not even be open —
|
|
79
|
+
* nowhere on screen. The mode flip is the mechanism; this is the only part of it
|
|
80
|
+
* a user can see.
|
|
81
|
+
*
|
|
82
|
+
* Rendered at the raise site, like its two siblings above and for the same
|
|
83
|
+
* reason: every member of GLSP's status action is prose or an enum.
|
|
84
|
+
*
|
|
85
|
+
* It names the recovery rather than the fault, because the fault already has a
|
|
86
|
+
* surface — the squiggle and the problems list, both of which say WHICH
|
|
87
|
+
* character — and repeating it here would put a second, less precise account of
|
|
88
|
+
* the same error on screen. What no other surface says is that the diagram is
|
|
89
|
+
* waiting on it.
|
|
90
|
+
*/
|
|
91
|
+
export const DIAGRAM_READONLY_PARSE_ERROR = defineMessage(
|
|
92
|
+
'hydranium/glsp-server/diagram-readonly-parse-error',
|
|
93
|
+
'Read-only: this document has a syntax error. Fix it to edit the diagram again.'
|
|
94
|
+
);
|
|
95
|
+
|
|
72
96
|
/** Window (ms) over which back-to-back external rebuilds collapse into one resubmit. */
|
|
73
97
|
const EXTERNAL_SUBMIT_DEBOUNCE_MS = 250;
|
|
74
98
|
|
|
@@ -262,12 +286,29 @@ export class HydraniumGlspStorage<TRoot extends AstNode, TSourceModel = string>
|
|
|
262
286
|
}
|
|
263
287
|
|
|
264
288
|
/**
|
|
265
|
-
* Capture the initial settled root and apply the initial edit mode.
|
|
266
|
-
*
|
|
267
|
-
* the first {@link handleModelUpdated} (at `Validated`, with diagnostics) flips
|
|
268
|
-
* it READONLY if the document has structural parse errors. Edit-mode +
|
|
269
|
-
* settle-hook actions are dispatched on a macrotask so the initial
|
|
289
|
+
* Capture the initial settled root and apply the initial edit mode. Edit-mode
|
|
290
|
+
* + settle-hook actions are dispatched on a macrotask so the initial
|
|
270
291
|
* `requestModel → setModel` handshake isn't perturbed.
|
|
292
|
+
*
|
|
293
|
+
* **Whether the settled document carries diagnostics depends on how far it
|
|
294
|
+
* had already got, so the initial edit mode has two correct outcomes rather
|
|
295
|
+
* than one.** `settled()` strips nothing: it resolves AT OR ABOVE the
|
|
296
|
+
* integrity landmark and hands back the live document's own array. Its
|
|
297
|
+
* `AstDocument<TAst, never>` return type asserts emptiness for a document the
|
|
298
|
+
* wait had to DRIVE to that landmark, which is pre-validation — and for that
|
|
299
|
+
* one the mode here is `EDITABLE` and the flip to READONLY arrives with the
|
|
300
|
+
* first {@link handleModelUpdated}. A document already past `Validated` when
|
|
301
|
+
* the session opened resolves immediately with its diagnostics intact, and is
|
|
302
|
+
* decided correctly here with no later update owed. Any host that validates
|
|
303
|
+
* its workspace before a diagram is opened produces the second case, so
|
|
304
|
+
* neither is exceptional.
|
|
305
|
+
*
|
|
306
|
+
* **A correct decision is not a delivered one.** This dispatch happens inside
|
|
307
|
+
* the initial `requestModel`, before the client has the model — so the UI
|
|
308
|
+
* extensions that answer {@link onParseErrorChanged}'s actions are not yet
|
|
309
|
+
* constructed, and a canvas that opens READONLY over a broken document shows
|
|
310
|
+
* none of that feedback. The same timer carries {@link onSourceModelSettled},
|
|
311
|
+
* so an adopter's own initial actions have it too.
|
|
271
312
|
*/
|
|
272
313
|
protected async captureSettledRoot(rootUri: string, document: AstDocument<AstNode, never>): Promise<void> {
|
|
273
314
|
this.state.setSourceRoot(rootUri, document.root as TRoot);
|
|
@@ -360,9 +401,10 @@ export class HydraniumGlspStorage<TRoot extends AstNode, TSourceModel = string>
|
|
|
360
401
|
*
|
|
361
402
|
* Synchronous by construction — the phase-agnostic lookup door plus the shared
|
|
362
403
|
* projection — so reacting to a secondary neither waits nor can force a build.
|
|
363
|
-
* `settled()` is not an alternative:
|
|
364
|
-
*
|
|
365
|
-
*
|
|
404
|
+
* `settled()` is not an alternative: besides being asynchronous, it cannot be
|
|
405
|
+
* relied on to carry diagnostics — a document it has to drive to the landmark
|
|
406
|
+
* arrives pre-validation with an empty array — and diagnostics are the reason
|
|
407
|
+
* {@link doUpdateAndSubmit} takes a separate event document at all.
|
|
366
408
|
*/
|
|
367
409
|
protected currentPrimaryDocument(): AstDocument<AstNode, unknown> | undefined {
|
|
368
410
|
const document = this.sharedServices.model.ModelService.getDocument(this.state.sourceUri);
|
|
@@ -445,8 +487,10 @@ export class HydraniumGlspStorage<TRoot extends AstNode, TSourceModel = string>
|
|
|
445
487
|
/**
|
|
446
488
|
* Re-settle to a guaranteed fully-linked + reprojected root, capture it, and
|
|
447
489
|
* (unless suppressed) resubmit a deduped external GModel. Diagnostics for the
|
|
448
|
-
* edit-mode decision come from the event document
|
|
449
|
-
*
|
|
490
|
+
* edit-mode decision come from the event document, because the re-settled one
|
|
491
|
+
* cannot be relied on to have any: a document driven to the landmark arrives
|
|
492
|
+
* pre-validation, and this path re-settles precisely to escape a transient
|
|
493
|
+
* mid-rebuild snapshot.
|
|
450
494
|
*/
|
|
451
495
|
protected async doUpdateAndSubmit(rootUri: string, eventDocument: AstDocument<AstNode, unknown>): Promise<Action[]> {
|
|
452
496
|
// Settle-gate the capture: never setSourceRoot off the event's possibly-transient
|
|
@@ -508,15 +552,48 @@ export class HydraniumGlspStorage<TRoot extends AstNode, TSourceModel = string>
|
|
|
508
552
|
}
|
|
509
553
|
|
|
510
554
|
/**
|
|
511
|
-
* Seam: actions to emit when the structural-broken state transitions.
|
|
512
|
-
* a
|
|
513
|
-
* disabled while the syntax is broken but re-enabled once it parses, a
|
|
514
|
-
* generic for any Langium-backed diagram
|
|
515
|
-
*
|
|
516
|
-
*
|
|
555
|
+
* Seam: actions to emit when the structural-broken state transitions.
|
|
556
|
+
* Default: a {@link SetEditModeAction} toggling READONLY ↔ EDITABLE — editing
|
|
557
|
+
* is disabled while the syntax is broken but re-enabled once it parses, a
|
|
558
|
+
* sound generic for any Langium-backed diagram — plus the
|
|
559
|
+
* {@link DIAGRAM_READONLY_PARSE_ERROR} band that says why, cleared on the way
|
|
560
|
+
* back. Adopters override to add or replace the transition feedback. The
|
|
561
|
+
* {@link AbstractHydraniumGlspState.editMode} flip itself is owned by
|
|
562
|
+
* {@link refreshEditMode}.
|
|
563
|
+
*
|
|
564
|
+
* **Both actions or neither, which is why they are one seam rather than
|
|
565
|
+
* two.** The mode flip removes the tool palette and the band is the only
|
|
566
|
+
* account of that, so an override that keeps one and drops the other produces
|
|
567
|
+
* either an unexplained loss of the palette or a warning about a restriction
|
|
568
|
+
* that is not in force.
|
|
569
|
+
*
|
|
570
|
+
* **The status is dispatched with no `timeout`, so it persists** — a
|
|
571
|
+
* time-limited band would describe a condition that outlasts it.
|
|
572
|
+
*
|
|
573
|
+
* **The slot is SHARED, and the other writer wins on one path.**
|
|
574
|
+
* `ModelSubmissionHandler`'s live validation writes the same slot, clearing
|
|
575
|
+
* it with `severity: 'NONE'` when it finishes, and an adopter dispatching its
|
|
576
|
+
* own `StatusAction` replaces this one too. Nothing re-asserts it. That is
|
|
577
|
+
* harmless while a document is being edited, because a resubmit is skipped
|
|
578
|
+
* once the AST is broken (see {@link doUpdateAndSubmit}) — but NOT at load:
|
|
579
|
+
* the initial `requestModel` submit is not that skipped path, so a diagram
|
|
580
|
+
* opened on an already-broken document shows this band and then loses it to
|
|
581
|
+
* the validation clear a moment later. Measured on a browser host, polling the
|
|
582
|
+
* overlay: no element, empty, the sentence, empty again.
|
|
517
583
|
*/
|
|
518
584
|
protected onParseErrorChanged(_document: AstDocument<AstNode, unknown>, broken: boolean): Action[] {
|
|
519
|
-
return [
|
|
585
|
+
return [
|
|
586
|
+
SetEditModeAction.create(broken ? EditMode.READONLY : EditMode.EDITABLE),
|
|
587
|
+
broken
|
|
588
|
+
? StatusAction.create(this.sharedServices.MessageRenderer.renderMessage(DIAGRAM_READONLY_PARSE_ERROR), {
|
|
589
|
+
severity: 'WARNING'
|
|
590
|
+
})
|
|
591
|
+
: // `NONE` is the client's own spelling for "clear", not a severity it
|
|
592
|
+
// renders: `StatusOverlay.handle` branches on it before touching the
|
|
593
|
+
// DOM. An empty message at any other severity leaves an empty band
|
|
594
|
+
// with a warning icon standing on the canvas.
|
|
595
|
+
StatusAction.create('', { severity: 'NONE' })
|
|
596
|
+
];
|
|
520
597
|
}
|
|
521
598
|
|
|
522
599
|
/**
|