UNPKG

@eclipse-glsp/client

Version:

A sprotty-based client for GLSP

54 lines 2.83 kB
/******************************************************************************** * Copyright (c) 2019-2025 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, CommandExecutionData, CommandStack, Disposable, DisposableCollection, Emitter, Event, GModelRoot, ICommand, ICommandStack, LazyInjector } from '@eclipse-glsp/sprotty'; import { EditorContextService } from './editor-context-service'; export declare class GLSPCommandStack extends CommandStack implements ICommandStack, Disposable { protected lazyInjector: LazyInjector; protected toDispose: DisposableCollection; protected onCommandExecutedEmitter: Emitter<CommandExecutionData>; get onCommandExecuted(): Event<CommandExecutionData>; protected initialize(): void; 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>; } //# sourceMappingURL=command-stack.d.ts.map