UNPKG

2.62 kBJavaScriptView Raw
1"use strict";
2// *****************************************************************************
3// Copyright (C) 2017 TypeFox and others.
4//
5// This program and the accompanying materials are made available under the
6// terms of the Eclipse Public License v. 2.0 which is available at
7// http://www.eclipse.org/legal/epl-2.0.
8//
9// This Source Code may also be made available under the following Secondary
10// Licenses when the conditions for such availability set forth in the Eclipse
11// Public License v. 2.0 are satisfied: GNU General Public License, version 2
12// with the GNU Classpath Exception which is available at
13// https://www.gnu.org/software/classpath/license.html.
14//
15// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16// *****************************************************************************
17Object.defineProperty(exports, "__esModule", { value: true });
18const inversify_1 = require("inversify");
19const common_1 = require("../../common");
20const browser_1 = require("../../browser");
21const electron_main_menu_factory_1 = require("./electron-main-menu-factory");
22const electron_context_menu_renderer_1 = require("./electron-context-menu-renderer");
23const electron_menu_contribution_1 = require("./electron-menu-contribution");
24exports.default = new inversify_1.ContainerModule(bind => {
25 bind(electron_main_menu_factory_1.ElectronMainMenuFactory).toSelf().inSingletonScope();
26 bind(browser_1.ContextMenuRenderer).to(electron_context_menu_renderer_1.ElectronContextMenuRenderer).inSingletonScope();
27 bind(browser_1.KeybindingContext).toConstantValue({
28 id: 'theia.context',
29 isEnabled: true
30 });
31 bind(electron_menu_contribution_1.ElectronMenuContribution).toSelf().inSingletonScope();
32 for (const serviceIdentifier of [browser_1.FrontendApplicationContribution, browser_1.KeybindingContribution, common_1.CommandContribution, common_1.MenuContribution]) {
33 bind(serviceIdentifier).toService(electron_menu_contribution_1.ElectronMenuContribution);
34 }
35 bind(electron_menu_contribution_1.CustomTitleWidget).toSelf().inSingletonScope();
36 bind(electron_menu_contribution_1.CustomTitleWidgetFactory).toFactory(context => () => context.container.get(electron_menu_contribution_1.CustomTitleWidget));
37 bind(browser_1.FrontendApplicationContribution).to(electron_context_menu_renderer_1.ElectronTextInputContextMenuContribution).inSingletonScope();
38 bind(common_1.MenuContribution).to(electron_context_menu_renderer_1.ElectronTextInputContextMenuContribution).inSingletonScope();
39});
40//# sourceMappingURL=electron-menu-module.js.map
\No newline at end of file