@theia/plugin-dev 1.45.1 → 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.
Files changed (54) hide show
  1. package/README.md +31 -31
  2. package/lib/browser/hosted-plugin-controller.d.ts +74 -74
  3. package/lib/browser/hosted-plugin-controller.js +352 -352
  4. package/lib/browser/hosted-plugin-frontend-contribution.d.ts +6 -6
  5. package/lib/browser/hosted-plugin-frontend-contribution.js +56 -56
  6. package/lib/browser/hosted-plugin-informer.d.ts +25 -25
  7. package/lib/browser/hosted-plugin-informer.js +102 -102
  8. package/lib/browser/hosted-plugin-log-viewer.d.ts +14 -14
  9. package/lib/browser/hosted-plugin-log-viewer.js +69 -69
  10. package/lib/browser/hosted-plugin-manager-client.d.ts +80 -80
  11. package/lib/browser/hosted-plugin-manager-client.js +410 -410
  12. package/lib/browser/hosted-plugin-preferences.d.ts +13 -13
  13. package/lib/browser/hosted-plugin-preferences.js +60 -60
  14. package/lib/browser/plugin-dev-frontend-module.d.ts +3 -3
  15. package/lib/browser/plugin-dev-frontend-module.js +42 -42
  16. package/lib/common/index.d.ts +2 -2
  17. package/lib/common/index.js +31 -31
  18. package/lib/common/plugin-dev-protocol.d.ts +24 -24
  19. package/lib/common/plugin-dev-protocol.js +20 -20
  20. package/lib/node/hosted-instance-manager.d.ts +104 -104
  21. package/lib/node/hosted-instance-manager.js +320 -320
  22. package/lib/node/hosted-instance-manager.js.map +1 -1
  23. package/lib/node/hosted-plugin-reader.d.ts +11 -11
  24. package/lib/node/hosted-plugin-reader.js +68 -68
  25. package/lib/node/hosted-plugin-reader.js.map +1 -1
  26. package/lib/node/hosted-plugin-uri-postprocessor.d.ts +6 -6
  27. package/lib/node/hosted-plugin-uri-postprocessor.js +27 -27
  28. package/lib/node/hosted-plugins-manager.d.ts +41 -41
  29. package/lib/node/hosted-plugins-manager.js +119 -119
  30. package/lib/node/plugin-dev-backend-module.d.ts +4 -4
  31. package/lib/node/plugin-dev-backend-module.js +53 -53
  32. package/lib/node/plugin-dev-service.d.ts +25 -25
  33. package/lib/node/plugin-dev-service.js +108 -108
  34. package/lib/node-electron/plugin-dev-electron-backend-module.d.ts +3 -3
  35. package/lib/node-electron/plugin-dev-electron-backend-module.js +28 -28
  36. package/lib/package.spec.js +25 -25
  37. package/package.json +9 -9
  38. package/src/browser/hosted-plugin-controller.ts +356 -356
  39. package/src/browser/hosted-plugin-frontend-contribution.ts +45 -45
  40. package/src/browser/hosted-plugin-informer.ts +93 -93
  41. package/src/browser/hosted-plugin-log-viewer.ts +52 -52
  42. package/src/browser/hosted-plugin-manager-client.ts +430 -430
  43. package/src/browser/hosted-plugin-preferences.ts +71 -71
  44. package/src/browser/plugin-dev-frontend-module.ts +45 -45
  45. package/src/common/index.ts +21 -21
  46. package/src/common/plugin-dev-protocol.ts +45 -45
  47. package/src/node/hosted-instance-manager.ts +382 -382
  48. package/src/node/hosted-plugin-reader.ts +58 -58
  49. package/src/node/hosted-plugin-uri-postprocessor.ts +32 -32
  50. package/src/node/hosted-plugins-manager.ts +146 -146
  51. package/src/node/plugin-dev-backend-module.ts +54 -54
  52. package/src/node/plugin-dev-service.ts +107 -107
  53. package/src/node-electron/plugin-dev-electron-backend-module.ts +29 -29
  54. package/src/package.spec.ts +28 -28
