UNPKG

sprotty-theia

Version:

Glue code for Sprotty diagrams in a Theia IDE

61 lines 2.95 kB
/******************************************************************************** * Copyright (c) 2017-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 { DiagramWidget } from './diagram-widget'; import { MenuContribution, MenuModelRegistry, CommandContribution, CommandHandler, CommandRegistry, MenuPath } from '@theia/core/lib/common'; import { ApplicationShell, OpenerService, Widget } from '@theia/core/lib/browser'; import { EditorManager } from "@theia/editor/lib/browser"; export declare namespace DiagramCommands { const CENTER = "diagram:center"; const FIT = "diagram:fit"; const EXPORT = "diagram:export"; const SELECT_ALL = "diagram.selectAll"; const OPEN_IN_DIAGRAM = "diagram.open"; const DELETE = "diagram.delete"; const LAYOUT = "diagram.layout"; } export declare namespace DiagramMenus { const DIAGRAM: MenuPath; const EDITOR_CONTEXT_DIAGRAM: MenuPath; } export declare class DiagramMenuContribution implements MenuContribution { registerMenus(registry: MenuModelRegistry): void; } export declare class DiagramCommandHandler implements CommandHandler { protected readonly shell: ApplicationShell; protected readonly doExecute: (diagram: DiagramWidget) => any; constructor(shell: ApplicationShell, doExecute: (diagram: DiagramWidget) => any); execute(...args: any[]): any; isEnabled(): boolean; get diagramWidget(): DiagramWidget | undefined; } export interface DiagramWidgetContainer { diagramWidget: DiagramWidget; } export declare function isDiagramWidgetContainer(widget?: Widget): widget is Widget & DiagramWidgetContainer; export declare class OpenInDiagramHandler implements CommandHandler { protected readonly editorManager: EditorManager; protected readonly openerService: OpenerService; constructor(editorManager: EditorManager, openerService: OpenerService); execute(...args: any[]): void; isEnabled(): boolean; } export declare class DiagramCommandContribution implements CommandContribution { protected readonly shell: ApplicationShell; protected readonly editorManager: EditorManager; protected readonly openerService: OpenerService; registerCommands(registry: CommandRegistry): void; } //# sourceMappingURL=diagram-commands.d.ts.map