UNPKG

sprotty-theia

Version:

Glue code for Sprotty diagrams in a Theia IDE

38 lines 2.36 kB
"use strict"; /******************************************************************************** * 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 ********************************************************************************/ Object.defineProperty(exports, "__esModule", { value: true }); const inversify_1 = require("inversify"); const common_1 = require("@theia/core/lib/common"); const browser_1 = require("@theia/core/lib/browser"); const theia_file_saver_1 = require("../sprotty/theia-file-saver"); const diagram_configuration_1 = require("./diagram-configuration"); const diagram_commands_1 = require("./diagram-commands"); const diagram_keybinding_1 = require("./diagram-keybinding"); const diagram_widget_1 = require("./diagram-widget"); exports.default = new inversify_1.ContainerModule(bind => { bind(diagram_configuration_1.DiagramConfigurationRegistry).toSelf().inSingletonScope(); bind(theia_file_saver_1.TheiaFileSaver).toSelf().inSingletonScope(); bind(common_1.CommandContribution).to(diagram_commands_1.DiagramCommandContribution).inSingletonScope(); bind(common_1.MenuContribution).to(diagram_commands_1.DiagramMenuContribution).inSingletonScope(); bind(diagram_keybinding_1.DiagramKeybindingContext).toSelf().inSingletonScope(); bind(browser_1.KeybindingContext).toService(diagram_keybinding_1.DiagramKeybindingContext); bind(browser_1.KeybindingContribution).to(diagram_keybinding_1.DiagramKeybindingContribution).inSingletonScope(); bind(diagram_widget_1.DiagramWidgetFactory).toFactory(ctx => { return (options, widgetId, diContainer, connector) => new diagram_widget_1.DiagramWidget(options, widgetId, diContainer, connector); }); }); //# sourceMappingURL=diagram-module.js.map