@@ -1,7 +1,7 @@
1
- import { CommandRegistry, CommandContribution } from '@theia/core/lib/common';
2
- import { HostedPluginManagerClient } from './hosted-plugin-manager-client';
3
- export declare class HostedPluginFrontendContribution implements CommandContribution {
4
- protected readonly hostedPluginManagerClient: HostedPluginManagerClient;
5
- registerCommands(commands: CommandRegistry): void;
6
- }
1
+ import { CommandRegistry, CommandContribution } from '@theia/core/lib/common';
2
+ import { HostedPluginManagerClient } from './hosted-plugin-manager-client';
3
+ export declare class HostedPluginFrontendContribution implements CommandContribution {
4
+ protected readonly hostedPluginManagerClient: HostedPluginManagerClient;
5
+ registerCommands(commands: CommandRegistry): void;
6
+ }
7
7
  //# sourceMappingURL=hosted-plugin-frontend-contribution.d.ts.map
@@ -1,57 +1,57 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2019 Red Hat, Inc. 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.HostedPluginFrontendContribution = void 0;
28
- const inversify_1 = require("@theia/core/shared/inversify");
29
- const hosted_plugin_manager_client_1 = require("./hosted-plugin-manager-client");
30
- let HostedPluginFrontendContribution = class HostedPluginFrontendContribution {
31
- registerCommands(commands) {
32
- commands.registerCommand(hosted_plugin_manager_client_1.HostedPluginCommands.START, {
33
- execute: () => this.hostedPluginManagerClient.start()
34
- });
35
- commands.registerCommand(hosted_plugin_manager_client_1.HostedPluginCommands.DEBUG, {
36
- execute: () => this.hostedPluginManagerClient.debug()
37
- });
38
- commands.registerCommand(hosted_plugin_manager_client_1.HostedPluginCommands.STOP, {
39
- execute: () => this.hostedPluginManagerClient.stop()
40
- });
41
- commands.registerCommand(hosted_plugin_manager_client_1.HostedPluginCommands.RESTART, {
42
- execute: () => this.hostedPluginManagerClient.restart()
43
- });
44
- commands.registerCommand(hosted_plugin_manager_client_1.HostedPluginCommands.SELECT_PATH, {
45
- execute: () => this.hostedPluginManagerClient.selectPluginPath()
46
- });
47
- }
48
- };
49
- __decorate([
50
- (0, inversify_1.inject)(hosted_plugin_manager_client_1.HostedPluginManagerClient),
51
- __metadata("design:type", hosted_plugin_manager_client_1.HostedPluginManagerClient)
52
- ], HostedPluginFrontendContribution.prototype, "hostedPluginManagerClient", void 0);
53
- HostedPluginFrontendContribution = __decorate([
54
- (0, inversify_1.injectable)()
55
- ], HostedPluginFrontendContribution);
56
- exports.HostedPluginFrontendContribution = HostedPluginFrontendContribution;
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2019 Red Hat, Inc. 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.HostedPluginFrontendContribution = void 0;
28
+ const inversify_1 = require("@theia/core/shared/inversify");
29
+ const hosted_plugin_manager_client_1 = require("./hosted-plugin-manager-client");
30
+ let HostedPluginFrontendContribution = class HostedPluginFrontendContribution {
31
+ registerCommands(commands) {
32
+ commands.registerCommand(hosted_plugin_manager_client_1.HostedPluginCommands.START, {
33
+ execute: () => this.hostedPluginManagerClient.start()
34
+ });
35
+ commands.registerCommand(hosted_plugin_manager_client_1.HostedPluginCommands.DEBUG, {
36
+ execute: () => this.hostedPluginManagerClient.debug()
37
+ });
38
+ commands.registerCommand(hosted_plugin_manager_client_1.HostedPluginCommands.STOP, {
39
+ execute: () => this.hostedPluginManagerClient.stop()
40
+ });
41
+ commands.registerCommand(hosted_plugin_manager_client_1.HostedPluginCommands.RESTART, {
42
+ execute: () => this.hostedPluginManagerClient.restart()
43
+ });
44
+ commands.registerCommand(hosted_plugin_manager_client_1.HostedPluginCommands.SELECT_PATH, {
45
+ execute: () => this.hostedPluginManagerClient.selectPluginPath()
46
+ });
47
+ }
48
+ };
49
+ __decorate([
50
+ (0, inversify_1.inject)(hosted_plugin_manager_client_1.HostedPluginManagerClient),
51
+ __metadata("design:type", hosted_plugin_manager_client_1.HostedPluginManagerClient)
52
+ ], HostedPluginFrontendContribution.prototype, "hostedPluginManagerClient", void 0);
53
+ HostedPluginFrontendContribution = __decorate([
54
+ (0, inversify_1.injectable)()
55
+ ], HostedPluginFrontendContribution);
56
+ exports.HostedPluginFrontendContribution = HostedPluginFrontendContribution;
57
57
  //# sourceMappingURL=hosted-plugin-frontend-contribution.js.map
