@eclipse-glsp/vscode-integration
Version:
Glue code to integrate GLSP diagrams in VSCode extensions (extension part)
49 lines • 2.41 kB
TypeScript
/********************************************************************************
* Copyright (c) 2023 EclipseSource and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { Deferred, DisposableCollection, GLSPClient, InitializeParameters, InitializeResult, MaybePromise } from '@eclipse-glsp/protocol';
import * as vscode from 'vscode';
import { GlspVscodeServer } from '../types';
export interface GlspVscodeServerOptions {
/** Client ID to register the jsonRPC client with on the server. */
readonly clientId: string;
/** Name to register the client with on the server. */
readonly clientName: string;
}
/**
* Reusable base class for {@link GlspVscodeServer} implementations
*/
export declare abstract class BaseGlspVscodeServer<C extends GLSPClient = GLSPClient> implements GlspVscodeServer, vscode.Disposable {
protected readonly options: GlspVscodeServerOptions;
readonly onSendToServerEmitter: vscode.EventEmitter<unknown>;
protected readonly onServerSendEmitter: vscode.EventEmitter<unknown>;
get onServerMessage(): vscode.Event<unknown>;
protected readyDeferred: Deferred<void>;
protected _initializeResult: InitializeResult;
protected _glspClient: C;
protected toDispose: DisposableCollection;
constructor(options: GlspVscodeServerOptions);
/**
* Creates and configues the {@link GLSPClient} instance.
*/
abstract createGLSPClient(): MaybePromise<C>;
start(): Promise<void>;
protected createInitializeParameters(): Promise<InitializeParameters>;
get onReady(): Promise<void>;
get initializeResult(): Promise<InitializeResult>;
get glspClient(): Promise<GLSPClient>;
dispose(): void;
}
//# sourceMappingURL=base-glsp-vscode-server.d.ts.map