@theia/plugin-dev 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 +31 -31
- package/lib/browser/hosted-plugin-controller.d.ts +74 -74
- package/lib/browser/hosted-plugin-controller.js +352 -352
- package/lib/browser/hosted-plugin-frontend-contribution.d.ts +6 -6
- package/lib/browser/hosted-plugin-frontend-contribution.js +56 -56
- package/lib/browser/hosted-plugin-informer.d.ts +25 -25
- package/lib/browser/hosted-plugin-informer.js +102 -102
- package/lib/browser/hosted-plugin-log-viewer.d.ts +14 -14
- package/lib/browser/hosted-plugin-log-viewer.js +69 -69
- package/lib/browser/hosted-plugin-manager-client.d.ts +80 -80
- package/lib/browser/hosted-plugin-manager-client.js +410 -410
- package/lib/browser/hosted-plugin-preferences.d.ts +13 -13
- package/lib/browser/hosted-plugin-preferences.js +60 -60
- package/lib/browser/plugin-dev-frontend-module.d.ts +3 -3
- package/lib/browser/plugin-dev-frontend-module.js +42 -42
- package/lib/common/index.d.ts +2 -2
- package/lib/common/index.js +31 -31
- package/lib/common/plugin-dev-protocol.d.ts +24 -24
- package/lib/common/plugin-dev-protocol.js +20 -20
- package/lib/node/hosted-instance-manager.d.ts +104 -104
- package/lib/node/hosted-instance-manager.js +320 -320
- package/lib/node/hosted-instance-manager.js.map +1 -1
- package/lib/node/hosted-plugin-reader.d.ts +11 -11
- package/lib/node/hosted-plugin-reader.js +68 -68
- package/lib/node/hosted-plugin-reader.js.map +1 -1
- package/lib/node/hosted-plugin-uri-postprocessor.d.ts +6 -6
- package/lib/node/hosted-plugin-uri-postprocessor.js +27 -27
- package/lib/node/hosted-plugins-manager.d.ts +41 -41
- package/lib/node/hosted-plugins-manager.js +119 -119
- package/lib/node/plugin-dev-backend-module.d.ts +4 -4
- package/lib/node/plugin-dev-backend-module.js +53 -53
- package/lib/node/plugin-dev-service.d.ts +25 -25
- package/lib/node/plugin-dev-service.js +108 -108
- package/lib/node-electron/plugin-dev-electron-backend-module.d.ts +3 -3
- package/lib/node-electron/plugin-dev-electron-backend-module.js +28 -28
- package/lib/package.spec.js +25 -25
- package/package.json +9 -9
- package/src/browser/hosted-plugin-controller.ts +356 -356
- package/src/browser/hosted-plugin-frontend-contribution.ts +45 -45
- package/src/browser/hosted-plugin-informer.ts +93 -93
- package/src/browser/hosted-plugin-log-viewer.ts +52 -52
- package/src/browser/hosted-plugin-manager-client.ts +430 -430
- package/src/browser/hosted-plugin-preferences.ts +71 -71
- package/src/browser/plugin-dev-frontend-module.ts +45 -45
- package/src/common/index.ts +21 -21
- package/src/common/plugin-dev-protocol.ts +45 -45
- package/src/node/hosted-instance-manager.ts +382 -382
- package/src/node/hosted-plugin-reader.ts +58 -58
- package/src/node/hosted-plugin-uri-postprocessor.ts +32 -32
- package/src/node/hosted-plugins-manager.ts +146 -146
- package/src/node/plugin-dev-backend-module.ts +54 -54
- package/src/node/plugin-dev-service.ts +107 -107
- package/src/node-electron/plugin-dev-electron-backend-module.ts +29 -29
- package/src/package.spec.ts +28 -28
|
@@ -1,353 +1,353 @@
|
|
|
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 HostedPluginController_1;
|
|
27
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.HostedPluginController = 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 common_1 = require("@theia/core/lib/common");
|
|
33
|
-
const commands_1 = require("@theia/core/shared/@phosphor/commands");
|
|
34
|
-
const widgets_1 = require("@theia/core/shared/@phosphor/widgets");
|
|
35
|
-
const frontend_application_state_1 = require("@theia/core/lib/browser/frontend-application-state");
|
|
36
|
-
const connection_status_service_1 = require("@theia/core/lib/browser/connection-status-service");
|
|
37
|
-
const plugin_dev_protocol_1 = require("../common/plugin-dev-protocol");
|
|
38
|
-
const hosted_plugin_manager_client_1 = require("./hosted-plugin-manager-client");
|
|
39
|
-
const hosted_plugin_log_viewer_1 = require("./hosted-plugin-log-viewer");
|
|
40
|
-
const hosted_plugin_preferences_1 = require("./hosted-plugin-preferences");
|
|
41
|
-
const nls_1 = require("@theia/core/lib/common/nls");
|
|
42
|
-
/**
|
|
43
|
-
* Adds a status bar element displaying the state of secondary Theia instance with hosted plugin and
|
|
44
|
-
* allows controlling the instance by simple clicking on the status bar element.
|
|
45
|
-
*/
|
|
46
|
-
let HostedPluginController = HostedPluginController_1 = class HostedPluginController {
|
|
47
|
-
constructor() {
|
|
48
|
-
this.pluginState = hosted_plugin_manager_client_1.HostedInstanceState.STOPPED;
|
|
49
|
-
}
|
|
50
|
-
initialize() {
|
|
51
|
-
this.hostedPluginServer.getHostedPlugin().then(pluginMetadata => {
|
|
52
|
-
if (!pluginMetadata) {
|
|
53
|
-
this.frontendApplicationStateService.reachedState('ready').then(() => {
|
|
54
|
-
// handles status bar item
|
|
55
|
-
this.hostedPluginManagerClient.onStateChanged(e => {
|
|
56
|
-
if (e.state === hosted_plugin_manager_client_1.HostedInstanceState.STARTING) {
|
|
57
|
-
this.onHostedPluginStarting();
|
|
58
|
-
}
|
|
59
|
-
else if (e.state === hosted_plugin_manager_client_1.HostedInstanceState.RUNNING) {
|
|
60
|
-
this.onHostedPluginRunning();
|
|
61
|
-
}
|
|
62
|
-
else if (e.state === hosted_plugin_manager_client_1.HostedInstanceState.STOPPED) {
|
|
63
|
-
this.onHostedPluginStopped();
|
|
64
|
-
}
|
|
65
|
-
else if (e.state === hosted_plugin_manager_client_1.HostedInstanceState.FAILED) {
|
|
66
|
-
this.onHostedPluginFailed();
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
// handles watch compilation
|
|
70
|
-
this.hostedPluginManagerClient.onStateChanged(e => this.handleWatchers(e));
|
|
71
|
-
// updates status bar if page is loading when hosted instance is already running
|
|
72
|
-
this.hostedPluginServer.isHostedPluginInstanceRunning().then(running => {
|
|
73
|
-
if (running) {
|
|
74
|
-
this.onHostedPluginRunning();
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
});
|
|
78
|
-
this.connectionStatusService.onStatusChange(() => this.onConnectionStatusChanged());
|
|
79
|
-
this.preferenceService.onPreferenceChanged(preference => this.onPreferencesChanged(preference));
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
82
|
-
console.error(`Need to load plugin ${pluginMetadata.model.id}`);
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Display status bar element for stopped plugin.
|
|
88
|
-
*/
|
|
89
|
-
async onHostedPluginStopped() {
|
|
90
|
-
this.pluginState = hosted_plugin_manager_client_1.HostedInstanceState.STOPPED;
|
|
91
|
-
this.entry = {
|
|
92
|
-
text: `${nls_1.nls.localize('theia/plugin-dev/hostedPluginStopped', 'Hosted Plugin: Stopped')} $(angle-up)`,
|
|
93
|
-
alignment: browser_1.StatusBarAlignment.LEFT,
|
|
94
|
-
priority: 100,
|
|
95
|
-
onclick: e => {
|
|
96
|
-
this.showMenu(e.clientX, e.clientY);
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
this.entry.className = HostedPluginController_1.HOSTED_PLUGIN;
|
|
100
|
-
await this.statusBar.setElement(HostedPluginController_1.HOSTED_PLUGIN, this.entry);
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Display status bar element for starting plugin.
|
|
104
|
-
*/
|
|
105
|
-
async onHostedPluginStarting() {
|
|
106
|
-
this.pluginState = hosted_plugin_manager_client_1.HostedInstanceState.STARTING;
|
|
107
|
-
this.hostedPluginLogViewer.showLogConsole();
|
|
108
|
-
this.entry = {
|
|
109
|
-
text: `$(cog~spin) ${nls_1.nls.localize('theia/plugin-dev/hostedPluginStarting', 'Hosted Plugin: Starting')}`,
|
|
110
|
-
alignment: browser_1.StatusBarAlignment.LEFT,
|
|
111
|
-
priority: 100
|
|
112
|
-
};
|
|
113
|
-
this.entry.className = HostedPluginController_1.HOSTED_PLUGIN;
|
|
114
|
-
await this.statusBar.setElement(HostedPluginController_1.HOSTED_PLUGIN, this.entry);
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* Display status bar element for running plugin.
|
|
118
|
-
*/
|
|
119
|
-
async onHostedPluginRunning() {
|
|
120
|
-
this.pluginState = hosted_plugin_manager_client_1.HostedInstanceState.RUNNING;
|
|
121
|
-
let entryText;
|
|
122
|
-
if (this.hostedPluginPreferences['hosted-plugin.watchMode'] && this.watcherSuccess) {
|
|
123
|
-
entryText = `$(cog~spin) ${nls_1.nls.localize('theia/plugin-dev/hostedPluginWatching', 'Hosted Plugin: Watching')}$(angle-up)`;
|
|
124
|
-
}
|
|
125
|
-
else {
|
|
126
|
-
entryText = `$(cog~spin) ${nls_1.nls.localize('theia/plugin-dev/hostedPluginRunning', 'Hosted Plugin: Running')} $(angle-up)`;
|
|
127
|
-
}
|
|
128
|
-
this.entry = {
|
|
129
|
-
text: entryText,
|
|
130
|
-
alignment: browser_1.StatusBarAlignment.LEFT,
|
|
131
|
-
priority: 100,
|
|
132
|
-
onclick: e => {
|
|
133
|
-
this.showMenu(e.clientX, e.clientY);
|
|
134
|
-
}
|
|
135
|
-
};
|
|
136
|
-
this.entry.className = HostedPluginController_1.HOSTED_PLUGIN;
|
|
137
|
-
await this.statusBar.setElement(HostedPluginController_1.HOSTED_PLUGIN, this.entry);
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* Display status bar element for failed plugin.
|
|
141
|
-
*/
|
|
142
|
-
async onHostedPluginFailed() {
|
|
143
|
-
this.pluginState = hosted_plugin_manager_client_1.HostedInstanceState.FAILED;
|
|
144
|
-
this.entry = {
|
|
145
|
-
text: `${nls_1.nls.localize('theia/plugin-dev/hostedPluginStopped', 'Hosted Plugin: Stopped')} $(angle-up)`,
|
|
146
|
-
alignment: browser_1.StatusBarAlignment.LEFT,
|
|
147
|
-
priority: 100,
|
|
148
|
-
onclick: e => {
|
|
149
|
-
this.showMenu(e.clientX, e.clientY);
|
|
150
|
-
}
|
|
151
|
-
};
|
|
152
|
-
this.entry.className = HostedPluginController_1.HOSTED_PLUGIN_FAILED;
|
|
153
|
-
await this.statusBar.setElement(HostedPluginController_1.HOSTED_PLUGIN, this.entry);
|
|
154
|
-
}
|
|
155
|
-
async onPreferencesChanged(preference) {
|
|
156
|
-
if (preference.preferenceName === 'hosted-plugin.watchMode') {
|
|
157
|
-
if (await this.hostedPluginServer.isHostedPluginInstanceRunning()) {
|
|
158
|
-
const pluginLocation = await this.hostedPluginServer.getHostedPluginURI();
|
|
159
|
-
const isWatchCompilationRunning = await this.hostedPluginServer.isWatchCompilationRunning(pluginLocation);
|
|
160
|
-
if (preference.newValue === true) {
|
|
161
|
-
if (!isWatchCompilationRunning) {
|
|
162
|
-
await this.runWatchCompilation(pluginLocation.toString());
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
else {
|
|
166
|
-
if (isWatchCompilationRunning) {
|
|
167
|
-
await this.hostedPluginServer.stopWatchCompilation(pluginLocation.toString());
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
// update status bar
|
|
171
|
-
this.onHostedPluginRunning();
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
/**
|
|
176
|
-
* Starts / stops watchers on hosted instance state change.
|
|
177
|
-
*
|
|
178
|
-
* @param event hosted instance state change event
|
|
179
|
-
*/
|
|
180
|
-
async handleWatchers(event) {
|
|
181
|
-
if (event.state === hosted_plugin_manager_client_1.HostedInstanceState.RUNNING) {
|
|
182
|
-
if (this.hostedPluginPreferences['hosted-plugin.watchMode']) {
|
|
183
|
-
await this.runWatchCompilation(event.pluginLocation.toString());
|
|
184
|
-
// update status bar
|
|
185
|
-
this.onHostedPluginRunning();
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
else if (event.state === hosted_plugin_manager_client_1.HostedInstanceState.STOPPING) {
|
|
189
|
-
if (this.hostedPluginPreferences['hosted-plugin.watchMode']) {
|
|
190
|
-
const isRunning = await this.hostedPluginServer.isWatchCompilationRunning(event.pluginLocation.toString());
|
|
191
|
-
if (isRunning) {
|
|
192
|
-
try {
|
|
193
|
-
await this.hostedPluginServer.stopWatchCompilation(event.pluginLocation.toString());
|
|
194
|
-
}
|
|
195
|
-
catch (error) {
|
|
196
|
-
this.messageService.error(this.getErrorMessage(error));
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
async runWatchCompilation(pluginLocation) {
|
|
203
|
-
try {
|
|
204
|
-
await this.hostedPluginServer.runWatchCompilation(pluginLocation);
|
|
205
|
-
this.watcherSuccess = true;
|
|
206
|
-
}
|
|
207
|
-
catch (error) {
|
|
208
|
-
this.messageService.error(this.getErrorMessage(error));
|
|
209
|
-
this.watcherSuccess = false;
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
213
|
-
getErrorMessage(error) {
|
|
214
|
-
var _a;
|
|
215
|
-
return ((_a = error === null || error === void 0 ? void 0 : error.message) === null || _a === void 0 ? void 0 : _a.substring(error.message.indexOf(':') + 1)) || '';
|
|
216
|
-
}
|
|
217
|
-
/**
|
|
218
|
-
* Updating status bar element when changing connection status.
|
|
219
|
-
*/
|
|
220
|
-
onConnectionStatusChanged() {
|
|
221
|
-
if (this.connectionStatusService.currentStatus === connection_status_service_1.ConnectionStatus.OFFLINE) {
|
|
222
|
-
// Re-set the element only if it's visible on status bar
|
|
223
|
-
if (this.entry) {
|
|
224
|
-
const offlineElement = {
|
|
225
|
-
text: nls_1.nls.localize('theia/plugin-dev/hostedPluginStopped', 'Hosted Plugin: Stopped'),
|
|
226
|
-
alignment: browser_1.StatusBarAlignment.LEFT,
|
|
227
|
-
priority: 100
|
|
228
|
-
};
|
|
229
|
-
this.entry.className = HostedPluginController_1.HOSTED_PLUGIN_OFFLINE;
|
|
230
|
-
this.statusBar.setElement(HostedPluginController_1.HOSTED_PLUGIN, offlineElement);
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
else {
|
|
234
|
-
// ask state of hosted plugin when switching to Online
|
|
235
|
-
if (this.entry) {
|
|
236
|
-
this.hostedPluginServer.isHostedPluginInstanceRunning().then(running => {
|
|
237
|
-
if (running) {
|
|
238
|
-
this.onHostedPluginRunning();
|
|
239
|
-
}
|
|
240
|
-
else {
|
|
241
|
-
this.onHostedPluginStopped();
|
|
242
|
-
}
|
|
243
|
-
});
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
/**
|
|
248
|
-
* Show menu containing actions to start/stop/restart hosted plugin.
|
|
249
|
-
*/
|
|
250
|
-
showMenu(x, y) {
|
|
251
|
-
const commands = new commands_1.CommandRegistry();
|
|
252
|
-
const menu = new widgets_1.Menu({
|
|
253
|
-
commands
|
|
254
|
-
});
|
|
255
|
-
if (this.pluginState === hosted_plugin_manager_client_1.HostedInstanceState.RUNNING) {
|
|
256
|
-
this.addCommandsForRunningPlugin(commands, menu);
|
|
257
|
-
}
|
|
258
|
-
else if (this.pluginState === hosted_plugin_manager_client_1.HostedInstanceState.STOPPED || this.pluginState === hosted_plugin_manager_client_1.HostedInstanceState.FAILED) {
|
|
259
|
-
this.addCommandsForStoppedPlugin(commands, menu);
|
|
260
|
-
}
|
|
261
|
-
menu.open(x, y);
|
|
262
|
-
}
|
|
263
|
-
/**
|
|
264
|
-
* Adds commands to the menu for running plugin.
|
|
265
|
-
*/
|
|
266
|
-
addCommandsForRunningPlugin(commands, menu) {
|
|
267
|
-
commands.addCommand(hosted_plugin_manager_client_1.HostedPluginCommands.STOP.id, {
|
|
268
|
-
label: nls_1.nls.localize('theia/plugin-dev/stopInstance', 'Stop Instance'),
|
|
269
|
-
icon: (0, browser_1.codicon)('debug-stop'),
|
|
270
|
-
execute: () => setTimeout(() => this.hostedPluginManagerClient.stop(), 100)
|
|
271
|
-
});
|
|
272
|
-
menu.addItem({
|
|
273
|
-
type: 'command',
|
|
274
|
-
command: hosted_plugin_manager_client_1.HostedPluginCommands.STOP.id
|
|
275
|
-
});
|
|
276
|
-
commands.addCommand(hosted_plugin_manager_client_1.HostedPluginCommands.RESTART.id, {
|
|
277
|
-
label: nls_1.nls.localize('theia/plugin-dev/restartInstance', 'Restart Instance'),
|
|
278
|
-
icon: (0, browser_1.codicon)('debug-restart'),
|
|
279
|
-
execute: () => setTimeout(() => this.hostedPluginManagerClient.restart(), 100)
|
|
280
|
-
});
|
|
281
|
-
menu.addItem({
|
|
282
|
-
type: 'command',
|
|
283
|
-
command: hosted_plugin_manager_client_1.HostedPluginCommands.RESTART.id
|
|
284
|
-
});
|
|
285
|
-
}
|
|
286
|
-
/**
|
|
287
|
-
* Adds command to the menu for stopped plugin.
|
|
288
|
-
*/
|
|
289
|
-
addCommandsForStoppedPlugin(commands, menu) {
|
|
290
|
-
commands.addCommand(hosted_plugin_manager_client_1.HostedPluginCommands.START.id, {
|
|
291
|
-
label: nls_1.nls.localize('theia/plugin-dev/startInstance', 'Start Instance'),
|
|
292
|
-
icon: (0, browser_1.codicon)('play'),
|
|
293
|
-
execute: () => setTimeout(() => this.hostedPluginManagerClient.start(), 100)
|
|
294
|
-
});
|
|
295
|
-
menu.addItem({
|
|
296
|
-
type: 'command',
|
|
297
|
-
command: hosted_plugin_manager_client_1.HostedPluginCommands.START.id
|
|
298
|
-
});
|
|
299
|
-
commands.addCommand(hosted_plugin_manager_client_1.HostedPluginCommands.DEBUG.id, {
|
|
300
|
-
label: nls_1.nls.localize('theia/plugin-dev/debugInstance', 'Debug Instance'),
|
|
301
|
-
icon: (0, browser_1.codicon)('debug'),
|
|
302
|
-
execute: () => setTimeout(() => this.hostedPluginManagerClient.debug(), 100)
|
|
303
|
-
});
|
|
304
|
-
menu.addItem({
|
|
305
|
-
type: 'command',
|
|
306
|
-
command: hosted_plugin_manager_client_1.HostedPluginCommands.DEBUG.id
|
|
307
|
-
});
|
|
308
|
-
}
|
|
309
|
-
};
|
|
310
|
-
HostedPluginController.HOSTED_PLUGIN = 'hosted-plugin';
|
|
311
|
-
HostedPluginController.HOSTED_PLUGIN_OFFLINE = 'hosted-plugin-offline';
|
|
312
|
-
HostedPluginController.HOSTED_PLUGIN_FAILED = 'hosted-plugin-failed';
|
|
313
|
-
__decorate([
|
|
314
|
-
(0, inversify_1.inject)(status_bar_1.StatusBar),
|
|
315
|
-
__metadata("design:type", Object)
|
|
316
|
-
], HostedPluginController.prototype, "statusBar", void 0);
|
|
317
|
-
__decorate([
|
|
318
|
-
(0, inversify_1.inject)(frontend_application_state_1.FrontendApplicationStateService),
|
|
319
|
-
__metadata("design:type", frontend_application_state_1.FrontendApplicationStateService)
|
|
320
|
-
], HostedPluginController.prototype, "frontendApplicationStateService", void 0);
|
|
321
|
-
__decorate([
|
|
322
|
-
(0, inversify_1.inject)(plugin_dev_protocol_1.PluginDevServer),
|
|
323
|
-
__metadata("design:type", Object)
|
|
324
|
-
], HostedPluginController.prototype, "hostedPluginServer", void 0);
|
|
325
|
-
__decorate([
|
|
326
|
-
(0, inversify_1.inject)(hosted_plugin_manager_client_1.HostedPluginManagerClient),
|
|
327
|
-
__metadata("design:type", hosted_plugin_manager_client_1.HostedPluginManagerClient)
|
|
328
|
-
], HostedPluginController.prototype, "hostedPluginManagerClient", void 0);
|
|
329
|
-
__decorate([
|
|
330
|
-
(0, inversify_1.inject)(connection_status_service_1.ConnectionStatusService),
|
|
331
|
-
__metadata("design:type", Object)
|
|
332
|
-
], HostedPluginController.prototype, "connectionStatusService", void 0);
|
|
333
|
-
__decorate([
|
|
334
|
-
(0, inversify_1.inject)(hosted_plugin_log_viewer_1.HostedPluginLogViewer),
|
|
335
|
-
__metadata("design:type", hosted_plugin_log_viewer_1.HostedPluginLogViewer)
|
|
336
|
-
], HostedPluginController.prototype, "hostedPluginLogViewer", void 0);
|
|
337
|
-
__decorate([
|
|
338
|
-
(0, inversify_1.inject)(hosted_plugin_preferences_1.HostedPluginPreferences),
|
|
339
|
-
__metadata("design:type", Object)
|
|
340
|
-
], HostedPluginController.prototype, "hostedPluginPreferences", void 0);
|
|
341
|
-
__decorate([
|
|
342
|
-
(0, inversify_1.inject)(browser_1.PreferenceServiceImpl),
|
|
343
|
-
__metadata("design:type", browser_1.PreferenceServiceImpl)
|
|
344
|
-
], HostedPluginController.prototype, "preferenceService", void 0);
|
|
345
|
-
__decorate([
|
|
346
|
-
(0, inversify_1.inject)(common_1.MessageService),
|
|
347
|
-
__metadata("design:type", common_1.MessageService)
|
|
348
|
-
], HostedPluginController.prototype, "messageService", void 0);
|
|
349
|
-
HostedPluginController = HostedPluginController_1 = __decorate([
|
|
350
|
-
(0, inversify_1.injectable)()
|
|
351
|
-
], HostedPluginController);
|
|
352
|
-
exports.HostedPluginController = HostedPluginController;
|
|
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 HostedPluginController_1;
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.HostedPluginController = 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 common_1 = require("@theia/core/lib/common");
|
|
33
|
+
const commands_1 = require("@theia/core/shared/@phosphor/commands");
|
|
34
|
+
const widgets_1 = require("@theia/core/shared/@phosphor/widgets");
|
|
35
|
+
const frontend_application_state_1 = require("@theia/core/lib/browser/frontend-application-state");
|
|
36
|
+
const connection_status_service_1 = require("@theia/core/lib/browser/connection-status-service");
|
|
37
|
+
const plugin_dev_protocol_1 = require("../common/plugin-dev-protocol");
|
|
38
|
+
const hosted_plugin_manager_client_1 = require("./hosted-plugin-manager-client");
|
|
39
|
+
const hosted_plugin_log_viewer_1 = require("./hosted-plugin-log-viewer");
|
|
40
|
+
const hosted_plugin_preferences_1 = require("./hosted-plugin-preferences");
|
|
41
|
+
const nls_1 = require("@theia/core/lib/common/nls");
|
|
42
|
+
/**
|
|
43
|
+
* Adds a status bar element displaying the state of secondary Theia instance with hosted plugin and
|
|
44
|
+
* allows controlling the instance by simple clicking on the status bar element.
|
|
45
|
+
*/
|
|
46
|
+
let HostedPluginController = HostedPluginController_1 = class HostedPluginController {
|
|
47
|
+
constructor() {
|
|
48
|
+
this.pluginState = hosted_plugin_manager_client_1.HostedInstanceState.STOPPED;
|
|
49
|
+
}
|
|
50
|
+
initialize() {
|
|
51
|
+
this.hostedPluginServer.getHostedPlugin().then(pluginMetadata => {
|
|
52
|
+
if (!pluginMetadata) {
|
|
53
|
+
this.frontendApplicationStateService.reachedState('ready').then(() => {
|
|
54
|
+
// handles status bar item
|
|
55
|
+
this.hostedPluginManagerClient.onStateChanged(e => {
|
|
56
|
+
if (e.state === hosted_plugin_manager_client_1.HostedInstanceState.STARTING) {
|
|
57
|
+
this.onHostedPluginStarting();
|
|
58
|
+
}
|
|
59
|
+
else if (e.state === hosted_plugin_manager_client_1.HostedInstanceState.RUNNING) {
|
|
60
|
+
this.onHostedPluginRunning();
|
|
61
|
+
}
|
|
62
|
+
else if (e.state === hosted_plugin_manager_client_1.HostedInstanceState.STOPPED) {
|
|
63
|
+
this.onHostedPluginStopped();
|
|
64
|
+
}
|
|
65
|
+
else if (e.state === hosted_plugin_manager_client_1.HostedInstanceState.FAILED) {
|
|
66
|
+
this.onHostedPluginFailed();
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
// handles watch compilation
|
|
70
|
+
this.hostedPluginManagerClient.onStateChanged(e => this.handleWatchers(e));
|
|
71
|
+
// updates status bar if page is loading when hosted instance is already running
|
|
72
|
+
this.hostedPluginServer.isHostedPluginInstanceRunning().then(running => {
|
|
73
|
+
if (running) {
|
|
74
|
+
this.onHostedPluginRunning();
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
this.connectionStatusService.onStatusChange(() => this.onConnectionStatusChanged());
|
|
79
|
+
this.preferenceService.onPreferenceChanged(preference => this.onPreferencesChanged(preference));
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
console.error(`Need to load plugin ${pluginMetadata.model.id}`);
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Display status bar element for stopped plugin.
|
|
88
|
+
*/
|
|
89
|
+
async onHostedPluginStopped() {
|
|
90
|
+
this.pluginState = hosted_plugin_manager_client_1.HostedInstanceState.STOPPED;
|
|
91
|
+
this.entry = {
|
|
92
|
+
text: `${nls_1.nls.localize('theia/plugin-dev/hostedPluginStopped', 'Hosted Plugin: Stopped')} $(angle-up)`,
|
|
93
|
+
alignment: browser_1.StatusBarAlignment.LEFT,
|
|
94
|
+
priority: 100,
|
|
95
|
+
onclick: e => {
|
|
96
|
+
this.showMenu(e.clientX, e.clientY);
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
this.entry.className = HostedPluginController_1.HOSTED_PLUGIN;
|
|
100
|
+
await this.statusBar.setElement(HostedPluginController_1.HOSTED_PLUGIN, this.entry);
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Display status bar element for starting plugin.
|
|
104
|
+
*/
|
|
105
|
+
async onHostedPluginStarting() {
|
|
106
|
+
this.pluginState = hosted_plugin_manager_client_1.HostedInstanceState.STARTING;
|
|
107
|
+
this.hostedPluginLogViewer.showLogConsole();
|
|
108
|
+
this.entry = {
|
|
109
|
+
text: `$(cog~spin) ${nls_1.nls.localize('theia/plugin-dev/hostedPluginStarting', 'Hosted Plugin: Starting')}`,
|
|
110
|
+
alignment: browser_1.StatusBarAlignment.LEFT,
|
|
111
|
+
priority: 100
|
|
112
|
+
};
|
|
113
|
+
this.entry.className = HostedPluginController_1.HOSTED_PLUGIN;
|
|
114
|
+
await this.statusBar.setElement(HostedPluginController_1.HOSTED_PLUGIN, this.entry);
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Display status bar element for running plugin.
|
|
118
|
+
*/
|
|
119
|
+
async onHostedPluginRunning() {
|
|
120
|
+
this.pluginState = hosted_plugin_manager_client_1.HostedInstanceState.RUNNING;
|
|
121
|
+
let entryText;
|
|
122
|
+
if (this.hostedPluginPreferences['hosted-plugin.watchMode'] && this.watcherSuccess) {
|
|
123
|
+
entryText = `$(cog~spin) ${nls_1.nls.localize('theia/plugin-dev/hostedPluginWatching', 'Hosted Plugin: Watching')}$(angle-up)`;
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
entryText = `$(cog~spin) ${nls_1.nls.localize('theia/plugin-dev/hostedPluginRunning', 'Hosted Plugin: Running')} $(angle-up)`;
|
|
127
|
+
}
|
|
128
|
+
this.entry = {
|
|
129
|
+
text: entryText,
|
|
130
|
+
alignment: browser_1.StatusBarAlignment.LEFT,
|
|
131
|
+
priority: 100,
|
|
132
|
+
onclick: e => {
|
|
133
|
+
this.showMenu(e.clientX, e.clientY);
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
this.entry.className = HostedPluginController_1.HOSTED_PLUGIN;
|
|
137
|
+
await this.statusBar.setElement(HostedPluginController_1.HOSTED_PLUGIN, this.entry);
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Display status bar element for failed plugin.
|
|
141
|
+
*/
|
|
142
|
+
async onHostedPluginFailed() {
|
|
143
|
+
this.pluginState = hosted_plugin_manager_client_1.HostedInstanceState.FAILED;
|
|
144
|
+
this.entry = {
|
|
145
|
+
text: `${nls_1.nls.localize('theia/plugin-dev/hostedPluginStopped', 'Hosted Plugin: Stopped')} $(angle-up)`,
|
|
146
|
+
alignment: browser_1.StatusBarAlignment.LEFT,
|
|
147
|
+
priority: 100,
|
|
148
|
+
onclick: e => {
|
|
149
|
+
this.showMenu(e.clientX, e.clientY);
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
this.entry.className = HostedPluginController_1.HOSTED_PLUGIN_FAILED;
|
|
153
|
+
await this.statusBar.setElement(HostedPluginController_1.HOSTED_PLUGIN, this.entry);
|
|
154
|
+
}
|
|
155
|
+
async onPreferencesChanged(preference) {
|
|
156
|
+
if (preference.preferenceName === 'hosted-plugin.watchMode') {
|
|
157
|
+
if (await this.hostedPluginServer.isHostedPluginInstanceRunning()) {
|
|
158
|
+
const pluginLocation = await this.hostedPluginServer.getHostedPluginURI();
|
|
159
|
+
const isWatchCompilationRunning = await this.hostedPluginServer.isWatchCompilationRunning(pluginLocation);
|
|
160
|
+
if (preference.newValue === true) {
|
|
161
|
+
if (!isWatchCompilationRunning) {
|
|
162
|
+
await this.runWatchCompilation(pluginLocation.toString());
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
if (isWatchCompilationRunning) {
|
|
167
|
+
await this.hostedPluginServer.stopWatchCompilation(pluginLocation.toString());
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
// update status bar
|
|
171
|
+
this.onHostedPluginRunning();
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Starts / stops watchers on hosted instance state change.
|
|
177
|
+
*
|
|
178
|
+
* @param event hosted instance state change event
|
|
179
|
+
*/
|
|
180
|
+
async handleWatchers(event) {
|
|
181
|
+
if (event.state === hosted_plugin_manager_client_1.HostedInstanceState.RUNNING) {
|
|
182
|
+
if (this.hostedPluginPreferences['hosted-plugin.watchMode']) {
|
|
183
|
+
await this.runWatchCompilation(event.pluginLocation.toString());
|
|
184
|
+
// update status bar
|
|
185
|
+
this.onHostedPluginRunning();
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
else if (event.state === hosted_plugin_manager_client_1.HostedInstanceState.STOPPING) {
|
|
189
|
+
if (this.hostedPluginPreferences['hosted-plugin.watchMode']) {
|
|
190
|
+
const isRunning = await this.hostedPluginServer.isWatchCompilationRunning(event.pluginLocation.toString());
|
|
191
|
+
if (isRunning) {
|
|
192
|
+
try {
|
|
193
|
+
await this.hostedPluginServer.stopWatchCompilation(event.pluginLocation.toString());
|
|
194
|
+
}
|
|
195
|
+
catch (error) {
|
|
196
|
+
this.messageService.error(this.getErrorMessage(error));
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
async runWatchCompilation(pluginLocation) {
|
|
203
|
+
try {
|
|
204
|
+
await this.hostedPluginServer.runWatchCompilation(pluginLocation);
|
|
205
|
+
this.watcherSuccess = true;
|
|
206
|
+
}
|
|
207
|
+
catch (error) {
|
|
208
|
+
this.messageService.error(this.getErrorMessage(error));
|
|
209
|
+
this.watcherSuccess = false;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
213
|
+
getErrorMessage(error) {
|
|
214
|
+
var _a;
|
|
215
|
+
return ((_a = error === null || error === void 0 ? void 0 : error.message) === null || _a === void 0 ? void 0 : _a.substring(error.message.indexOf(':') + 1)) || '';
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Updating status bar element when changing connection status.
|
|
219
|
+
*/
|
|
220
|
+
onConnectionStatusChanged() {
|
|
221
|
+
if (this.connectionStatusService.currentStatus === connection_status_service_1.ConnectionStatus.OFFLINE) {
|
|
222
|
+
// Re-set the element only if it's visible on status bar
|
|
223
|
+
if (this.entry) {
|
|
224
|
+
const offlineElement = {
|
|
225
|
+
text: nls_1.nls.localize('theia/plugin-dev/hostedPluginStopped', 'Hosted Plugin: Stopped'),
|
|
226
|
+
alignment: browser_1.StatusBarAlignment.LEFT,
|
|
227
|
+
priority: 100
|
|
228
|
+
};
|
|
229
|
+
this.entry.className = HostedPluginController_1.HOSTED_PLUGIN_OFFLINE;
|
|
230
|
+
this.statusBar.setElement(HostedPluginController_1.HOSTED_PLUGIN, offlineElement);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
else {
|
|
234
|
+
// ask state of hosted plugin when switching to Online
|
|
235
|
+
if (this.entry) {
|
|
236
|
+
this.hostedPluginServer.isHostedPluginInstanceRunning().then(running => {
|
|
237
|
+
if (running) {
|
|
238
|
+
this.onHostedPluginRunning();
|
|
239
|
+
}
|
|
240
|
+
else {
|
|
241
|
+
this.onHostedPluginStopped();
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Show menu containing actions to start/stop/restart hosted plugin.
|
|
249
|
+
*/
|
|
250
|
+
showMenu(x, y) {
|
|
251
|
+
const commands = new commands_1.CommandRegistry();
|
|
252
|
+
const menu = new widgets_1.Menu({
|
|
253
|
+
commands
|
|
254
|
+
});
|
|
255
|
+
if (this.pluginState === hosted_plugin_manager_client_1.HostedInstanceState.RUNNING) {
|
|
256
|
+
this.addCommandsForRunningPlugin(commands, menu);
|
|
257
|
+
}
|
|
258
|
+
else if (this.pluginState === hosted_plugin_manager_client_1.HostedInstanceState.STOPPED || this.pluginState === hosted_plugin_manager_client_1.HostedInstanceState.FAILED) {
|
|
259
|
+
this.addCommandsForStoppedPlugin(commands, menu);
|
|
260
|
+
}
|
|
261
|
+
menu.open(x, y);
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Adds commands to the menu for running plugin.
|
|
265
|
+
*/
|
|
266
|
+
addCommandsForRunningPlugin(commands, menu) {
|
|
267
|
+
commands.addCommand(hosted_plugin_manager_client_1.HostedPluginCommands.STOP.id, {
|
|
268
|
+
label: nls_1.nls.localize('theia/plugin-dev/stopInstance', 'Stop Instance'),
|
|
269
|
+
icon: (0, browser_1.codicon)('debug-stop'),
|
|
270
|
+
execute: () => setTimeout(() => this.hostedPluginManagerClient.stop(), 100)
|
|
271
|
+
});
|
|
272
|
+
menu.addItem({
|
|
273
|
+
type: 'command',
|
|
274
|
+
command: hosted_plugin_manager_client_1.HostedPluginCommands.STOP.id
|
|
275
|
+
});
|
|
276
|
+
commands.addCommand(hosted_plugin_manager_client_1.HostedPluginCommands.RESTART.id, {
|
|
277
|
+
label: nls_1.nls.localize('theia/plugin-dev/restartInstance', 'Restart Instance'),
|
|
278
|
+
icon: (0, browser_1.codicon)('debug-restart'),
|
|
279
|
+
execute: () => setTimeout(() => this.hostedPluginManagerClient.restart(), 100)
|
|
280
|
+
});
|
|
281
|
+
menu.addItem({
|
|
282
|
+
type: 'command',
|
|
283
|
+
command: hosted_plugin_manager_client_1.HostedPluginCommands.RESTART.id
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* Adds command to the menu for stopped plugin.
|
|
288
|
+
*/
|
|
289
|
+
addCommandsForStoppedPlugin(commands, menu) {
|
|
290
|
+
commands.addCommand(hosted_plugin_manager_client_1.HostedPluginCommands.START.id, {
|
|
291
|
+
label: nls_1.nls.localize('theia/plugin-dev/startInstance', 'Start Instance'),
|
|
292
|
+
icon: (0, browser_1.codicon)('play'),
|
|
293
|
+
execute: () => setTimeout(() => this.hostedPluginManagerClient.start(), 100)
|
|
294
|
+
});
|
|
295
|
+
menu.addItem({
|
|
296
|
+
type: 'command',
|
|
297
|
+
command: hosted_plugin_manager_client_1.HostedPluginCommands.START.id
|
|
298
|
+
});
|
|
299
|
+
commands.addCommand(hosted_plugin_manager_client_1.HostedPluginCommands.DEBUG.id, {
|
|
300
|
+
label: nls_1.nls.localize('theia/plugin-dev/debugInstance', 'Debug Instance'),
|
|
301
|
+
icon: (0, browser_1.codicon)('debug'),
|
|
302
|
+
execute: () => setTimeout(() => this.hostedPluginManagerClient.debug(), 100)
|
|
303
|
+
});
|
|
304
|
+
menu.addItem({
|
|
305
|
+
type: 'command',
|
|
306
|
+
command: hosted_plugin_manager_client_1.HostedPluginCommands.DEBUG.id
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
};
|
|
310
|
+
HostedPluginController.HOSTED_PLUGIN = 'hosted-plugin';
|
|
311
|
+
HostedPluginController.HOSTED_PLUGIN_OFFLINE = 'hosted-plugin-offline';
|
|
312
|
+
HostedPluginController.HOSTED_PLUGIN_FAILED = 'hosted-plugin-failed';
|
|
313
|
+
__decorate([
|
|
314
|
+
(0, inversify_1.inject)(status_bar_1.StatusBar),
|
|
315
|
+
__metadata("design:type", Object)
|
|
316
|
+
], HostedPluginController.prototype, "statusBar", void 0);
|
|
317
|
+
__decorate([
|
|
318
|
+
(0, inversify_1.inject)(frontend_application_state_1.FrontendApplicationStateService),
|
|
319
|
+
__metadata("design:type", frontend_application_state_1.FrontendApplicationStateService)
|
|
320
|
+
], HostedPluginController.prototype, "frontendApplicationStateService", void 0);
|
|
321
|
+
__decorate([
|
|
322
|
+
(0, inversify_1.inject)(plugin_dev_protocol_1.PluginDevServer),
|
|
323
|
+
__metadata("design:type", Object)
|
|
324
|
+
], HostedPluginController.prototype, "hostedPluginServer", void 0);
|
|
325
|
+
__decorate([
|
|
326
|
+
(0, inversify_1.inject)(hosted_plugin_manager_client_1.HostedPluginManagerClient),
|
|
327
|
+
__metadata("design:type", hosted_plugin_manager_client_1.HostedPluginManagerClient)
|
|
328
|
+
], HostedPluginController.prototype, "hostedPluginManagerClient", void 0);
|
|
329
|
+
__decorate([
|
|
330
|
+
(0, inversify_1.inject)(connection_status_service_1.ConnectionStatusService),
|
|
331
|
+
__metadata("design:type", Object)
|
|
332
|
+
], HostedPluginController.prototype, "connectionStatusService", void 0);
|
|
333
|
+
__decorate([
|
|
334
|
+
(0, inversify_1.inject)(hosted_plugin_log_viewer_1.HostedPluginLogViewer),
|
|
335
|
+
__metadata("design:type", hosted_plugin_log_viewer_1.HostedPluginLogViewer)
|
|
336
|
+
], HostedPluginController.prototype, "hostedPluginLogViewer", void 0);
|
|
337
|
+
__decorate([
|
|
338
|
+
(0, inversify_1.inject)(hosted_plugin_preferences_1.HostedPluginPreferences),
|
|
339
|
+
__metadata("design:type", Object)
|
|
340
|
+
], HostedPluginController.prototype, "hostedPluginPreferences", void 0);
|
|
341
|
+
__decorate([
|
|
342
|
+
(0, inversify_1.inject)(browser_1.PreferenceServiceImpl),
|
|
343
|
+
__metadata("design:type", browser_1.PreferenceServiceImpl)
|
|
344
|
+
], HostedPluginController.prototype, "preferenceService", void 0);
|
|
345
|
+
__decorate([
|
|
346
|
+
(0, inversify_1.inject)(common_1.MessageService),
|
|
347
|
+
__metadata("design:type", common_1.MessageService)
|
|
348
|
+
], HostedPluginController.prototype, "messageService", void 0);
|
|
349
|
+
HostedPluginController = HostedPluginController_1 = __decorate([
|
|
350
|
+
(0, inversify_1.injectable)()
|
|
351
|
+
], HostedPluginController);
|
|
352
|
+
exports.HostedPluginController = HostedPluginController;
|
|
353
353
|
//# sourceMappingURL=hosted-plugin-controller.js.map
|