@@ -1,26 +1,26 @@
1
- import { StatusBar } from '@theia/core/lib/browser/status-bar/status-bar';
2
- import { FrontendApplicationContribution } from '@theia/core/lib/browser';
3
- import { WorkspaceService } from '@theia/workspace/lib/browser';
4
- import { PluginDevServer } from '../common/plugin-dev-protocol';
5
- import { ConnectionStatusService } from '@theia/core/lib/browser/connection-status-service';
6
- import { FrontendApplicationStateService } from '@theia/core/lib/browser/frontend-application-state';
7
- import { WindowTitleService } from '@theia/core/lib/browser/window/window-title-service';
8
- /**
9
- * Informs the user whether Theia is running with hosted plugin.
10
- * Adds 'Development Host' status bar element and appends the same prefix to window title.
11
- */
12
- export declare class HostedPluginInformer implements FrontendApplicationContribution {
13
- static readonly DEVELOPMENT_HOST_TITLE: string;
14
- static readonly DEVELOPMENT_HOST = "development-host";
15
- static readonly DEVELOPMENT_HOST_OFFLINE = "development-host-offline";
16
- private entry;
17
- protected readonly statusBar: StatusBar;
18
- protected readonly workspaceService: WorkspaceService;
19
- protected readonly hostedPluginServer: PluginDevServer;
20
- protected readonly connectionStatusService: ConnectionStatusService;
21
- protected readonly frontendApplicationStateService: FrontendApplicationStateService;
22
- protected readonly windowTitleService: WindowTitleService;
23
- initialize(): void;
24
- private updateStatusBarElement;
25
- }
1
+ import { StatusBar } from '@theia/core/lib/browser/status-bar/status-bar';
2
+ import { FrontendApplicationContribution } from '@theia/core/lib/browser';
3
+ import { WorkspaceService } from '@theia/workspace/lib/browser';
4
+ import { PluginDevServer } from '../common/plugin-dev-protocol';
5
+ import { ConnectionStatusService } from '@theia/core/lib/browser/connection-status-service';
6
+ import { FrontendApplicationStateService } from '@theia/core/lib/browser/frontend-application-state';
7
+ import { WindowTitleService } from '@theia/core/lib/browser/window/window-title-service';
8
+ /**
9
+ * Informs the user whether Theia is running with hosted plugin.
10
+ * Adds 'Development Host' status bar element and appends the same prefix to window title.
11
+ */
12
+ export declare class HostedPluginInformer implements FrontendApplicationContribution {
13
+ static readonly DEVELOPMENT_HOST_TITLE: string;
14
+ static readonly DEVELOPMENT_HOST = "development-host";
15
+ static readonly DEVELOPMENT_HOST_OFFLINE = "development-host-offline";
16
+ private entry;
17
+ protected readonly statusBar: StatusBar;
18
+ protected readonly workspaceService: WorkspaceService;
19
+ protected readonly hostedPluginServer: PluginDevServer;
20
+ protected readonly connectionStatusService: ConnectionStatusService;
21
+ protected readonly frontendApplicationStateService: FrontendApplicationStateService;
22
+ protected readonly windowTitleService: WindowTitleService;
23
+ initialize(): void;
24
+ private updateStatusBarElement;
25
+ }
26
26
  //# sourceMappingURL=hosted-plugin-informer.d.ts.map
