UNPKG

@eclipse-glsp/client

Version:

A sprotty-based client for GLSP

66 lines 3.95 kB
/******************************************************************************** * 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 { Action, AnchorComputerRegistry, Connectable, EdgeRouterRegistry, GModelElement, GModelRoot, GRoutableElement, GRoutingHandle } from '@eclipse-glsp/sprotty'; import { DragAwareMouseListener } from '../../../base/drag-aware-mouse-listener'; import { FeedbackEmitter } from '../../../base/feedback/feedback-emitter'; import { ISelectionListener, SelectionService } from '../../../base/selection-service'; import { GReconnectHandle } from '../../reconnect/model'; import { BaseEditTool } from '../base-tools'; import { IChangeBoundsManager } from '../change-bounds/change-bounds-manager'; import { FeedbackEdgeRouteMovingMouseListener, FeedbackEdgeSourceMovingMouseListener, FeedbackEdgeTargetMovingMouseListener } from './edge-edit-tool-feedback'; export declare class EdgeEditTool extends BaseEditTool { static ID: string; protected selectionService: SelectionService; protected anchorRegistry: AnchorComputerRegistry; readonly edgeRouterRegistry?: EdgeRouterRegistry; readonly changeBoundsManager: IChangeBoundsManager; protected feedbackEdgeSourceMovingListener: FeedbackEdgeSourceMovingMouseListener; protected feedbackEdgeTargetMovingListener: FeedbackEdgeTargetMovingMouseListener; protected feedbackMovingListener: FeedbackEdgeRouteMovingMouseListener; protected edgeEditListener: EdgeEditListener; get id(): string; enable(): void; registerFeedbackListeners(): void; deregisterFeedbackListeners(): void; } export declare class EdgeEditListener extends DragAwareMouseListener implements ISelectionListener { protected tool: EdgeEditTool; protected edge?: GRoutableElement; protected routingHandle?: GRoutingHandle; protected newConnectable?: GModelElement & Connectable; protected reconnectMode?: 'NEW_SOURCE' | 'NEW_TARGET'; protected cursorFeedback: FeedbackEmitter; protected editFeedback: FeedbackEmitter; constructor(tool: EdgeEditTool); protected isValidEdge(edge?: GRoutableElement): edge is GRoutableElement; protected setEdgeSelected(edge: GRoutableElement): void; protected isEdgeSelected(): boolean; protected setReconnectHandleSelected(edge: GRoutableElement, reconnectHandle: GReconnectHandle): void; protected isReconnecting(): boolean; protected isReconnectingNewSource(): boolean; protected setRoutingHandleSelected(edge: GRoutableElement, routingHandle: GRoutingHandle): void; protected requiresReconnect(sourceId: string, targetId: string): boolean; protected setNewConnectable(connectable?: GModelElement & Connectable): void; protected isReadyToReconnect(): boolean | undefined; protected isReadyToReroute(): boolean; mouseDown(target: GModelElement, event: MouseEvent): Action[]; protected draggingMouseMove(target: GModelElement, event: MouseEvent): Action[]; mouseUp(target: GModelElement, event: MouseEvent): Action[]; mouseOver(target: GModelElement, _event: MouseEvent): Action[]; selectionChanged(root: Readonly<GModelRoot>, selectedElements: string[]): void; dispose(): void; } //# sourceMappingURL=edge-edit-tool.d.ts.map