sprotty
Version:
A next-gen framework for graphical views
52 lines • 2.53 kB
TypeScript
/********************************************************************************
* Copyright (c) 2018 TypeFox 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 } from "sprotty-protocol/lib/actions";
import { Point } from "sprotty-protocol/lib/utils/geometry";
import { Command, CommandExecutionContext, CommandReturn } from "../../base/commands/command";
import { SModelElementImpl, SModelRootImpl } from '../../base/model/smodel';
import { SRoutableElementImpl, SRoutingHandleImpl } from "../routing/model";
import { EdgeRouterRegistry } from "../routing/routing";
export interface SwitchEditModeAction extends Action {
kind: typeof SwitchEditModeAction.KIND;
elementsToActivate: string[];
elementsToDeactivate: string[];
}
export declare namespace SwitchEditModeAction {
const KIND = "switchEditMode";
function create(options: {
elementsToActivate?: string[];
elementsToDeactivate?: string[];
}): SwitchEditModeAction;
}
export declare class SwitchEditModeCommand extends Command {
protected readonly action: SwitchEditModeAction;
static readonly KIND: string;
edgeRouterRegistry: EdgeRouterRegistry;
protected elementsToActivate: SModelElementImpl[];
protected elementsToDeactivate: SModelElementImpl[];
protected handlesToRemove: {
handle: SRoutingHandleImpl;
parent: SRoutableElementImpl;
point?: Point;
}[];
constructor(action: SwitchEditModeAction);
execute(context: CommandExecutionContext): CommandReturn;
protected doExecute(context: CommandExecutionContext): SModelRootImpl;
protected shouldRemoveHandle(handle: SRoutingHandleImpl, parent: SRoutableElementImpl): boolean;
undo(context: CommandExecutionContext): CommandReturn;
redo(context: CommandExecutionContext): CommandReturn;
}
//# sourceMappingURL=edit-routing.d.ts.map