@@ -1,103 +1,103 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2018 Red Hat, Inc. 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
- var HostedPluginInformer_1;
27
- Object.defineProperty(exports, "__esModule", { value: true });
28
- exports.HostedPluginInformer = void 0;
29
- const inversify_1 = require("@theia/core/shared/inversify");
30
- const status_bar_1 = require("@theia/core/lib/browser/status-bar/status-bar");
31
- const browser_1 = require("@theia/core/lib/browser");
32
- const browser_2 = require("@theia/workspace/lib/browser");
33
- const plugin_dev_protocol_1 = require("../common/plugin-dev-protocol");
34
- const connection_status_service_1 = require("@theia/core/lib/browser/connection-status-service");
35
- const frontend_application_state_1 = require("@theia/core/lib/browser/frontend-application-state");
36
- const nls_1 = require("@theia/core/lib/common/nls");
37
- const window_title_service_1 = require("@theia/core/lib/browser/window/window-title-service");
38
- /**
39
- * Informs the user whether Theia is running with hosted plugin.
40
- * Adds 'Development Host' status bar element and appends the same prefix to window title.
41
- */
42
- let HostedPluginInformer = HostedPluginInformer_1 = class HostedPluginInformer {
43
- initialize() {
44
- this.hostedPluginServer.getHostedPlugin().then(pluginMetadata => {
45
- if (pluginMetadata) {
46
- this.windowTitleService.update({
47
- developmentHost: HostedPluginInformer_1.DEVELOPMENT_HOST_TITLE
48
- });
49
- this.entry = {
50
- text: `$(cube) ${HostedPluginInformer_1.DEVELOPMENT_HOST_TITLE}`,
51
- tooltip: `${nls_1.nls.localize('theia/plugin-dev/hostedPlugin', 'Hosted Plugin')} '${pluginMetadata.model.name}'`,
52
- alignment: browser_1.StatusBarAlignment.LEFT,
53
- priority: 100
54
- };
55
- this.frontendApplicationStateService.reachedState('ready').then(() => {
56
- this.updateStatusBarElement();
57
- });
58
- this.connectionStatusService.onStatusChange(() => this.updateStatusBarElement());
59
- }
60
- });
61
- }
62
- updateStatusBarElement() {
63
- if (this.connectionStatusService.currentStatus === connection_status_service_1.ConnectionStatus.OFFLINE) {
64
- this.entry.className = HostedPluginInformer_1.DEVELOPMENT_HOST_OFFLINE;
65
- }
66
- else {
67
- this.entry.className = HostedPluginInformer_1.DEVELOPMENT_HOST;
68
- }
69
- this.statusBar.setElement(HostedPluginInformer_1.DEVELOPMENT_HOST, this.entry);
70
- }
71
- };
72
- HostedPluginInformer.DEVELOPMENT_HOST_TITLE = nls_1.nls.localize('theia/plugin-dev/devHost', 'Development Host');
73
- HostedPluginInformer.DEVELOPMENT_HOST = 'development-host';
74
- HostedPluginInformer.DEVELOPMENT_HOST_OFFLINE = 'development-host-offline';
75
- __decorate([
76
- (0, inversify_1.inject)(status_bar_1.StatusBar),
77
- __metadata("design:type", Object)
78
- ], HostedPluginInformer.prototype, "statusBar", void 0);
79
- __decorate([
80
- (0, inversify_1.inject)(browser_2.WorkspaceService),
81
- __metadata("design:type", browser_2.WorkspaceService)
82
- ], HostedPluginInformer.prototype, "workspaceService", void 0);
83
- __decorate([
84
- (0, inversify_1.inject)(plugin_dev_protocol_1.PluginDevServer),
85
- __metadata("design:type", Object)
86
- ], HostedPluginInformer.prototype, "hostedPluginServer", void 0);
87
- __decorate([
88
- (0, inversify_1.inject)(connection_status_service_1.ConnectionStatusService),
89
- __metadata("design:type", Object)
90
- ], HostedPluginInformer.prototype, "connectionStatusService", void 0);
91
- __decorate([
92
- (0, inversify_1.inject)(frontend_application_state_1.FrontendApplicationStateService),
93
- __metadata("design:type", frontend_application_state_1.FrontendApplicationStateService)
94
- ], HostedPluginInformer.prototype, "frontendApplicationStateService", void 0);
95
- __decorate([
96
- (0, inversify_1.inject)(window_title_service_1.WindowTitleService),
97
- __metadata("design:type", window_title_service_1.WindowTitleService)
98
- ], HostedPluginInformer.prototype, "windowTitleService", void 0);
99
- HostedPluginInformer = HostedPluginInformer_1 = __decorate([
100
- (0, inversify_1.injectable)()
101
- ], HostedPluginInformer);
102
- exports.HostedPluginInformer = HostedPluginInformer;
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2018 Red Hat, Inc. 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
+ var HostedPluginInformer_1;
27
+ Object.defineProperty(exports, "__esModule", { value: true });
28
+ exports.HostedPluginInformer = void 0;
29
+ const inversify_1 = require("@theia/core/shared/inversify");
30
+ const status_bar_1 = require("@theia/core/lib/browser/status-bar/status-bar");
31
+ const browser_1 = require("@theia/core/lib/browser");
32
+ const browser_2 = require("@theia/workspace/lib/browser");
33
+ const plugin_dev_protocol_1 = require("../common/plugin-dev-protocol");
34
+ const connection_status_service_1 = require("@theia/core/lib/browser/connection-status-service");
35
+ const frontend_application_state_1 = require("@theia/core/lib/browser/frontend-application-state");
36
+ const nls_1 = require("@theia/core/lib/common/nls");
37
+ const window_title_service_1 = require("@theia/core/lib/browser/window/window-title-service");
38
+ /**
39
+ * Informs the user whether Theia is running with hosted plugin.
40
+ * Adds 'Development Host' status bar element and appends the same prefix to window title.
41
+ */
42
+ let HostedPluginInformer = HostedPluginInformer_1 = class HostedPluginInformer {
43
+ initialize() {
44
+ this.hostedPluginServer.getHostedPlugin().then(pluginMetadata => {
45
+ if (pluginMetadata) {
46
+ this.windowTitleService.update({
47
+ developmentHost: HostedPluginInformer_1.DEVELOPMENT_HOST_TITLE
48
+ });
49
+ this.entry = {
50
+ text: `$(cube) ${HostedPluginInformer_1.DEVELOPMENT_HOST_TITLE}`,
51
+ tooltip: `${nls_1.nls.localize('theia/plugin-dev/hostedPlugin', 'Hosted Plugin')} '${pluginMetadata.model.name}'`,
52
+ alignment: browser_1.StatusBarAlignment.LEFT,
53
+ priority: 100
54
+ };
55
+ this.frontendApplicationStateService.reachedState('ready').then(() => {
56
+ this.updateStatusBarElement();
57
+ });
58
+ this.connectionStatusService.onStatusChange(() => this.updateStatusBarElement());
59
+ }
60
+ });
61
+ }
62
+ updateStatusBarElement() {
63
+ if (this.connectionStatusService.currentStatus === connection_status_service_1.ConnectionStatus.OFFLINE) {
64
+ this.entry.className = HostedPluginInformer_1.DEVELOPMENT_HOST_OFFLINE;
65
+ }
66
+ else {
67
+ this.entry.className = HostedPluginInformer_1.DEVELOPMENT_HOST;
68
+ }
69
+ this.statusBar.setElement(HostedPluginInformer_1.DEVELOPMENT_HOST, this.entry);
70
+ }
71
+ };
72
+ HostedPluginInformer.DEVELOPMENT_HOST_TITLE = nls_1.nls.localize('theia/plugin-dev/devHost', 'Development Host');
73
+ HostedPluginInformer.DEVELOPMENT_HOST = 'development-host';
74
+ HostedPluginInformer.DEVELOPMENT_HOST_OFFLINE = 'development-host-offline';
75
+ __decorate([
76
+ (0, inversify_1.inject)(status_bar_1.StatusBar),
77
+ __metadata("design:type", Object)
78
+ ], HostedPluginInformer.prototype, "statusBar", void 0);
79
+ __decorate([
80
+ (0, inversify_1.inject)(browser_2.WorkspaceService),
81
+ __metadata("design:type", browser_2.WorkspaceService)
82
+ ], HostedPluginInformer.prototype, "workspaceService", void 0);
83
+ __decorate([
84
+ (0, inversify_1.inject)(plugin_dev_protocol_1.PluginDevServer),
85
+ __metadata("design:type", Object)
86
+ ], HostedPluginInformer.prototype, "hostedPluginServer", void 0);
87
+ __decorate([
88
+ (0, inversify_1.inject)(connection_status_service_1.ConnectionStatusService),
89
+ __metadata("design:type", Object)
90
+ ], HostedPluginInformer.prototype, "connectionStatusService", void 0);
91
+ __decorate([
92
+ (0, inversify_1.inject)(frontend_application_state_1.FrontendApplicationStateService),
93
+ __metadata("design:type", frontend_application_state_1.FrontendApplicationStateService)
94
+ ], HostedPluginInformer.prototype, "frontendApplicationStateService", void 0);
95
+ __decorate([
96
+ (0, inversify_1.inject)(window_title_service_1.WindowTitleService),
97
+ __metadata("design:type", window_title_service_1.WindowTitleService)
98
+ ], HostedPluginInformer.prototype, "windowTitleService", void 0);
99
+ HostedPluginInformer = HostedPluginInformer_1 = __decorate([
100
+ (0, inversify_1.injectable)()
101
+ ], HostedPluginInformer);
102
+ exports.HostedPluginInformer = HostedPluginInformer;
103
103
  //# sourceMappingURL=hosted-plugin-informer.js.map
