@eclipse-glsp/client
Version:
A sprotty-based client for GLSP
62 lines • 3.5 kB
TypeScript
/********************************************************************************
* Copyright (c) 2023-2025 Business Informatics Group (TU Wien) 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 { Action, GModelElement, GModelRoot, KeyListener, Selectable } from '@eclipse-glsp/sprotty';
import type { IShortcutManager } from '../../../base/shortcuts/shortcuts-manager';
import { SelectableBoundsAware } from '../../../utils/gmodel-util';
import { BaseTool } from '../../tools/base-tools';
import { ElementNavigator } from './element-navigator';
export declare class ElementNavigatorTool extends BaseTool {
static ID: string;
static TOKEN: symbol;
get id(): string;
protected readonly shortcutManager: IShortcutManager;
readonly elementNavigator: ElementNavigator;
readonly localElementNavigator: ElementNavigator;
protected elementNavigatorKeyListener: ElementNavigatorKeyListener;
enable(): void;
}
declare enum NavigationMode {
POSITION = "position",
DEFAULT = "default",
NONE = "none"
}
export declare class ElementNavigatorKeyListener extends KeyListener {
protected readonly tool: ElementNavigatorTool;
protected mode: NavigationMode;
protected previousNode?: SelectableBoundsAware;
protected navigator?: ElementNavigator;
protected readonly token: string;
constructor(tool: ElementNavigatorTool);
keyDown(element: GModelElement, event: KeyboardEvent): Action[];
protected resetOnEscape(event: KeyboardEvent, element: GModelElement): void;
protected triggerPositionNavigationOnEvent(event: KeyboardEvent, element: GModelElement): boolean;
protected resetPositionNavigationOnEvent(event: KeyboardEvent, element: GModelElement): void;
protected triggerDefaultNavigationOnEvent(event: KeyboardEvent, element: GModelElement): boolean;
protected resetDefaultNavigationOnEvent(event: KeyboardEvent, element: GModelElement): void;
protected navigate(element: GModelElement, event: KeyboardEvent): Action[];
protected navigateOnEvent(event: KeyboardEvent, navigator: ElementNavigator, current: SelectableBoundsAware): GModelElement | undefined;
protected clean(): void;
protected getSelectedElements(root: GModelRoot): (GModelElement & Selectable)[];
protected matchesDeactivateNavigationMode(event: KeyboardEvent): boolean;
protected matchesActivateDefaultNavigation(event: KeyboardEvent): boolean;
protected matchesActivatePositionNavigation(event: KeyboardEvent): boolean;
protected matchesNavigatePrevious(event: KeyboardEvent): boolean;
protected matchesNavigateNext(event: KeyboardEvent): boolean;
protected matchesNavigateUp(event: KeyboardEvent): boolean;
protected matchesNavigateDown(event: KeyboardEvent): boolean;
}
export {};
//# sourceMappingURL=diagram-navigation-tool.d.ts.map