@hydranium/glsp-client-theia 1.0.0-next.31 → 1.0.0-next.313
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/README.md +60 -98
- package/lib/browser/client-contribution.d.ts +87 -25
- package/lib/browser/client-contribution.d.ts.map +1 -1
- package/lib/browser/client-contribution.js +233 -53
- package/lib/browser/client-contribution.js.map +1 -1
- package/lib/browser/diagram-only-marker-manager.d.ts.map +1 -1
- package/lib/browser/diagram-only-marker-manager.js.map +1 -1
- package/lib/browser/diagram-widget.d.ts +43 -25
- package/lib/browser/diagram-widget.d.ts.map +1 -1
- package/lib/browser/diagram-widget.js +76 -26
- package/lib/browser/diagram-widget.js.map +1 -1
- package/lib/browser/glsp-client-theia-module.d.ts +12 -5
- package/lib/browser/glsp-client-theia-module.d.ts.map +1 -1
- package/lib/browser/glsp-client-theia-module.js +27 -12
- package/lib/browser/glsp-client-theia-module.js.map +1 -1
- package/lib/browser/glsp-diagram-manager.d.ts +40 -1
- package/lib/browser/glsp-diagram-manager.d.ts.map +1 -1
- package/lib/browser/glsp-diagram-manager.js +100 -0
- package/lib/browser/glsp-diagram-manager.js.map +1 -1
- package/lib/browser/glsp-message-service.d.ts.map +1 -1
- package/lib/browser/glsp-message-service.js.map +1 -1
- package/lib/browser/glsp-saveable.d.ts +67 -0
- package/lib/browser/glsp-saveable.d.ts.map +1 -0
- package/lib/browser/glsp-saveable.js +110 -0
- package/lib/browser/glsp-saveable.js.map +1 -0
- package/lib/browser/glsp-theia-frontend-module.d.ts.map +1 -1
- package/lib/browser/glsp-theia-frontend-module.js +4 -1
- package/lib/browser/glsp-theia-frontend-module.js.map +1 -1
- package/lib/browser/hydranium-glsp-diagram-configuration.d.ts +3 -1
- package/lib/browser/hydranium-glsp-diagram-configuration.d.ts.map +1 -1
- package/lib/browser/hydranium-glsp-diagram-configuration.js +3 -1
- package/lib/browser/hydranium-glsp-diagram-configuration.js.map +1 -1
- package/lib/browser/index.d.ts +4 -3
- package/lib/browser/index.d.ts.map +1 -1
- package/lib/browser/index.js +7 -5
- package/lib/browser/index.js.map +1 -1
- package/lib/browser/theia-diagram-loader.d.ts +25 -0
- package/lib/browser/theia-diagram-loader.d.ts.map +1 -0
- package/lib/browser/theia-diagram-loader.js +42 -0
- package/lib/browser/theia-diagram-loader.js.map +1 -0
- package/lib/browser/window-session.d.ts +57 -0
- package/lib/browser/window-session.d.ts.map +1 -0
- package/lib/browser/window-session.js +102 -0
- package/lib/browser/window-session.js.map +1 -0
- package/lib/node/connection-container-module.js.map +1 -1
- package/lib/node/glsp-server-connection-handler.d.ts +11 -20
- package/lib/node/glsp-server-connection-handler.d.ts.map +1 -1
- package/lib/node/glsp-server-connection-handler.js +12 -15
- package/lib/node/glsp-server-connection-handler.js.map +1 -1
- package/package.json +37 -46
- package/src/browser/client-contribution.ts +254 -55
- package/src/browser/diagram-widget.ts +80 -28
- package/src/browser/glsp-client-theia-module.ts +34 -13
- package/src/browser/glsp-diagram-manager.ts +112 -3
- package/src/browser/glsp-saveable.ts +111 -0
- package/src/browser/glsp-theia-frontend-module.ts +4 -1
- package/src/browser/hydranium-glsp-diagram-configuration.ts +3 -1
- package/src/browser/index.ts +12 -5
- package/src/browser/theia-diagram-loader.ts +31 -0
- package/src/browser/window-session.ts +114 -0
- package/src/node/glsp-server-connection-handler.ts +12 -24
- package/style/diagram-loading.css +2 -5
- package/lib/browser/action-dispatcher.d.ts +0 -85
- package/lib/browser/action-dispatcher.d.ts.map +0 -1
- package/lib/browser/action-dispatcher.js +0 -238
- package/lib/browser/action-dispatcher.js.map +0 -1
- package/lib/browser/diagram-loader.d.ts +0 -123
- package/lib/browser/diagram-loader.d.ts.map +0 -1
- package/lib/browser/diagram-loader.js +0 -153
- package/lib/browser/diagram-loader.js.map +0 -1
- package/lib/browser/hidden-bounds-updater.d.ts +0 -122
- package/lib/browser/hidden-bounds-updater.d.ts.map +0 -1
- package/lib/browser/hidden-bounds-updater.js +0 -207
- package/lib/browser/hidden-bounds-updater.js.map +0 -1
- package/lib/testing/bind-recorder.d.ts +0 -67
- package/lib/testing/bind-recorder.d.ts.map +0 -1
- package/lib/testing/bind-recorder.js +0 -72
- package/lib/testing/bind-recorder.js.map +0 -1
- package/lib/testing/index.d.ts +0 -10
- package/lib/testing/index.d.ts.map +0 -1
- package/lib/testing/index.js +0 -30
- package/lib/testing/index.js.map +0 -1
- package/src/browser/action-dispatcher.ts +0 -257
- package/src/browser/diagram-loader.ts +0 -173
- package/src/browser/hidden-bounds-updater.ts +0 -212
- package/src/testing/bind-recorder.ts +0 -126
- package/src/testing/index.ts +0 -15
package/README.md
CHANGED
|
@@ -1,60 +1,23 @@
|
|
|
1
1
|
# `@hydranium/glsp-client-theia`
|
|
2
2
|
|
|
3
|
-
Theia
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
module composition, the instrumented dispatcher and bounds updater, the loading
|
|
9
|
-
overlay, the marker-propagation switch, and the backend socket bridge. Install it
|
|
10
|
-
if you are mounting a hydranium GLSP diagram in a Theia application.
|
|
3
|
+
The Theia integration for the
|
|
4
|
+
[Hydranium](https://github.com/eclipse-emfcloud/hydranium) GLSP head, the
|
|
5
|
+
companion of `@hydranium/glsp-server`. Install it to mount a Hydranium diagram
|
|
6
|
+
in a Theia application. It builds on `@eclipse-glsp/theia-integration`,
|
|
7
|
+
`@hydranium/glsp-client` and `@hydranium/client-theia`.
|
|
11
8
|
|
|
12
9
|
## What it gives you
|
|
13
10
|
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
`HydraniumHiddenBoundsUpdater`, and `HydraniumGlspMessageService`. Each
|
|
25
|
-
replaces a GLSP default with a strict superset of its behaviour, so a head that
|
|
26
|
-
wants the original rebinds that one token back.
|
|
27
|
-
- **Loading feedback that cannot silently vanish.** `HydraniumDiagramLoader`
|
|
28
|
-
catches every load failure — the dispatcher-init, connect and first
|
|
29
|
-
`RequestModelAction` steps upstream leaves unwrapped — routes it to the Output
|
|
30
|
-
channel, and reports it as an error `StatusAction`. It publishes a terminal
|
|
31
|
-
`DiagramLoadOutcome`, which `HydraniumGlspDiagramWidget` keys its opaque canvas
|
|
32
|
-
overlay on (`DIAGRAM_LOADING_CLASS`, `DIAGRAM_LOADING_FAILED_CLASS`).
|
|
33
|
-
`HydraniumGlspMessageService` then drops the now-redundant "Model loading in
|
|
34
|
-
progress" toast (`MODEL_LOADING_PROGRESS_TITLE`) and forwards every other
|
|
35
|
-
progress report untouched.
|
|
36
|
-
- **Instrumentation.** `HydraniumGlspActionDispatcher` logs action traffic into
|
|
37
|
-
the shared Output channel and pairs requests with responses — by id, or by kind
|
|
38
|
-
for the GLSP flow actions that carry none (`HYDRANIUM_DEFAULT_LOGGED_KINDS`,
|
|
39
|
-
`HYDRANIUM_DEFAULT_KIND_PAIRS`, extensible via
|
|
40
|
-
`HydraniumGlspActionDispatcherOptions`). `HydraniumHiddenBoundsUpdater` emits
|
|
41
|
-
one trace line per bounds request with the measured element count and the raw
|
|
42
|
-
`getBBox` cost — the client-side phase that scales with rendered elements
|
|
43
|
-
rather than model size.
|
|
44
|
-
- **`AbstractHydraniumGlspDiagramConfiguration`** with
|
|
45
|
-
`propagateMarkersToProblemsView` — set it `false` for a head whose co-resident
|
|
46
|
-
LSP already publishes the same diagnostics, and the per-diagram container binds
|
|
47
|
-
`NoOpExternalMarkerManager` instead: markers still decorate the diagram, but
|
|
48
|
-
Theia's Problems view stops double-listing them.
|
|
49
|
-
**`AbstractHydraniumGlspDiagramManager`** derives the language-correlated
|
|
50
|
-
getters from one descriptor plus a label.
|
|
51
|
-
- **`HydraniumGlspClientContribution`** — for a server that starts late: it tails
|
|
52
|
-
the Output channel for a server-printed ready marker and defers `start` until a
|
|
53
|
-
workspace is open.
|
|
54
|
-
- **Backend (`./node`)** — `GlspServerConnectionHandler` (the socket bridge,
|
|
55
|
-
plugging in `@eclipse-glsp/theia-integration`'s `SocketConnectionForwarder`) and
|
|
56
|
-
`createGlspConnectionContainerModule(handler)` for the frontend-scoped module
|
|
57
|
-
boilerplate.
|
|
11
|
+
- A diagram mounted from one subclass of
|
|
12
|
+
`AbstractHydraniumGlspTheiaFrontendModule`.
|
|
13
|
+
- Load failures shown on the diagram with a Retry, and logged to the Output
|
|
14
|
+
channel beside the diagram's action traffic.
|
|
15
|
+
- A client that waits for a workspace, and starts again after a failed start
|
|
16
|
+
or a lost connection.
|
|
17
|
+
- Unsaved diagram changes kept across a reload or a reconnect, while the server
|
|
18
|
+
stays the same.
|
|
19
|
+
- Problems listed once when the LSP head reports them too.
|
|
20
|
+
- The backend handler that relays the channel to the GLSP server's socket.
|
|
58
21
|
|
|
59
22
|
## Install
|
|
60
23
|
|
|
@@ -62,73 +25,72 @@ if you are mounting a hydranium GLSP diagram in a Theia application.
|
|
|
62
25
|
npm install @hydranium/glsp-client-theia
|
|
63
26
|
```
|
|
64
27
|
|
|
65
|
-
You must already have a Theia application wired for GLSP — `@eclipse-glsp/client`
|
|
66
|
-
and `@eclipse-glsp/theia-integration` are peers, not bundled — and a running
|
|
67
|
-
hydranium GLSP server. The declared peer dependencies are:
|
|
68
|
-
|
|
69
28
|
| Peer | Range |
|
|
70
29
|
| --------------------------------- | ------------- |
|
|
71
30
|
| `@eclipse-glsp/client` | `^2.6.0` |
|
|
72
31
|
| `@eclipse-glsp/theia-integration` | `^2.6.0` |
|
|
73
32
|
| `@hydranium/client-theia` | `^1.0.0-next` |
|
|
33
|
+
| `@hydranium/glsp-client` | `^1.0.0-next` |
|
|
74
34
|
| `@hydranium/protocol` | `^1.0.0-next` |
|
|
75
35
|
| `@theia/core` | `^1.70.0` |
|
|
76
|
-
| `@theia/output` | `^1.70.0` |
|
|
77
36
|
| `@theia/process` | `^1.70.0` |
|
|
78
37
|
| `@theia/workspace` | `^1.70.0` |
|
|
79
38
|
| `inversify` | `^6.0.0` |
|
|
80
39
|
| `snabbdom` | `^3.5.1` |
|
|
40
|
+
| `vscode-jsonrpc` | `^9.0.0` |
|
|
81
41
|
|
|
82
42
|
## Wiring
|
|
83
43
|
|
|
84
|
-
This package declares no `theiaExtensions
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
`
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
`
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
`
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
44
|
+
This package declares no `theiaExtensions`; your own Theia extension declares
|
|
45
|
+
them, one frontend and backend pair per diagram.
|
|
46
|
+
|
|
47
|
+
- The frontend entry exports `new MyDiagramModule()`, where `MyDiagramModule`
|
|
48
|
+
extends `AbstractHydraniumGlspTheiaFrontendModule` and names the diagram's
|
|
49
|
+
language, configuration and manager. Return a subclass of
|
|
50
|
+
`HydraniumGlspClientContribution` from its `bindClientContribution()`, and
|
|
51
|
+
set its `logLevelPreference` to have it bind the log level preference.
|
|
52
|
+
- Your diagram configuration extends
|
|
53
|
+
`AbstractHydraniumGlspDiagramConfiguration` and calls
|
|
54
|
+
`createGlspClientTheiaModule` from its `configureContainer`, not from the
|
|
55
|
+
frontend module: called earlier, GLSP's own bindings silently replace its
|
|
56
|
+
rebinds. It binds `@hydranium/glsp-client`'s classes over the Output
|
|
57
|
+
channel; your host-neutral diagram module still calls
|
|
58
|
+
`configureHydraniumModelElements` from that package and names
|
|
59
|
+
`HydraniumGEdge` for its edge types. Set `propagateMarkersToProblemsView`
|
|
60
|
+
to `false` when the LSP head already reports the same problems.
|
|
61
|
+
- One frontend module calls `bindEditorDiskSync` from
|
|
62
|
+
`@hydranium/client-theia`, since a diagram save writes a file an editor can
|
|
63
|
+
have open.
|
|
64
|
+
- The backend entry exports `createGlspConnectionContainerModule(MyHandler)`,
|
|
65
|
+
where `MyHandler` extends `GlspServerConnectionHandler`.
|
|
66
|
+
|
|
67
|
+
The widget imports its own stylesheet, so your bundler needs a CSS loader,
|
|
68
|
+
which a Theia application has.
|
|
69
|
+
|
|
70
|
+
For the whole setup, see *Host in Theia* in
|
|
71
|
+
[Adopting Hydranium](https://github.com/eclipse-emfcloud/hydranium/blob/main/docs/ADOPTING.md).
|
|
107
72
|
|
|
108
73
|
## Entry points
|
|
109
74
|
|
|
110
|
-
| Subpath
|
|
111
|
-
|
|
|
112
|
-
| `.`
|
|
113
|
-
| `./browser`
|
|
114
|
-
| `./node`
|
|
115
|
-
| `./
|
|
75
|
+
| Subpath | Use it for | Runs in |
|
|
76
|
+
| ----------------------------- | ---------------------------------------------------- | --------------- |
|
|
77
|
+
| `.` | The same as `./browser` | Theia frontend |
|
|
78
|
+
| `./browser` | The frontend module, configuration and manager bases | Theia frontend |
|
|
79
|
+
| `./node` | The connection handler and its backend module | Theia backend |
|
|
80
|
+
| `./style/diagram-loading.css` | The loading overlay's stylesheet, imported for you | browser |
|
|
116
81
|
|
|
117
|
-
|
|
118
|
-
`
|
|
119
|
-
|
|
120
|
-
transitive ones included; `./node` is deliberately outside that gate. Also
|
|
121
|
-
worth reading: [what "gated neutral" does and does not promise](../../docs/concepts/browser-hosting.md#a-note-on-what-gated-neutral-does-and-does-not-promise).
|
|
82
|
+
The subpaths need a TypeScript `moduleResolution` that reads `exports`
|
|
83
|
+
(`NodeNext` or `Bundler`); see *Requirements* in
|
|
84
|
+
[Adopting Hydranium](https://github.com/eclipse-emfcloud/hydranium/blob/main/docs/ADOPTING.md).
|
|
122
85
|
|
|
123
86
|
## Status
|
|
124
87
|
|
|
125
|
-
Alpha
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
[repository README](../../README.md) for current status and known limitations.
|
|
88
|
+
Alpha: every release is a prerelease that may break the API, so pin an exact
|
|
89
|
+
version. Guides and known limitations:
|
|
90
|
+
[Adopting Hydranium](https://github.com/eclipse-emfcloud/hydranium/blob/main/docs/ADOPTING.md).
|
|
129
91
|
|
|
130
92
|
## License
|
|
131
93
|
|
|
132
|
-
`MIT` — see this package's [`LICENSE`](./LICENSE)
|
|
133
|
-
|
|
134
|
-
|
|
94
|
+
`MIT` — see this package's [`LICENSE`](./LICENSE), and the repository
|
|
95
|
+
[`NOTICE.md`](https://github.com/eclipse-emfcloud/hydranium/blob/main/NOTICE.md)
|
|
96
|
+
for third-party notices.
|
|
@@ -6,48 +6,110 @@
|
|
|
6
6
|
*
|
|
7
7
|
* SPDX-License-Identifier: MIT
|
|
8
8
|
********************************************************************************/
|
|
9
|
-
import { type GLSPClient } from '@eclipse-glsp/client';
|
|
9
|
+
import { type GLSPClient, type InitializeResult } from '@eclipse-glsp/client';
|
|
10
10
|
import { BaseGLSPClientContribution } from '@eclipse-glsp/theia-integration';
|
|
11
|
-
import {
|
|
11
|
+
import { ChannelLogger, ConnectionReporter, type ConnectionTarget } from '@hydranium/client-theia/browser';
|
|
12
|
+
import { Clock } from '@hydranium/client-theia/common';
|
|
13
|
+
import { type Stopwatch } from '@hydranium/protocol';
|
|
14
|
+
import { type Channel, Emitter, Event } from '@theia/core';
|
|
15
|
+
import { Deferred } from '@theia/core/lib/common/promise-util';
|
|
12
16
|
import { WorkspaceService } from '@theia/workspace/lib/browser';
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
* "the GLSP server is accepting client connections". */
|
|
17
|
+
import 'vscode-jsonrpc/browser';
|
|
18
|
+
export declare const DEFAULT_GLSP_CLIENT_STARTUP_TIMEOUT_MS = 30000;
|
|
19
|
+
/** Options for `HydraniumGlspClientContribution`. */
|
|
17
20
|
export interface ClientContributionOptions {
|
|
18
21
|
readonly languageContributionId: string;
|
|
19
|
-
|
|
20
|
-
|
|
22
|
+
/** How long a start may take, from the workspace opening to the server
|
|
23
|
+
* answering `initializeServer`, before it fails; `0` or less waits for good. */
|
|
24
|
+
readonly startupTimeoutMs?: number;
|
|
21
25
|
}
|
|
22
26
|
/**
|
|
23
27
|
* Theia GLSP client contribution for adopters whose GLSP server runs in a
|
|
24
28
|
* sideloaded VS Code extension process (or any other deferred-start setup).
|
|
25
|
-
* The behaviours adopters reliably need are lifted:
|
|
26
29
|
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
* "connecting" progress spinner) from firing prematurely.
|
|
30
|
+
* The client starts once a workspace is open and sends its first request at
|
|
31
|
+
* once; the backend handler holds it until its socket to the server is up. A
|
|
32
|
+
* start that fails, and a connection lost after one succeeded, start a fresh
|
|
33
|
+
* client after a backoff, for as long as the contribution lives. Each start is
|
|
34
|
+
* reported through the {@link ConnectionReporter}, and announced through
|
|
35
|
+
* {@link onDidStartClient} and {@link onDidLoseClient}.
|
|
34
36
|
*
|
|
35
37
|
* A `GLSPClient` override filtering inbound messages by clientId is
|
|
36
38
|
* deliberately NOT provided: upstream's `BaseJsonrpcGLSPClient.onActionMessage`
|
|
37
|
-
* already filters by clientId
|
|
38
|
-
* `BaseGLSPClientContribution.createGLSPClient` is correct as-is.
|
|
39
|
+
* already filters by clientId.
|
|
39
40
|
*/
|
|
40
41
|
export declare class HydraniumGlspClientContribution extends BaseGLSPClientContribution {
|
|
41
|
-
protected outputChannelManager: OutputChannelManager;
|
|
42
42
|
protected readonly workspaceService: WorkspaceService;
|
|
43
|
+
protected readonly connectionReporter: ConnectionReporter;
|
|
44
|
+
protected readonly logger: ChannelLogger;
|
|
45
|
+
/** Times the restart escalation reset: the container's {@link Clock}, or a `SystemClock`. */
|
|
46
|
+
protected readonly clock: Clock;
|
|
43
47
|
readonly id: string;
|
|
44
|
-
|
|
45
|
-
|
|
48
|
+
/** Delay before the restart following each consecutive failed start or lost
|
|
49
|
+
* client; the last repeats. */
|
|
50
|
+
protected readonly restartDelaysMs: readonly number[];
|
|
51
|
+
/** How long a client must stay up before the restart delays start over, so
|
|
52
|
+
* a server that fails right after starting is not restarted at once. */
|
|
53
|
+
protected readonly restartEscalationResetMs: number;
|
|
54
|
+
protected consecutiveFailures: number;
|
|
55
|
+
protected restartTimer?: ReturnType<typeof setTimeout>;
|
|
56
|
+
/** Running since the current client started; cleared once a restart has taken it into account. */
|
|
57
|
+
protected sinceStart?: Stopwatch;
|
|
58
|
+
/** Clients started so far, which numbers them in the log: they share {@link id}. */
|
|
59
|
+
protected startedClients: number;
|
|
60
|
+
/** The attempt waiting for a channel, if any. */
|
|
61
|
+
protected channelRequest?: Deferred<Channel>;
|
|
62
|
+
protected disposed: boolean;
|
|
63
|
+
protected readonly clientStartedEmitter: Emitter<GLSPClient>;
|
|
64
|
+
protected readonly clientLostEmitter: Emitter<void>;
|
|
65
|
+
/** Fires with each client once it has started and its server has answered. */
|
|
66
|
+
readonly onDidStartClient: Event<GLSPClient>;
|
|
67
|
+
/** Fires when the started client stops; {@link glspClient} already waits
|
|
68
|
+
* for its replacement then. */
|
|
69
|
+
readonly onDidLoseClient: Event<void>;
|
|
46
70
|
constructor(options: ClientContributionOptions);
|
|
47
|
-
/**
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
71
|
+
/** The client every diagram load awaits; after a failed start, a fresh one. */
|
|
72
|
+
get glspClient(): Promise<GLSPClient>;
|
|
73
|
+
/** Start a fresh client over a fresh channel at once, if the last start failed. */
|
|
74
|
+
restart(): Promise<GLSPClient>;
|
|
75
|
+
/** Point {@link glspClient} at a fresh client still to start, and tear down
|
|
76
|
+
* the old one's channel. */
|
|
77
|
+
protected replaceClient(): void;
|
|
78
|
+
/** Settles the promise current when it began, so a start a restart overtook
|
|
79
|
+
* cannot settle its successor. */
|
|
80
|
+
protected activateClient(): Promise<void>;
|
|
81
|
+
/** Run `restart` after the delay for the failures so far, and return that delay. */
|
|
82
|
+
protected scheduleRestart(restart: () => void): number;
|
|
83
|
+
/** Once `client` stops, replace it and start its replacement after the
|
|
84
|
+
* restart delay, unless a dispose stopped it. */
|
|
85
|
+
protected restartOnLoss(client: GLSPClient): void;
|
|
86
|
+
/** Start the client and initialize its server, rejecting on failure; the
|
|
87
|
+
* caller settles {@link glspClient}. */
|
|
51
88
|
protected start(glspClient: GLSPClient): Promise<void>;
|
|
89
|
+
/** Without upstream's own error notification, which would duplicate the reporter's. */
|
|
90
|
+
protected initialize(glspClient: GLSPClient): Promise<InitializeResult>;
|
|
91
|
+
/** Upstream's base client, without the notifications of its Theia subclass,
|
|
92
|
+
* which would duplicate the reporter's. */
|
|
93
|
+
protected createGLSPClient(connectionProvider: Parameters<BaseGLSPClientContribution['createGLSPClient']>[0]): Promise<GLSPClient>;
|
|
94
|
+
/**
|
|
95
|
+
* Whichever channel arrives goes to the attempt waiting now, and one that
|
|
96
|
+
* arrives with none waiting is closed. Theia holds each open until its
|
|
97
|
+
* websocket is back, and after an outage every held open past the first
|
|
98
|
+
* throws "already open" without reaching its handler, so the first to arrive
|
|
99
|
+
* has to serve the latest attempt. Without Theia's replay, which would be a
|
|
100
|
+
* second opener of the same path.
|
|
101
|
+
*/
|
|
102
|
+
protected createChannelConnection(): ReturnType<BaseGLSPClientContribution['createChannelConnection']>;
|
|
103
|
+
/** Also closes the channel: upstream leaves a Theia channel open, and the
|
|
104
|
+
* next one on the same path then cannot open. */
|
|
105
|
+
protected disposeChannel(connection: Parameters<BaseGLSPClientContribution['disposeChannel']>[0], channel: Channel): Promise<void>;
|
|
106
|
+
/** Also fails a start in flight, so nothing reports it after this. */
|
|
107
|
+
dispose(): void;
|
|
108
|
+
protected workspaceOpened(): Promise<void>;
|
|
109
|
+
protected get connectionTarget(): ConnectionTarget;
|
|
110
|
+
/** One object per contribution: the reporter keys what it has shown on it. */
|
|
111
|
+
protected cachedConnectionTarget?: ConnectionTarget;
|
|
112
|
+
protected unreachableMessage(): string;
|
|
113
|
+
protected startupTimeoutMessage(): string;
|
|
52
114
|
}
|
|
53
115
|
//# sourceMappingURL=client-contribution.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-contribution.d.ts","sourceRoot":"","sources":["../../src/browser/client-contribution.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,
|
|
1
|
+
{"version":3,"file":"client-contribution.d.ts","sourceRoot":"","sources":["../../src/browser/client-contribution.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAe,KAAK,UAAU,EAAE,KAAK,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC3F,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAE7E,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,KAAK,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAC3G,OAAO,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAEvD,OAAO,EAAmC,KAAK,SAAS,EAAe,MAAM,qBAAqB,CAAC;AACnG,OAAO,EAAE,KAAK,OAAO,EAAc,OAAO,EAAE,KAAK,EAAO,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAE/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAGhE,OAAO,wBAAwB,CAAC;AAEhC,eAAO,MAAM,sCAAsC,QAAS,CAAC;AAE7D,qDAAqD;AACrD,MAAM,WAAW,yBAAyB;IACvC,QAAQ,CAAC,sBAAsB,EAAE,MAAM,CAAC;IACxC;qFACiF;IACjF,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CACrC;AAED;;;;;;;;;;;;;;GAcG;AACH,qBACa,+BAAgC,SAAQ,0BAA0B;IAClD,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAG,gBAAgB,CAAC;IACrD,SAAS,CAAC,QAAQ,CAAC,kBAAkB,EAAG,kBAAkB,CAAC;IAChE,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAG,aAAa,CAAC;IACjE,6FA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