@@ -1,15 +1,15 @@
1
- import { OutputChannel, OutputChannelManager } from '@theia/output/lib/browser/output-channel';
2
- import { OutputContribution } from '@theia/output/lib/browser/output-contribution';
3
- import { LogPart } from '@theia/plugin-ext/lib/common/types';
4
- import { HostedPluginWatcher } from '@theia/plugin-ext/lib/hosted/browser/hosted-plugin-watcher';
5
- export declare class HostedPluginLogViewer {
6
- static OUTPUT_CHANNEL_NAME: string;
7
- protected readonly watcher: HostedPluginWatcher;
8
- protected readonly outputChannelManager: OutputChannelManager;
9
- protected readonly outputContribution: OutputContribution;
10
- protected channel: OutputChannel;
11
- showLogConsole(): void;
12
- protected init(): void;
13
- protected logMessageEventHandler(event: LogPart): void;
14
- }
1
+ import { OutputChannel, OutputChannelManager } from '@theia/output/lib/browser/output-channel';
2
+ import { OutputContribution } from '@theia/output/lib/browser/output-contribution';
3
+ import { LogPart } from '@theia/plugin-ext/lib/common/types';
4
+ import { HostedPluginWatcher } from '@theia/plugin-ext/lib/hosted/browser/hosted-plugin-watcher';
5
+ export declare class HostedPluginLogViewer {
6
+ static OUTPUT_CHANNEL_NAME: string;
7
+ protected readonly watcher: HostedPluginWatcher;
8
+ protected readonly outputChannelManager: OutputChannelManager;
9
+ protected readonly outputContribution: OutputContribution;
10
+ protected channel: OutputChannel;
11
+ showLogConsole(): void;
12
+ protected init(): void;
13
+ protected logMessageEventHandler(event: LogPart): void;
14
+ }
15
15
  //# sourceMappingURL=hosted-plugin-log-viewer.d.ts.map
