@eclipse-glsp/client
Version:
A sprotty-based client for GLSP
52 lines • 2.67 kB
TypeScript
/********************************************************************************
* Copyright (c) 2019-2024 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 { CommandExecutionContext, CommandStack, Disposable, DisposableCollection, Event, GModelRoot, ICommand, LazyInjector } from '@eclipse-glsp/sprotty';
import { EditorContextService } from './editor-context-service';
export declare class GLSPCommandStack extends CommandStack implements Disposable {
protected lazyInjector: LazyInjector;
protected toDispose: DisposableCollection;
dispose(): void;
get editorContext(): EditorContextService;
/**
* @deprecated Use the `EditorContext.onModelRootChanged` event instead
*/
get onModelRootChanged(): Event<Readonly<GModelRoot>>;
/**
* Client-side undo/redo is not supported in GLSP. The server is responsible for handling undo/redo requests.
* If this method get called it's probably a mistake and a warning is logged
*/
undo(): Promise<GModelRoot>;
/**
* Client-side undo/redo is not supported in GLSP. The server is responsible for handling undo/redo requests.
* If this method get called it's probably a mistake and a warning is logged
*/
redo(): Promise<GModelRoot>;
/**
* Client-side undo/redo is not supported in GLSP.
* To avoid unnecessary infraction with the command stack (pushing/merging/popping commands)
* related methods are overridden to no-ops.
*/
protected pushToUndoStack(command: ICommand): void;
/**
* Client-side undo/redo is not supported in GLSP.
* To avoid unnecessary infraction with the command stack (pushing/merging/popping commands)
* related methods are overridden to no-ops.
*/
protected mergeOrPush(command: ICommand, context: CommandExecutionContext): void;
execute(command: ICommand): Promise<GModelRoot>;
protected notifyListeners(root: Readonly<GModelRoot>): void;
}
//# sourceMappingURL=command-stack.d.ts.map