@theia/getting-started 1.45.0 → 1.46.0-next.72

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,37 +1,37 @@
1
- <div align='center'>
2
-
3
- <br />
4
-
5
- <img src='https://raw.githubusercontent.com/eclipse-theia/theia/master/logo/theia.svg?sanitize=true' alt='theia-ext-logo' width='100px' />
6
-
7
- <h2>ECLIPSE THEIA - GETTING-STARTED EXTENSION</h2>
8
-
9
- <hr />
10
-
11
- </div>
12
-
13
- ## Description
14
-
15
- The `@theia/getting-started` extension contributes a default `getting-started` widget which is displayed whenever
16
- opening the application without any workspace present or if the widget is explicitly opened (through the menu or command).
17
-
18
- The `getting-started` widget provides useful commands and functionality for quickly getting up to speed with the application. For example:
19
- - `open commands`: commands which are used to open files, folders, and workspaces quickly.
20
- - `recent workspaces`: recently used workspaces are listed for easy and quick access.
21
- - `settings commands`: commands which are used to open the preferences and keyboard shortcuts widgets.
22
- - `help`: useful links pointing to documentation and/or guides.
23
-
24
- ## Additional Information
25
-
26
- - [API documentation for `@theia/getting-started`](https://eclipse-theia.github.io/theia/docs/next/modules/getting_started.html)
27
- - [Theia - GitHub](https://github.com/eclipse-theia/theia)
28
- - [Theia - Website](https://theia-ide.org/)
29
-
30
- ## License
31
-
32
- - [Eclipse Public License 2.0](http://www.eclipse.org/legal/epl-2.0/)
33
- - [一 (Secondary) GNU General Public License, version 2 with the GNU Classpath Exception](https://projects.eclipse.org/license/secondary-gpl-2.0-cp)
34
-
35
- ## Trademark
36
- "Theia" is a trademark of the Eclipse Foundation
37
- https://www.eclipse.org/theia
1
+ <div align='center'>
2
+
3
+ <br />
4
+
5
+ <img src='https://raw.githubusercontent.com/eclipse-theia/theia/master/logo/theia.svg?sanitize=true' alt='theia-ext-logo' width='100px' />
6
+
7
+ <h2>ECLIPSE THEIA - GETTING-STARTED EXTENSION</h2>
8
+
9
+ <hr />
10
+
11
+ </div>
12
+
13
+ ## Description
14
+
15
+ The `@theia/getting-started` extension contributes a default `getting-started` widget which is displayed whenever
16
+ opening the application without any workspace present or if the widget is explicitly opened (through the menu or command).
17
+
18
+ The `getting-started` widget provides useful commands and functionality for quickly getting up to speed with the application. For example:
19
+ - `open commands`: commands which are used to open files, folders, and workspaces quickly.
20
+ - `recent workspaces`: recently used workspaces are listed for easy and quick access.
21
+ - `settings commands`: commands which are used to open the preferences and keyboard shortcuts widgets.
22
+ - `help`: useful links pointing to documentation and/or guides.
23
+
24
+ ## Additional Information
25
+
26
+ - [API documentation for `@theia/getting-started`](https://eclipse-theia.github.io/theia/docs/next/modules/getting_started.html)
27
+ - [Theia - GitHub](https://github.com/eclipse-theia/theia)
28
+ - [Theia - Website](https://theia-ide.org/)
29
+
30
+ ## License
31
+
32
+ - [Eclipse Public License 2.0](http://www.eclipse.org/legal/epl-2.0/)
33
+ - [一 (Secondary) GNU General Public License, version 2 with the GNU Classpath Exception](https://projects.eclipse.org/license/secondary-gpl-2.0-cp)
34
+
35
+ ## Trademark
36
+ "Theia" is a trademark of the Eclipse Foundation
37
+ https://www.eclipse.org/theia
@@ -1,30 +1,30 @@
1
- import { CommandRegistry, MenuModelRegistry } from '@theia/core/lib/common';
2
- import { AbstractViewContribution, FrontendApplicationContribution, FrontendApplication, PreferenceService } from '@theia/core/lib/browser';
3
- import { EditorManager } from '@theia/editor/lib/browser/editor-manager';
4
- import { GettingStartedWidget } from './getting-started-widget';
5
- import { FileService } from '@theia/filesystem/lib/browser/file-service';
6
- import { FrontendApplicationStateService } from '@theia/core/lib/browser/frontend-application-state';
7
- import { PreviewContribution } from '@theia/preview/lib/browser/preview-contribution';
8
- import { WorkspaceService } from '@theia/workspace/lib/browser';
9
- /**
10
- * Triggers opening the `GettingStartedWidget`.
11
- */
12
- export declare const GettingStartedCommand: {
13
- id: string;
14
- label: string;
15
- };
16
- export declare class GettingStartedContribution extends AbstractViewContribution<GettingStartedWidget> implements FrontendApplicationContribution {
17
- protected readonly commandRegistry: CommandRegistry;
18
- protected readonly editorManager: EditorManager;
19
- protected readonly fileService: FileService;
20
- protected readonly preferenceService: PreferenceService;
21
- protected readonly previewContribution: PreviewContribution;
22
- protected readonly stateService: FrontendApplicationStateService;
23
- protected readonly workspaceService: WorkspaceService;
24
- constructor();
25
- onStart(app: FrontendApplication): Promise<void>;
26
- protected openReadme(): Promise<void>;
27
- registerCommands(registry: CommandRegistry): void;
28
- registerMenus(menus: MenuModelRegistry): void;
29
- }
1
+ import { CommandRegistry, MenuModelRegistry } from '@theia/core/lib/common';
2
+ import { AbstractViewContribution, FrontendApplicationContribution, FrontendApplication, PreferenceService } from '@theia/core/lib/browser';
3
+ import { EditorManager } from '@theia/editor/lib/browser/editor-manager';
4
+ import { GettingStartedWidget } from './getting-started-widget';
5
+ import { FileService } from '@theia/filesystem/lib/browser/file-service';
6
+ import { FrontendApplicationStateService } from '@theia/core/lib/browser/frontend-application-state';
7
+ import { PreviewContribution } from '@theia/preview/lib/browser/preview-contribution';
8
+ import { WorkspaceService } from '@theia/workspace/lib/browser';
9
+ /**
10
+ * Triggers opening the `GettingStartedWidget`.
11
+ */
12
+ export declare const GettingStartedCommand: {
13
+ id: string;
14
+ label: string;
15
+ };
16
+ export declare class GettingStartedContribution extends AbstractViewContribution<GettingStartedWidget> implements FrontendApplicationContribution {
17
+ protected readonly commandRegistry: CommandRegistry;
18
+ protected readonly editorManager: EditorManager;
19
+ protected readonly fileService: FileService;
20
+ protected readonly preferenceService: PreferenceService;
21
+ protected readonly previewContribution: PreviewContribution;
22
+ protected readonly stateService: FrontendApplicationStateService;
23
+ protected readonly workspaceService: WorkspaceService;
24
+ constructor();
25
+ onStart(app: FrontendApplication): Promise<void>;
26
+ protected openReadme(): Promise<void>;
27
+ registerCommands(registry: CommandRegistry): void;
28
+ registerMenus(menus: MenuModelRegistry): void;
29
+ }
30
30
  //# sourceMappingURL=getting-started-contribution.d.ts.map
@@ -1,144 +1,144 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2018 Ericsson 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
- // *****************************************************************************
17
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
- return c > 3 && r && Object.defineProperty(target, key, r), r;
22
- };
23
- var __metadata = (this && this.__metadata) || function (k, v) {
24
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
25
- };
26
- Object.defineProperty(exports, "__esModule", { value: true });
27
- exports.GettingStartedContribution = exports.GettingStartedCommand = void 0;
28
- const inversify_1 = require("@theia/core/shared/inversify");
29
- const common_1 = require("@theia/core/lib/common");
30
- const browser_1 = require("@theia/core/lib/browser");
31
- const editor_manager_1 = require("@theia/editor/lib/browser/editor-manager");
32
- const getting_started_widget_1 = require("./getting-started-widget");
33
- const file_service_1 = require("@theia/filesystem/lib/browser/file-service");
34
- const frontend_application_state_1 = require("@theia/core/lib/browser/frontend-application-state");
35
- const preview_contribution_1 = require("@theia/preview/lib/browser/preview-contribution");
36
- const browser_2 = require("@theia/workspace/lib/browser");
37
- /**
38
- * Triggers opening the `GettingStartedWidget`.
39
- */
40
- exports.GettingStartedCommand = {
41
- id: getting_started_widget_1.GettingStartedWidget.ID,
42
- label: getting_started_widget_1.GettingStartedWidget.LABEL
43
- };
44
- let GettingStartedContribution = class GettingStartedContribution extends browser_1.AbstractViewContribution {
45
- constructor() {
46
- super({
47
- widgetId: getting_started_widget_1.GettingStartedWidget.ID,
48
- widgetName: getting_started_widget_1.GettingStartedWidget.LABEL,
49
- defaultWidgetOptions: {
50
- area: 'main',
51
- }
52
- });
53
- }
54
- async onStart(app) {
55
- this.stateService.reachedState('ready').then(async () => {
56
- if (this.editorManager.all.length === 0) {
57
- await this.preferenceService.ready;
58
- const startupEditor = this.preferenceService.get('workbench.startupEditor');
59
- switch (startupEditor) {
60
- case 'welcomePage':
61
- this.openView({ reveal: true, activate: true });
62
- break;
63
- case 'welcomePageInEmptyWorkbench':
64
- if (!this.workspaceService.opened) {
65
- this.openView({ reveal: true, activate: true });
66
- }
67
- break;
68
- case 'newUntitledFile':
69
- this.commandRegistry.executeCommand(browser_1.CommonCommands.NEW_UNTITLED_TEXT_FILE.id);
70
- break;
71
- case 'readme':
72
- await this.openReadme();
73
- break;
74
- }
75
- }
76
- });
77
- }
78
- async openReadme() {
79
- const roots = await this.workspaceService.roots;
80
- const readmes = await Promise.all(roots.map(async (folder) => {
81
- var _a;
82
- const folderStat = await this.fileService.resolve(folder.resource);
83
- const fileArr = ((_a = folderStat === null || folderStat === void 0 ? void 0 : folderStat.children) === null || _a === void 0 ? void 0 : _a.sort((a, b) => a.name.localeCompare(b.name))) || [];
84
- const filePath = fileArr.find(file => file.name.toLowerCase() === 'readme.md') || fileArr.find(file => file.name.toLowerCase().startsWith('readme'));
85
- return filePath === null || filePath === void 0 ? void 0 : filePath.resource;
86
- }));
87
- const validReadmes = common_1.ArrayUtils.coalesce(readmes);
88
- if (validReadmes.length) {
89
- for (const readme of validReadmes) {
90
- await this.previewContribution.open(readme);
91
- }
92
- }
93
- else {
94
- // If no readme is found, show the welcome page.
95
- this.openView({ reveal: true, activate: true });
96
- }
97
- }
98
- registerCommands(registry) {
99
- registry.registerCommand(exports.GettingStartedCommand, {
100
- execute: () => this.openView({ reveal: true, activate: true }),
101
- });
102
- }
103
- registerMenus(menus) {
104
- menus.registerMenuAction(browser_1.CommonMenus.HELP, {
105
- commandId: exports.GettingStartedCommand.id,
106
- label: exports.GettingStartedCommand.label,
107
- order: 'a10'
108
- });
109
- }
110
- };
111
- __decorate([
112
- (0, inversify_1.inject)(common_1.CommandRegistry),
113
- __metadata("design:type", common_1.CommandRegistry)
114
- ], GettingStartedContribution.prototype, "commandRegistry", void 0);
115
- __decorate([
116
- (0, inversify_1.inject)(editor_manager_1.EditorManager),
117
- __metadata("design:type", editor_manager_1.EditorManager)
118
- ], GettingStartedContribution.prototype, "editorManager", void 0);
119
- __decorate([
120
- (0, inversify_1.inject)(file_service_1.FileService),
121
- __metadata("design:type", file_service_1.FileService)
122
- ], GettingStartedContribution.prototype, "fileService", void 0);
123
- __decorate([
124
- (0, inversify_1.inject)(browser_1.PreferenceService),
125
- __metadata("design:type", Object)
126
- ], GettingStartedContribution.prototype, "preferenceService", void 0);
127
- __decorate([
128
- (0, inversify_1.inject)(preview_contribution_1.PreviewContribution),
129
- __metadata("design:type", preview_contribution_1.PreviewContribution)
130
- ], GettingStartedContribution.prototype, "previewContribution", void 0);
131
- __decorate([
132
- (0, inversify_1.inject)(frontend_application_state_1.FrontendApplicationStateService),
133
- __metadata("design:type", frontend_application_state_1.FrontendApplicationStateService)
134
- ], GettingStartedContribution.prototype, "stateService", void 0);
135
- __decorate([
136
- (0, inversify_1.inject)(browser_2.WorkspaceService),
137
- __metadata("design:type", browser_2.WorkspaceService)
138
- ], GettingStartedContribution.prototype, "workspaceService", void 0);
139
- GettingStartedContribution = __decorate([
140
- (0, inversify_1.injectable)(),
141
- __metadata("design:paramtypes", [])
142
- ], GettingStartedContribution);
143
- exports.GettingStartedContribution = GettingStartedContribution;
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2018 Ericsson 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
+ // *****************************************************************************
17
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
22
+ };
23
+ var __metadata = (this && this.__metadata) || function (k, v) {
24
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
25
+ };
26
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ exports.GettingStartedContribution = exports.GettingStartedCommand = void 0;
28
+ const inversify_1 = require("@theia/core/shared/inversify");
29
+ const common_1 = require("@theia/core/lib/common");
30
+ const browser_1 = require("@theia/core/lib/browser");
31
+ const editor_manager_1 = require("@theia/editor/lib/browser/editor-manager");
32
+ const getting_started_widget_1 = require("./getting-started-widget");
33
+ const file_service_1 = require("@theia/filesystem/lib/browser/file-service");
34
+ const frontend_application_state_1 = require("@theia/core/lib/browser/frontend-application-state");
35
+ const preview_contribution_1 = require("@theia/preview/lib/browser/preview-contribution");
36
+ const browser_2 = require("@theia/workspace/lib/browser");
37
+ /**
38
+ * Triggers opening the `GettingStartedWidget`.
39
+ */
40
+ exports.GettingStartedCommand = {
41
+ id: getting_started_widget_1.GettingStartedWidget.ID,
42
+ label: getting_started_widget_1.GettingStartedWidget.LABEL
43
+ };
44
+ let GettingStartedContribution = class GettingStartedContribution extends browser_1.AbstractViewContribution {
45
+ constructor() {
46
+ super({
47
+ widgetId: getting_started_widget_1.GettingStartedWidget.ID,
48
+ widgetName: getting_started_widget_1.GettingStartedWidget.LABEL,
49
+ defaultWidgetOptions: {
50
+ area: 'main',
51
+ }
52
+ });
53
+ }
54
+ async onStart(app) {
55
+ this.stateService.reachedState('ready').then(async () => {
56
+ if (this.editorManager.all.length === 0) {
57
+ await this.preferenceService.ready;
58
+ const startupEditor = this.preferenceService.get('workbench.startupEditor');
59
+ switch (startupEditor) {
60
+ case 'welcomePage':
61
+ this.openView({ reveal: true, activate: true });
62
+ break;
63
+ case 'welcomePageInEmptyWorkbench':
64
+ if (!this.workspaceService.opened) {
65
+ this.openView({ reveal: true, activate: true });
66
+ }
67
+ break;
68
+ case 'newUntitledFile':
69
+ this.commandRegistry.executeCommand(browser_1.CommonCommands.NEW_UNTITLED_TEXT_FILE.id);
70
+ break;
71
+ case 'readme':
72
+ await this.openReadme();
73
+ break;
74
+ }
75
+ }
76
+ });
77
+ }
78
+ async openReadme() {
79
+ const roots = await this.workspaceService.roots;
80
+ const readmes = await Promise.all(roots.map(async (folder) => {
81
+ var _a;
82
+ const folderStat = await this.fileService.resolve(folder.resource);
83
+ const fileArr = ((_a = folderStat === null || folderStat === void 0 ? void 0 : folderStat.children) === null || _a === void 0 ? void 0 : _a.sort((a, b) => a.name.localeCompare(b.name))) || [];
84
+ const filePath = fileArr.find(file => file.name.toLowerCase() === 'readme.md') || fileArr.find(file => file.name.toLowerCase().startsWith('readme'));
85
+ return filePath === null || filePath === void 0 ? void 0 : filePath.resource;
86
+ }));
87
+ const validReadmes = common_1.ArrayUtils.coalesce(readmes);
88
+ if (validReadmes.length) {
89
+ for (const readme of validReadmes) {
90
+ await this.previewContribution.open(readme);
91
+ }
92
+ }
93
+ else {
94
+ // If no readme is found, show the welcome page.
95
+ this.openView({ reveal: true, activate: true });
96
+ }
97
+ }
98
+ registerCommands(registry) {
99
+ registry.registerCommand(exports.GettingStartedCommand, {
100
+ execute: () => this.openView({ reveal: true, activate: true }),
101
+ });
102
+ }
103
+ registerMenus(menus) {
104
+ menus.registerMenuAction(browser_1.CommonMenus.HELP, {
105
+ commandId: exports.GettingStartedCommand.id,
106
+ label: exports.GettingStartedCommand.label,
107
+ order: 'a10'
108
+ });
109
+ }
110
+ };
111
+ __decorate([
112
+ (0, inversify_1.inject)(common_1.CommandRegistry),
113
+ __metadata("design:type", common_1.CommandRegistry)
114
+ ], GettingStartedContribution.prototype, "commandRegistry", void 0);
115
+ __decorate([
116
+ (0, inversify_1.inject)(editor_manager_1.EditorManager),
117
+ __metadata("design:type", editor_manager_1.EditorManager)
118
+ ], GettingStartedContribution.prototype, "editorManager", void 0);
119
+ __decorate([
120
+ (0, inversify_1.inject)(file_service_1.FileService),
121
+ __metadata("design:type", file_service_1.FileService)
122
+ ], GettingStartedContribution.prototype, "fileService", void 0);
123
+ __decorate([
124
+ (0, inversify_1.inject)(browser_1.PreferenceService),
125
+ __metadata("design:type", Object)
126
+ ], GettingStartedContribution.prototype, "preferenceService", void 0);
127
+ __decorate([
128
+ (0, inversify_1.inject)(preview_contribution_1.PreviewContribution),
129
+ __metadata("design:type", preview_contribution_1.PreviewContribution)
130
+ ], GettingStartedContribution.prototype, "previewContribution", void 0);
131
+ __decorate([
132
+ (0, inversify_1.inject)(frontend_application_state_1.FrontendApplicationStateService),
133
+ __metadata("design:type", frontend_application_state_1.FrontendApplicationStateService)
134
+ ], GettingStartedContribution.prototype, "stateService", void 0);
135
+ __decorate([
136
+ (0, inversify_1.inject)(browser_2.WorkspaceService),
137
+ __metadata("design:type", browser_2.WorkspaceService)
138
+ ], GettingStartedContribution.prototype, "workspaceService", void 0);
139
+ GettingStartedContribution = __decorate([
140
+ (0, inversify_1.injectable)(),
141
+ __metadata("design:paramtypes", [])
142
+ ], GettingStartedContribution);
143
+ exports.GettingStartedContribution = GettingStartedContribution;
144
144
  //# sourceMappingURL=getting-started-contribution.js.map
@@ -1,5 +1,5 @@
1
- import { ContainerModule } from '@theia/core/shared/inversify';
2
- import '../../src/browser/style/index.css';
3
- declare const _default: ContainerModule;
4
- export default _default;
1
+ import { ContainerModule } from '@theia/core/shared/inversify';
2
+ import '../../src/browser/style/index.css';
3
+ declare const _default: ContainerModule;
4
+ export default _default;
5
5
  //# sourceMappingURL=getting-started-frontend-module.d.ts.map
@@ -1,34 +1,34 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2018 Ericsson 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
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- const getting_started_contribution_1 = require("./getting-started-contribution");
19
- const inversify_1 = require("@theia/core/shared/inversify");
20
- const getting_started_widget_1 = require("./getting-started-widget");
21
- const browser_1 = require("@theia/core/lib/browser");
22
- const getting_started_preferences_1 = require("./getting-started-preferences");
23
- require("../../src/browser/style/index.css");
24
- exports.default = new inversify_1.ContainerModule((bind) => {
25
- (0, browser_1.bindViewContribution)(bind, getting_started_contribution_1.GettingStartedContribution);
26
- bind(browser_1.FrontendApplicationContribution).toService(getting_started_contribution_1.GettingStartedContribution);
27
- bind(getting_started_widget_1.GettingStartedWidget).toSelf();
28
- bind(browser_1.WidgetFactory).toDynamicValue(context => ({
29
- id: getting_started_widget_1.GettingStartedWidget.ID,
30
- createWidget: () => context.container.get(getting_started_widget_1.GettingStartedWidget),
31
- })).inSingletonScope();
32
- (0, getting_started_preferences_1.bindGettingStartedPreferences)(bind);
33
- });
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2018 Ericsson 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
+ // *****************************************************************************
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ const getting_started_contribution_1 = require("./getting-started-contribution");
19
+ const inversify_1 = require("@theia/core/shared/inversify");
20
+ const getting_started_widget_1 = require("./getting-started-widget");
21
+ const browser_1 = require("@theia/core/lib/browser");
22
+ const getting_started_preferences_1 = require("./getting-started-preferences");
23
+ require("../../src/browser/style/index.css");
24
+ exports.default = new inversify_1.ContainerModule((bind) => {
25
+ (0, browser_1.bindViewContribution)(bind, getting_started_contribution_1.GettingStartedContribution);
26
+ bind(browser_1.FrontendApplicationContribution).toService(getting_started_contribution_1.GettingStartedContribution);
27
+ bind(getting_started_widget_1.GettingStartedWidget).toSelf();
28
+ bind(browser_1.WidgetFactory).toDynamicValue(context => ({
29
+ id: getting_started_widget_1.GettingStartedWidget.ID,
30
+ createWidget: () => context.container.get(getting_started_widget_1.GettingStartedWidget),
31
+ })).inSingletonScope();
32
+ (0, getting_started_preferences_1.bindGettingStartedPreferences)(bind);
33
+ });
34
34
  //# sourceMappingURL=getting-started-frontend-module.js.map
@@ -1,12 +1,12 @@
1
- import { interfaces } from '@theia/core/shared/inversify';
2
- import { PreferenceProxy, PreferenceService, PreferenceSchema } from '@theia/core/lib/browser/preferences';
3
- export declare const GettingStartedPreferenceSchema: PreferenceSchema;
4
- export interface GettingStartedConfiguration {
5
- 'workbench.startupEditor': string;
6
- }
7
- export declare const GettingStartedPreferenceContribution: unique symbol;
8
- export declare const GettingStartedPreferences: unique symbol;
9
- export declare type GettingStartedPreferences = PreferenceProxy<GettingStartedConfiguration>;
10
- export declare function createGettingStartedPreferences(preferences: PreferenceService, schema?: PreferenceSchema): GettingStartedPreferences;
11
- export declare function bindGettingStartedPreferences(bind: interfaces.Bind): void;
1
+ import { interfaces } from '@theia/core/shared/inversify';
2
+ import { PreferenceProxy, PreferenceService, PreferenceSchema } from '@theia/core/lib/browser/preferences';
3
+ export declare const GettingStartedPreferenceSchema: PreferenceSchema;
4
+ export interface GettingStartedConfiguration {
5
+ 'workbench.startupEditor': string;
6
+ }
7
+ export declare const GettingStartedPreferenceContribution: unique symbol;
8
+ export declare const GettingStartedPreferences: unique symbol;
9
+ export declare type GettingStartedPreferences = PreferenceProxy<GettingStartedConfiguration>;
10
+ export declare function createGettingStartedPreferences(preferences: PreferenceService, schema?: PreferenceSchema): GettingStartedPreferences;
11
+ export declare function bindGettingStartedPreferences(bind: interfaces.Bind): void;
12
12
  //# sourceMappingURL=getting-started-preferences.d.ts.map