@@ -1,70 +1,70 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2018 Red Hat, Inc. 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
- var HostedPluginLogViewer_1;
27
- Object.defineProperty(exports, "__esModule", { value: true });
28
- exports.HostedPluginLogViewer = void 0;
29
- const inversify_1 = require("@theia/core/shared/inversify");
30
- const output_channel_1 = require("@theia/output/lib/browser/output-channel");
31
- const output_contribution_1 = require("@theia/output/lib/browser/output-contribution");
32
- const hosted_plugin_watcher_1 = require("@theia/plugin-ext/lib/hosted/browser/hosted-plugin-watcher");
33
- let HostedPluginLogViewer = HostedPluginLogViewer_1 = class HostedPluginLogViewer {
34
- showLogConsole() {
35
- this.outputContribution.openView({ reveal: true }).then(view => {
36
- view.activate();
37
- });
38
- }
39
- init() {
40
- this.channel = this.outputChannelManager.getChannel(HostedPluginLogViewer_1.OUTPUT_CHANNEL_NAME);
41
- this.watcher.onLogMessageEvent(event => this.logMessageEventHandler(event));
42
- }
43
- logMessageEventHandler(event) {
44
- this.channel.appendLine(event.data);
45
- }
46
- };
47
- HostedPluginLogViewer.OUTPUT_CHANNEL_NAME = 'hosted-instance-log';
48
- __decorate([
49
- (0, inversify_1.inject)(hosted_plugin_watcher_1.HostedPluginWatcher),
50
- __metadata("design:type", hosted_plugin_watcher_1.HostedPluginWatcher)
51
- ], HostedPluginLogViewer.prototype, "watcher", void 0);
52
- __decorate([
53
- (0, inversify_1.inject)(output_channel_1.OutputChannelManager),
54
- __metadata("design:type", output_channel_1.OutputChannelManager)
55
- ], HostedPluginLogViewer.prototype, "outputChannelManager", void 0);
56
- __decorate([
57
- (0, inversify_1.inject)(output_contribution_1.OutputContribution),
58
- __metadata("design:type", output_contribution_1.OutputContribution)
59
- ], HostedPluginLogViewer.prototype, "outputContribution", void 0);
60
- __decorate([
61
- (0, inversify_1.postConstruct)(),
62
- __metadata("design:type", Function),
63
- __metadata("design:paramtypes", []),
64
- __metadata("design:returntype", void 0)
65
- ], HostedPluginLogViewer.prototype, "init", null);
66
- HostedPluginLogViewer = HostedPluginLogViewer_1 = __decorate([
67
- (0, inversify_1.injectable)()
68
- ], HostedPluginLogViewer);
69
- exports.HostedPluginLogViewer = HostedPluginLogViewer;
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2018 Red Hat, Inc. 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
+ var HostedPluginLogViewer_1;
27
+ Object.defineProperty(exports, "__esModule", { value: true });
28
+ exports.HostedPluginLogViewer = void 0;
29
+ const inversify_1 = require("@theia/core/shared/inversify");
30
+ const output_channel_1 = require("@theia/output/lib/browser/output-channel");
31
+ const output_contribution_1 = require("@theia/output/lib/browser/output-contribution");
32
+ const hosted_plugin_watcher_1 = require("@theia/plugin-ext/lib/hosted/browser/hosted-plugin-watcher");
33
+ let HostedPluginLogViewer = HostedPluginLogViewer_1 = class HostedPluginLogViewer {
34
+ showLogConsole() {
35
+ this.outputContribution.openView({ reveal: true }).then(view => {
36
+ view.activate();
37
+ });
38
+ }
39
+ init() {
40
+ this.channel = this.outputChannelManager.getChannel(HostedPluginLogViewer_1.OUTPUT_CHANNEL_NAME);
41
+ this.watcher.onLogMessageEvent(event => this.logMessageEventHandler(event));
42
+ }
43
+ logMessageEventHandler(event) {
44
+ this.channel.appendLine(event.data);
45
+ }
46
+ };
47
+ HostedPluginLogViewer.OUTPUT_CHANNEL_NAME = 'hosted-instance-log';
48
+ __decorate([
49
+ (0, inversify_1.inject)(hosted_plugin_watcher_1.HostedPluginWatcher),
50
+ __metadata("design:type", hosted_plugin_watcher_1.HostedPluginWatcher)
51
+ ], HostedPluginLogViewer.prototype, "watcher", void 0);
52
+ __decorate([
53
+ (0, inversify_1.inject)(output_channel_1.OutputChannelManager),
54
+ __metadata("design:type", output_channel_1.OutputChannelManager)
55
+ ], HostedPluginLogViewer.prototype, "outputChannelManager", void 0);
56
+ __decorate([
57
+ (0, inversify_1.inject)(output_contribution_1.OutputContribution),
58
+ __metadata("design:type", output_contribution_1.OutputContribution)
59
+ ], HostedPluginLogViewer.prototype, "outputContribution", void 0);
60
+ __decorate([
61
+ (0, inversify_1.postConstruct)(),
62
+ __metadata("design:type", Function),
63
+ __metadata("design:paramtypes", []),
64
+ __metadata("design:returntype", void 0)
65
+ ], HostedPluginLogViewer.prototype, "init", null);
66
+ HostedPluginLogViewer = HostedPluginLogViewer_1 = __decorate([
67
+ (0, inversify_1.injectable)()
68
+ ], HostedPluginLogViewer);
69
+ exports.HostedPluginLogViewer = HostedPluginLogViewer;
70
70
  //# sourceMappingURL=hosted-plugin-log-viewer.js.map