UNPKG

@theia/variable-resolver

Version:

Theia - Variable Resolver Extension

54 lines 2.96 kB
"use strict"; // ***************************************************************************** // Copyright (C) 2018 Red Hat, Inc. 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-only WITH Classpath-exception-2.0 // ***************************************************************************** Object.defineProperty(exports, "__esModule", { value: true }); exports.VariableResolverFrontendContribution = exports.LIST_VARIABLES = void 0; const tslib_1 = require("tslib"); const inversify_1 = require("@theia/core/shared/inversify"); const common_1 = require("@theia/core/lib/common"); const variable_1 = require("./variable"); const variable_quick_open_service_1 = require("./variable-quick-open-service"); exports.LIST_VARIABLES = common_1.Command.toLocalizedCommand({ id: 'variable.list', label: 'Variable: List All' }, 'theia/variableResolver/listAllVariables'); let VariableResolverFrontendContribution = class VariableResolverFrontendContribution { constructor(contributionProvider, variableRegistry, variableQuickOpenService) { this.contributionProvider = contributionProvider; this.variableRegistry = variableRegistry; this.variableQuickOpenService = variableQuickOpenService; } onStart() { this.contributionProvider.getContributions().forEach(contrib => contrib.registerVariables(this.variableRegistry)); } registerCommands(commands) { commands.registerCommand(exports.LIST_VARIABLES, { isEnabled: () => true, execute: () => this.variableQuickOpenService.open() }); } }; exports.VariableResolverFrontendContribution = VariableResolverFrontendContribution; exports.VariableResolverFrontendContribution = VariableResolverFrontendContribution = tslib_1.__decorate([ (0, inversify_1.injectable)(), tslib_1.__param(0, (0, inversify_1.inject)(common_1.ContributionProvider)), tslib_1.__param(0, (0, inversify_1.named)(variable_1.VariableContribution)), tslib_1.__param(1, (0, inversify_1.inject)(variable_1.VariableRegistry)), tslib_1.__param(2, (0, inversify_1.inject)(variable_quick_open_service_1.VariableQuickOpenService)), tslib_1.__metadata("design:paramtypes", [Object, variable_1.VariableRegistry, variable_quick_open_service_1.VariableQuickOpenService]) ], VariableResolverFrontendContribution); //# sourceMappingURL=variable-resolver-frontend-contribution.js.map