UNPKG

3.16 kBJavaScriptView Raw
1"use strict";
2// *****************************************************************************
3// Copyright (C) 2019 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-only WITH Classpath-exception-2.0
16// *****************************************************************************
17Object.defineProperty(exports, "__esModule", { value: true });
18exports.DefaultFileIconThemeContribution = exports.IconThemeApplicationContribution = exports.IconThemeContribution = void 0;
19const tslib_1 = require("tslib");
20const inversify_1 = require("inversify");
21const contribution_provider_1 = require("../common/contribution-provider");
22const icon_theme_service_1 = require("./icon-theme-service");
23const disposable_1 = require("../common/disposable");
24exports.IconThemeContribution = Symbol('IconThemeContribution');
25let IconThemeApplicationContribution = class IconThemeApplicationContribution {
26 async onStart() {
27 for (const contribution of this.iconThemeContributions.getContributions()) {
28 await contribution.registerIconThemes(this.iconThemes);
29 }
30 }
31};
32(0, tslib_1.__decorate)([
33 (0, inversify_1.inject)(icon_theme_service_1.IconThemeService),
34 (0, tslib_1.__metadata)("design:type", icon_theme_service_1.IconThemeService)
35], IconThemeApplicationContribution.prototype, "iconThemes", void 0);
36(0, tslib_1.__decorate)([
37 (0, inversify_1.inject)(contribution_provider_1.ContributionProvider),
38 (0, inversify_1.named)(exports.IconThemeContribution),
39 (0, tslib_1.__metadata)("design:type", Object)
40], IconThemeApplicationContribution.prototype, "iconThemeContributions", void 0);
41IconThemeApplicationContribution = (0, tslib_1.__decorate)([
42 (0, inversify_1.injectable)()
43], IconThemeApplicationContribution);
44exports.IconThemeApplicationContribution = IconThemeApplicationContribution;
45let DefaultFileIconThemeContribution = class DefaultFileIconThemeContribution {
46 constructor() {
47 this.id = 'theia-file-icons';
48 this.label = 'File Icons (Theia)';
49 this.hasFileIcons = true;
50 this.hasFolderIcons = true;
51 this.showLanguageModeIcons = true;
52 }
53 registerIconThemes(iconThemes) {
54 iconThemes.register(this);
55 }
56 /* rely on behaviour before for backward-compatibility */
57 activate() {
58 return disposable_1.Disposable.NULL;
59 }
60};
61DefaultFileIconThemeContribution = (0, tslib_1.__decorate)([
62 (0, inversify_1.injectable)()
63], DefaultFileIconThemeContribution);
64exports.DefaultFileIconThemeContribution = DefaultFileIconThemeContribution;
65//# sourceMappingURL=icon-theme-contribution.js.map
\No newline at end of file