@theia/plugin-ext 1.28.0-next.7 → 1.28.0
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/lib/common/plugin-api-rpc-model.d.ts +1 -0
- package/lib/common/plugin-api-rpc-model.d.ts.map +1 -1
- package/lib/common/plugin-api-rpc-model.js.map +1 -1
- package/lib/common/plugin-api-rpc.d.ts +3 -0
- package/lib/common/plugin-api-rpc.d.ts.map +1 -1
- package/lib/common/plugin-api-rpc.js.map +1 -1
- package/lib/common/plugin-protocol.d.ts +4 -0
- package/lib/common/plugin-protocol.d.ts.map +1 -1
- package/lib/common/plugin-protocol.js.map +1 -1
- package/lib/hosted/browser/hosted-plugin.d.ts.map +1 -1
- package/lib/hosted/browser/hosted-plugin.js +4 -2
- package/lib/hosted/browser/hosted-plugin.js.map +1 -1
- package/lib/hosted/browser/worker/worker-env-ext.d.ts +1 -0
- package/lib/hosted/browser/worker/worker-env-ext.d.ts.map +1 -1
- package/lib/hosted/browser/worker/worker-env-ext.js +3 -0
- package/lib/hosted/browser/worker/worker-env-ext.js.map +1 -1
- package/lib/hosted/node/scanners/scanner-theia.d.ts +5 -1
- package/lib/hosted/node/scanners/scanner-theia.d.ts.map +1 -1
- package/lib/hosted/node/scanners/scanner-theia.js +22 -15
- package/lib/hosted/node/scanners/scanner-theia.js.map +1 -1
- package/lib/main/browser/comments/comment-thread-widget.js +5 -5
- package/lib/main/browser/comments/comment-thread-widget.js.map +1 -1
- package/lib/main/browser/debug/debug-main.d.ts +1 -0
- package/lib/main/browser/debug/debug-main.d.ts.map +1 -1
- package/lib/main/browser/debug/debug-main.js +10 -0
- package/lib/main/browser/debug/debug-main.js.map +1 -1
- package/lib/main/browser/languages-main.d.ts.map +1 -1
- package/lib/main/browser/languages-main.js.map +1 -1
- package/lib/main/browser/menus/menus-contribution-handler.d.ts +24 -88
- package/lib/main/browser/menus/menus-contribution-handler.d.ts.map +1 -1
- package/lib/main/browser/menus/menus-contribution-handler.js +108 -518
- package/lib/main/browser/menus/menus-contribution-handler.js.map +1 -1
- package/lib/main/browser/menus/plugin-menu-command-adapter.d.ts +44 -0
- package/lib/main/browser/menus/plugin-menu-command-adapter.d.ts.map +1 -0
- package/lib/main/browser/menus/plugin-menu-command-adapter.js +274 -0
- package/lib/main/browser/menus/plugin-menu-command-adapter.js.map +1 -0
- package/lib/main/browser/menus/vscode-theia-menu-mappings.d.ts +18 -0
- package/lib/main/browser/menus/vscode-theia-menu-mappings.d.ts.map +1 -0
- package/lib/main/browser/menus/vscode-theia-menu-mappings.js +88 -0
- package/lib/main/browser/menus/vscode-theia-menu-mappings.js.map +1 -0
- package/lib/main/browser/plugin-contribution-handler.d.ts.map +1 -1
- package/lib/main/browser/plugin-contribution-handler.js +9 -4
- package/lib/main/browser/plugin-contribution-handler.js.map +1 -1
- package/lib/main/browser/plugin-ext-frontend-module.d.ts.map +1 -1
- package/lib/main/browser/plugin-ext-frontend-module.js +4 -3
- package/lib/main/browser/plugin-ext-frontend-module.js.map +1 -1
- package/lib/main/browser/plugin-frontend-contribution.d.ts +0 -2
- package/lib/main/browser/plugin-frontend-contribution.d.ts.map +1 -1
- package/lib/main/browser/plugin-frontend-contribution.js +0 -8
- package/lib/main/browser/plugin-frontend-contribution.js.map +1 -1
- package/lib/main/browser/plugin-shared-style.d.ts.map +1 -1
- package/lib/main/browser/plugin-shared-style.js +0 -1
- package/lib/main/browser/plugin-shared-style.js.map +1 -1
- package/lib/main/browser/scm-main.d.ts +1 -0
- package/lib/main/browser/scm-main.d.ts.map +1 -1
- package/lib/main/browser/scm-main.js +7 -0
- package/lib/main/browser/scm-main.js.map +1 -1
- package/lib/main/browser/view/tree-view-widget.js +2 -2
- package/lib/main/browser/view/tree-view-widget.js.map +1 -1
- package/lib/main/node/handlers/plugin-theia-file-handler.d.ts +0 -4
- package/lib/main/node/handlers/plugin-theia-file-handler.d.ts.map +1 -1
- package/lib/main/node/handlers/plugin-theia-file-handler.js +0 -26
- package/lib/main/node/handlers/plugin-theia-file-handler.js.map +1 -1
- package/lib/main/node/plugin-ext-backend-module.d.ts.map +1 -1
- package/lib/main/node/plugin-ext-backend-module.js +0 -2
- package/lib/main/node/plugin-ext-backend-module.js.map +1 -1
- package/lib/main/node/resolvers/local-plugin-deployer-resolver.d.ts.map +1 -1
- package/lib/main/node/resolvers/local-plugin-deployer-resolver.js.map +1 -1
- package/lib/plugin/debug/debug-ext.d.ts +3 -1
- package/lib/plugin/debug/debug-ext.d.ts.map +1 -1
- package/lib/plugin/debug/debug-ext.js +26 -4
- package/lib/plugin/debug/debug-ext.js.map +1 -1
- package/lib/plugin/debug/plugin-debug-adapter-session.d.ts +1 -0
- package/lib/plugin/debug/plugin-debug-adapter-session.d.ts.map +1 -1
- package/lib/plugin/debug/plugin-debug-adapter-session.js +3 -0
- package/lib/plugin/debug/plugin-debug-adapter-session.js.map +1 -1
- package/lib/plugin/env.d.ts +11 -0
- package/lib/plugin/env.d.ts.map +1 -1
- package/lib/plugin/env.js +20 -0
- package/lib/plugin/env.js.map +1 -1
- package/lib/plugin/languages/signature.d.ts.map +1 -1
- package/lib/plugin/languages/signature.js +5 -1
- package/lib/plugin/languages/signature.js.map +1 -1
- package/lib/plugin/node/debug/debug.spec.d.ts +2 -0
- package/lib/plugin/node/debug/debug.spec.d.ts.map +1 -0
- package/lib/plugin/node/debug/debug.spec.js +68 -0
- package/lib/plugin/node/debug/debug.spec.js.map +1 -0
- package/lib/plugin/node/env-node-ext.d.ts +3 -0
- package/lib/plugin/node/env-node-ext.d.ts.map +1 -1
- package/lib/plugin/node/env-node-ext.js +11 -0
- package/lib/plugin/node/env-node-ext.js.map +1 -1
- package/lib/plugin/plugin-context.d.ts.map +1 -1
- package/lib/plugin/plugin-context.js +10 -0
- package/lib/plugin/plugin-context.js.map +1 -1
- package/lib/plugin/plugin-manager.d.ts.map +1 -1
- package/lib/plugin/plugin-manager.js +1 -0
- package/lib/plugin/plugin-manager.js.map +1 -1
- package/lib/plugin/quick-open.d.ts.map +1 -1
- package/lib/plugin/quick-open.js +1 -0
- package/lib/plugin/quick-open.js.map +1 -1
- package/lib/plugin/scm.d.ts +3 -0
- package/lib/plugin/scm.d.ts.map +1 -1
- package/lib/plugin/scm.js +8 -0
- package/lib/plugin/scm.js.map +1 -1
- package/lib/plugin/type-converters.d.ts.map +1 -1
- package/lib/plugin/type-converters.js +4 -2
- package/lib/plugin/type-converters.js.map +1 -1
- package/lib/plugin/types-impl.d.ts +4 -3
- package/lib/plugin/types-impl.d.ts.map +1 -1
- package/lib/plugin/types-impl.js +9 -8
- package/lib/plugin/types-impl.js.map +1 -1
- package/package.json +27 -27
- package/src/common/plugin-api-rpc-model.ts +1 -0
- package/src/common/plugin-api-rpc.ts +3 -0
- package/src/common/plugin-protocol.ts +4 -0
- package/src/hosted/browser/hosted-plugin.ts +4 -2
- package/src/hosted/browser/worker/worker-env-ext.ts +4 -0
- package/src/hosted/node/scanners/scanner-theia.ts +21 -15
- package/src/main/browser/comments/comment-thread-widget.tsx +5 -5
- package/src/main/browser/debug/debug-main.ts +9 -0
- package/src/main/browser/languages-main.ts +5 -0
- package/src/main/browser/menus/menus-contribution-handler.ts +104 -578
- package/src/main/browser/menus/plugin-menu-command-adapter.ts +259 -0
- package/src/main/browser/menus/vscode-theia-menu-mappings.ts +85 -0
- package/src/main/browser/plugin-contribution-handler.ts +3 -1
- package/src/main/browser/plugin-ext-frontend-module.ts +4 -3
- package/src/main/browser/plugin-frontend-contribution.ts +0 -9
- package/src/main/browser/plugin-shared-style.ts +0 -1
- package/src/main/browser/scm-main.ts +10 -0
- package/src/main/browser/view/tree-view-widget.tsx +2 -2
- package/src/main/node/handlers/plugin-theia-file-handler.ts +0 -26
- package/src/main/node/plugin-ext-backend-module.ts +0 -2
- package/src/main/node/resolvers/local-plugin-deployer-resolver.ts +4 -8
- package/src/plugin/debug/debug-ext.ts +30 -5
- package/src/plugin/debug/plugin-debug-adapter-session.ts +4 -0
- package/src/plugin/env.ts +30 -0
- package/src/plugin/languages/signature.ts +3 -1
- package/src/plugin/node/debug/debug.spec.ts +94 -0
- package/src/plugin/node/env-node-ext.ts +13 -1
- package/src/plugin/plugin-context.ts +10 -0
- package/src/plugin/plugin-manager.ts +1 -0
- package/src/plugin/quick-open.ts +1 -0
- package/src/plugin/scm.ts +11 -0
- package/src/plugin/type-converters.ts +4 -2
- package/src/plugin/types-impl.ts +7 -5
- package/lib/main/browser/plugin-ext-deploy-command.d.ts +0 -10
- package/lib/main/browser/plugin-ext-deploy-command.d.ts.map +0 -1
- package/lib/main/browser/plugin-ext-deploy-command.js +0 -64
- package/lib/main/browser/plugin-ext-deploy-command.js.map +0 -1
- package/lib/main/node/resolvers/local-file-plugin-deployer-resolver.d.ts +0 -8
- package/lib/main/node/resolvers/local-file-plugin-deployer-resolver.d.ts.map +0 -1
- package/lib/main/node/resolvers/local-file-plugin-deployer-resolver.js +0 -43
- package/lib/main/node/resolvers/local-file-plugin-deployer-resolver.js.map +0 -1
- package/src/main/browser/plugin-ext-deploy-command.ts +0 -50
- package/src/main/node/resolvers/local-file-plugin-deployer-resolver.ts +0 -34
package/src/plugin/env.ts
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
|
+
import { Emitter, Event } from '@theia/core/lib/common/event';
|
|
17
18
|
import * as theia from '@theia/plugin';
|
|
18
19
|
import { RPCProtocol } from '../common/rpc-protocol';
|
|
19
20
|
import { EnvMain, PLUGIN_RPC_CONTEXT } from '../common/plugin-api-rpc';
|
|
@@ -29,11 +30,18 @@ export abstract class EnvExtImpl {
|
|
|
29
30
|
private ui: theia.UIKind;
|
|
30
31
|
private envMachineId: string;
|
|
31
32
|
private envSessionId: string;
|
|
33
|
+
private host: string;
|
|
34
|
+
private _isTelemetryEnabled: boolean;
|
|
35
|
+
private _remoteName: string | undefined;
|
|
36
|
+
private onDidChangeTelemetryEnabledEmitter = new Emitter<boolean>();
|
|
32
37
|
|
|
33
38
|
constructor(rpc: RPCProtocol) {
|
|
34
39
|
this.proxy = rpc.getProxy(PLUGIN_RPC_CONTEXT.ENV_MAIN);
|
|
35
40
|
this.envSessionId = v4();
|
|
36
41
|
this.envMachineId = v4();
|
|
42
|
+
// we don't support telemetry at the moment
|
|
43
|
+
this._isTelemetryEnabled = false;
|
|
44
|
+
this._remoteName = undefined;
|
|
37
45
|
}
|
|
38
46
|
|
|
39
47
|
getEnvVariable(envVarName: string): Promise<string | undefined> {
|
|
@@ -73,6 +81,10 @@ export abstract class EnvExtImpl {
|
|
|
73
81
|
this.ui = uiKind;
|
|
74
82
|
}
|
|
75
83
|
|
|
84
|
+
setAppHost(appHost: string): void {
|
|
85
|
+
this.host = appHost;
|
|
86
|
+
}
|
|
87
|
+
|
|
76
88
|
getClientOperatingSystem(): Promise<theia.OperatingSystem> {
|
|
77
89
|
return this.proxy.$getClientOperatingSystem();
|
|
78
90
|
}
|
|
@@ -83,6 +95,24 @@ export abstract class EnvExtImpl {
|
|
|
83
95
|
|
|
84
96
|
abstract get appRoot(): string;
|
|
85
97
|
|
|
98
|
+
abstract get isNewAppInstall(): boolean;
|
|
99
|
+
|
|
100
|
+
get appHost(): string {
|
|
101
|
+
return this.host;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
get isTelemetryEnabled(): boolean {
|
|
105
|
+
return this._isTelemetryEnabled;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
get onDidChangeTelemetryEnabled(): Event<boolean> {
|
|
109
|
+
return this.onDidChangeTelemetryEnabledEmitter.event;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
get remoteName(): string | undefined {
|
|
113
|
+
return this._remoteName;
|
|
114
|
+
}
|
|
115
|
+
|
|
86
116
|
get language(): string {
|
|
87
117
|
return this.lang;
|
|
88
118
|
}
|
|
@@ -52,6 +52,7 @@ export class SignatureHelpAdapter {
|
|
|
52
52
|
if (!value) {
|
|
53
53
|
return undefined;
|
|
54
54
|
}
|
|
55
|
+
value.activeParameter = value.signatures[value.activeSignature].activeParameter ?? value.activeParameter;
|
|
55
56
|
const id = this.idSequence++;
|
|
56
57
|
this.cache.set(id, value);
|
|
57
58
|
return Converter.SignatureHelp.from(id, value);
|
|
@@ -65,7 +66,8 @@ export class SignatureHelpAdapter {
|
|
|
65
66
|
if (saved) {
|
|
66
67
|
activeSignatureHelp = saved;
|
|
67
68
|
activeSignatureHelp.activeSignature = revivedSignatureHelp.activeSignature;
|
|
68
|
-
|
|
69
|
+
const { activeSignature } = revivedSignatureHelp;
|
|
70
|
+
activeSignatureHelp.activeParameter = revivedSignatureHelp.signatures[activeSignature].activeParameter ?? revivedSignatureHelp.activeParameter;
|
|
69
71
|
} else {
|
|
70
72
|
activeSignatureHelp = revivedSignatureHelp;
|
|
71
73
|
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (C) 2022 STMicroelectronics and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
*
|
|
8
|
+
* This Source Code may also be made available under the following Secondary
|
|
9
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
* with the GNU Classpath Exception which is available at
|
|
12
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
*
|
|
14
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
********************************************************************************/
|
|
16
|
+
import { DebugSession } from '@theia/plugin';
|
|
17
|
+
import * as chai from 'chai';
|
|
18
|
+
import { ProxyIdentifier, RPCProtocol } from '../../../common/rpc-protocol';
|
|
19
|
+
|
|
20
|
+
import { DebugExtImpl } from '../../debug/debug-ext';
|
|
21
|
+
|
|
22
|
+
const expect = chai.expect;
|
|
23
|
+
|
|
24
|
+
describe('Debug API', () => {
|
|
25
|
+
|
|
26
|
+
describe('#asDebugSourceURI', () => {
|
|
27
|
+
|
|
28
|
+
const mockRPCProtocol: RPCProtocol = {
|
|
29
|
+
getProxy<T>(_proxyId: ProxyIdentifier<T>): T {
|
|
30
|
+
return {} as T;
|
|
31
|
+
},
|
|
32
|
+
set<T, R extends T>(_id: ProxyIdentifier<T>, instance: R): R {
|
|
33
|
+
return instance;
|
|
34
|
+
},
|
|
35
|
+
dispose(): void {
|
|
36
|
+
// Nothing
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const debug = new DebugExtImpl(mockRPCProtocol);
|
|
41
|
+
|
|
42
|
+
it('should use sourceReference, path and sessionId', () => {
|
|
43
|
+
const source = {
|
|
44
|
+
sourceReference: 3,
|
|
45
|
+
path: 'test/path'
|
|
46
|
+
};
|
|
47
|
+
const session = { id: 'test-session' } as DebugSession;
|
|
48
|
+
const uri = debug.asDebugSourceUri(source, session);
|
|
49
|
+
expect(uri.toString(true)).to.be.equal('debug:test/path?ref=3&session=test-session');
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
it('should use sourceReference', () => {
|
|
53
|
+
const source = {
|
|
54
|
+
sourceReference: 5
|
|
55
|
+
};
|
|
56
|
+
const uri = debug.asDebugSourceUri(source);
|
|
57
|
+
expect(uri.toString(true)).to.be.equal('debug:?ref=5');
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
it('should use sourceReference and session', () => {
|
|
61
|
+
const source = {
|
|
62
|
+
sourceReference: 5
|
|
63
|
+
};
|
|
64
|
+
const session = { id: 'test-session' } as DebugSession;
|
|
65
|
+
const uri = debug.asDebugSourceUri(source, session);
|
|
66
|
+
expect(uri.toString(true)).to.be.equal('debug:?ref=5&session=test-session');
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
it('should use sourceReference and path', () => {
|
|
70
|
+
const source = {
|
|
71
|
+
sourceReference: 4,
|
|
72
|
+
path: 'test/path'
|
|
73
|
+
};
|
|
74
|
+
const uri = debug.asDebugSourceUri(source);
|
|
75
|
+
expect(uri.toString(true)).to.be.equal('debug:test/path?ref=4');
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
it('should use path', () => {
|
|
79
|
+
const source = {
|
|
80
|
+
path: 'scheme:/full/path'
|
|
81
|
+
};
|
|
82
|
+
const uri = debug.asDebugSourceUri(source);
|
|
83
|
+
expect(uri.toString(true)).to.be.equal('scheme:/full/path');
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
it('should use file path', () => {
|
|
87
|
+
const source = {
|
|
88
|
+
path: '/full/path'
|
|
89
|
+
};
|
|
90
|
+
const uri = debug.asDebugSourceUri(source);
|
|
91
|
+
expect(uri.toString(true)).to.be.equal('file:///full/path');
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
});
|
|
@@ -19,6 +19,7 @@ import { EnvExtImpl } from '../env';
|
|
|
19
19
|
import { RPCProtocol } from '../../common/rpc-protocol';
|
|
20
20
|
import { createHash } from 'crypto';
|
|
21
21
|
import { v4 } from 'uuid';
|
|
22
|
+
import fs = require('fs');
|
|
22
23
|
|
|
23
24
|
/**
|
|
24
25
|
* Provides machineId using mac address. It's only possible on node side
|
|
@@ -27,6 +28,7 @@ import { v4 } from 'uuid';
|
|
|
27
28
|
export class EnvNodeExtImpl extends EnvExtImpl {
|
|
28
29
|
|
|
29
30
|
private macMachineId: string;
|
|
31
|
+
private _isNewAppInstall: boolean;
|
|
30
32
|
|
|
31
33
|
constructor(rpc: RPCProtocol) {
|
|
32
34
|
super(rpc);
|
|
@@ -37,7 +39,7 @@ export class EnvNodeExtImpl extends EnvExtImpl {
|
|
|
37
39
|
this.macMachineId = createHash('sha256').update(macAddress, 'utf8').digest('hex');
|
|
38
40
|
}
|
|
39
41
|
});
|
|
40
|
-
|
|
42
|
+
this._isNewAppInstall = this.computeIsNewAppInstall();
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
/**
|
|
@@ -54,4 +56,14 @@ export class EnvNodeExtImpl extends EnvExtImpl {
|
|
|
54
56
|
return __dirname;
|
|
55
57
|
}
|
|
56
58
|
|
|
59
|
+
get isNewAppInstall(): boolean {
|
|
60
|
+
return this._isNewAppInstall;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
private computeIsNewAppInstall(): boolean {
|
|
64
|
+
const creation = fs.statSync(__filename).birthtimeMs;
|
|
65
|
+
const current = Date.now();
|
|
66
|
+
const dayMs = 24 * 3600 * 1000;
|
|
67
|
+
return (current - creation) < dayMs;
|
|
68
|
+
}
|
|
57
69
|
}
|
|
@@ -639,7 +639,14 @@ export function createAPIFactory(
|
|
|
639
639
|
const env: typeof theia.env = Object.freeze({
|
|
640
640
|
get appName(): string { return envExt.appName; },
|
|
641
641
|
get appRoot(): string { return envExt.appRoot; },
|
|
642
|
+
get appHost(): string { return envExt.appHost; },
|
|
642
643
|
get language(): string { return envExt.language; },
|
|
644
|
+
get isNewAppInstall(): boolean { return envExt.isNewAppInstall; },
|
|
645
|
+
get isTelemetryEnabled(): boolean { return envExt.isTelemetryEnabled; },
|
|
646
|
+
get onDidChangeTelemetryEnabled(): theia.Event<boolean> {
|
|
647
|
+
return envExt.onDidChangeTelemetryEnabled;
|
|
648
|
+
},
|
|
649
|
+
get remoteName(): string | undefined { return envExt.remoteName; },
|
|
643
650
|
get machineId(): string { return envExt.machineId; },
|
|
644
651
|
get sessionId(): string { return envExt.sessionId; },
|
|
645
652
|
get uriScheme(): string { return envExt.uriScheme; },
|
|
@@ -868,6 +875,9 @@ export function createAPIFactory(
|
|
|
868
875
|
},
|
|
869
876
|
removeBreakpoints(breakpoints: readonly theia.Breakpoint[]): void {
|
|
870
877
|
debugExt.removeBreakpoints(breakpoints);
|
|
878
|
+
},
|
|
879
|
+
asDebugSourceUri(source: theia.DebugProtocolSource, session?: theia.DebugSession): theia.Uri {
|
|
880
|
+
return debugExt.asDebugSourceUri(source, session);
|
|
871
881
|
}
|
|
872
882
|
};
|
|
873
883
|
|
|
@@ -201,6 +201,7 @@ export class PluginManagerExtImpl implements PluginManagerExt, PluginManager {
|
|
|
201
201
|
this.envExt.setShell(params.env.shell);
|
|
202
202
|
this.envExt.setUIKind(params.env.uiKind);
|
|
203
203
|
this.envExt.setApplicationName(params.env.appName);
|
|
204
|
+
this.envExt.setAppHost(params.env.appHost);
|
|
204
205
|
|
|
205
206
|
this.preferencesManager.init(params.preferences);
|
|
206
207
|
|
package/src/plugin/quick-open.ts
CHANGED
|
@@ -85,6 +85,7 @@ export class QuickOpenExtImpl implements QuickOpenExt {
|
|
|
85
85
|
const instance = ++this._instances;
|
|
86
86
|
|
|
87
87
|
const widgetPromise = this.proxy.$show(instance, {
|
|
88
|
+
title: options && options.title,
|
|
88
89
|
canPickMany: options && options.canPickMany,
|
|
89
90
|
placeHolder: options && options.placeHolder,
|
|
90
91
|
matchOnDescription: options && options.matchOnDescription,
|
package/src/plugin/scm.ts
CHANGED
|
@@ -311,6 +311,17 @@ export class ScmInputBoxImpl implements theia.SourceControlInputBox {
|
|
|
311
311
|
this._placeholder = placeholder;
|
|
312
312
|
}
|
|
313
313
|
|
|
314
|
+
private _visible: boolean = true;
|
|
315
|
+
|
|
316
|
+
get visible(): boolean {
|
|
317
|
+
return this._visible;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
set visible(visible: boolean) {
|
|
321
|
+
this.proxy.$setInputBoxVisible(this.sourceControlHandle, visible);
|
|
322
|
+
this._visible = visible;
|
|
323
|
+
}
|
|
324
|
+
|
|
314
325
|
private _validateInput: ValidateInput | undefined;
|
|
315
326
|
|
|
316
327
|
get validateInput(): ValidateInput | undefined {
|
|
@@ -482,7 +482,8 @@ export namespace SignatureInformation {
|
|
|
482
482
|
return {
|
|
483
483
|
label: info.label,
|
|
484
484
|
documentation: info.documentation ? fromMarkdown(info.documentation) : undefined,
|
|
485
|
-
parameters: info.parameters && info.parameters.map(ParameterInformation.from)
|
|
485
|
+
parameters: info.parameters && info.parameters.map(ParameterInformation.from),
|
|
486
|
+
activeParameter: info.activeParameter
|
|
486
487
|
};
|
|
487
488
|
}
|
|
488
489
|
|
|
@@ -490,7 +491,8 @@ export namespace SignatureInformation {
|
|
|
490
491
|
return {
|
|
491
492
|
label: info.label,
|
|
492
493
|
documentation: MarkdownStringDTO.is(info.documentation) ? toMarkdown(info.documentation) : info.documentation,
|
|
493
|
-
parameters: info.parameters && info.parameters.map(ParameterInformation.to)
|
|
494
|
+
parameters: info.parameters && info.parameters.map(ParameterInformation.to),
|
|
495
|
+
activeParameter: info.activeParameter
|
|
494
496
|
};
|
|
495
497
|
}
|
|
496
498
|
}
|
package/src/plugin/types-impl.ts
CHANGED
|
@@ -1071,6 +1071,7 @@ export class SignatureInformation {
|
|
|
1071
1071
|
label: string;
|
|
1072
1072
|
documentation?: string | theia.MarkdownString;
|
|
1073
1073
|
parameters: ParameterInformation[];
|
|
1074
|
+
activeParameter?: number;
|
|
1074
1075
|
|
|
1075
1076
|
constructor(label: string, documentation?: string | theia.MarkdownString) {
|
|
1076
1077
|
this.label = label;
|
|
@@ -2249,11 +2250,12 @@ export class Breakpoint {
|
|
|
2249
2250
|
*/
|
|
2250
2251
|
logMessage?: string;
|
|
2251
2252
|
|
|
2252
|
-
protected constructor(enabled?: boolean, condition?: string, hitCondition?: string, logMessage?: string) {
|
|
2253
|
+
protected constructor(enabled?: boolean, condition?: string, hitCondition?: string, logMessage?: string, id?: string) {
|
|
2253
2254
|
this.enabled = enabled || false;
|
|
2254
2255
|
this.condition = condition;
|
|
2255
2256
|
this.hitCondition = hitCondition;
|
|
2256
2257
|
this.logMessage = logMessage;
|
|
2258
|
+
this._id = id;
|
|
2257
2259
|
}
|
|
2258
2260
|
|
|
2259
2261
|
private _id: string | undefined;
|
|
@@ -2282,8 +2284,8 @@ export class SourceBreakpoint extends Breakpoint {
|
|
|
2282
2284
|
/**
|
|
2283
2285
|
* Create a new breakpoint for a source location.
|
|
2284
2286
|
*/
|
|
2285
|
-
constructor(location: Location, enabled?: boolean, condition?: string, hitCondition?: string, logMessage?: string) {
|
|
2286
|
-
super(enabled, condition, hitCondition, logMessage);
|
|
2287
|
+
constructor(location: Location, enabled?: boolean, condition?: string, hitCondition?: string, logMessage?: string, id?: string) {
|
|
2288
|
+
super(enabled, condition, hitCondition, logMessage, id);
|
|
2287
2289
|
this.location = location;
|
|
2288
2290
|
}
|
|
2289
2291
|
}
|
|
@@ -2301,8 +2303,8 @@ export class FunctionBreakpoint extends Breakpoint {
|
|
|
2301
2303
|
/**
|
|
2302
2304
|
* Create a new function breakpoint.
|
|
2303
2305
|
*/
|
|
2304
|
-
constructor(functionName: string, enabled?: boolean, condition?: string, hitCondition?: string, logMessage?: string) {
|
|
2305
|
-
super(enabled, condition, hitCondition, logMessage);
|
|
2306
|
+
constructor(functionName: string, enabled?: boolean, condition?: string, hitCondition?: string, logMessage?: string, id?: string) {
|
|
2307
|
+
super(enabled, condition, hitCondition, logMessage, id);
|
|
2306
2308
|
this.functionName = functionName;
|
|
2307
2309
|
}
|
|
2308
2310
|
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { PluginServer } from '../../common';
|
|
2
|
-
import { Command } from '@theia/core/lib/common/command';
|
|
3
|
-
import { QuickInputService } from '@theia/core/lib/browser';
|
|
4
|
-
export declare class PluginExtDeployCommandService {
|
|
5
|
-
static COMMAND: Command;
|
|
6
|
-
protected readonly quickInputService: QuickInputService;
|
|
7
|
-
protected readonly pluginServer: PluginServer;
|
|
8
|
-
deploy(): void;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=plugin-ext-deploy-command.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-ext-deploy-command.d.ts","sourceRoot":"","sources":["../../../src/main/browser/plugin-ext-deploy-command.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAA4B,MAAM,yBAAyB,CAAC;AAEtF,qBACa,6BAA6B;IACtC,OAAc,OAAO,EAAE,OAAO,CAI5B;IAGF,SAAS,CAAC,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IAGxD,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IAE9C,MAAM,IAAI,IAAI;CAcjB"}
|
|
@@ -1,64 +0,0 @@
|
|
|
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 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.PluginExtDeployCommandService = void 0;
|
|
28
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
29
|
-
const common_1 = require("../../common");
|
|
30
|
-
const browser_1 = require("@theia/core/lib/browser");
|
|
31
|
-
let PluginExtDeployCommandService = class PluginExtDeployCommandService /* implements QuickOpenModel */ {
|
|
32
|
-
deploy() {
|
|
33
|
-
var _a;
|
|
34
|
-
(_a = this.quickInputService) === null || _a === void 0 ? void 0 : _a.showQuickPick([], {
|
|
35
|
-
placeholder: "Plugin's id to deploy.",
|
|
36
|
-
onDidChangeValue: (quickPick, filter) => {
|
|
37
|
-
quickPick.items = [{
|
|
38
|
-
label: filter,
|
|
39
|
-
detail: 'Deploy this plugin',
|
|
40
|
-
execute: () => this.pluginServer.deploy(filter)
|
|
41
|
-
}];
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
PluginExtDeployCommandService.COMMAND = {
|
|
47
|
-
id: 'plugin-ext:deploy-plugin-id',
|
|
48
|
-
category: 'Plugin',
|
|
49
|
-
label: 'Deploy Plugin by Id',
|
|
50
|
-
};
|
|
51
|
-
__decorate([
|
|
52
|
-
(0, inversify_1.inject)(browser_1.QuickInputService),
|
|
53
|
-
(0, inversify_1.optional)(),
|
|
54
|
-
__metadata("design:type", Object)
|
|
55
|
-
], PluginExtDeployCommandService.prototype, "quickInputService", void 0);
|
|
56
|
-
__decorate([
|
|
57
|
-
(0, inversify_1.inject)(common_1.PluginServer),
|
|
58
|
-
__metadata("design:type", Object)
|
|
59
|
-
], PluginExtDeployCommandService.prototype, "pluginServer", void 0);
|
|
60
|
-
PluginExtDeployCommandService = __decorate([
|
|
61
|
-
(0, inversify_1.injectable)()
|
|
62
|
-
], PluginExtDeployCommandService);
|
|
63
|
-
exports.PluginExtDeployCommandService = PluginExtDeployCommandService;
|
|
64
|
-
//# sourceMappingURL=plugin-ext-deploy-command.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-ext-deploy-command.js","sourceRoot":"","sources":["../../../src/main/browser/plugin-ext-deploy-command.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,2EAA2E;AAC3E,gFAAgF;;;;;;;;;;;;AAEhF,4DAA4E;AAC5E,yCAA4C;AAE5C,qDAAsF;AAGtF,IAAa,6BAA6B,GAA1C,MAAa,6BAA6B,CAAC,+BAA+B;IAatE,MAAM;;QACF,MAAA,IAAI,CAAC,iBAAiB,0CAAE,aAAa,CAAC,EAAE,EACpC;YACI,WAAW,EAAE,wBAAwB;YACrC,gBAAgB,EAAE,CAAC,SAAmC,EAAE,MAAc,EAAE,EAAE;gBACtE,SAAS,CAAC,KAAK,GAAG,CAAC;wBACf,KAAK,EAAE,MAAM;wBACb,MAAM,EAAE,oBAAoB;wBAC5B,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC;qBAClD,CAAC,CAAC;YACP,CAAC;SACJ,CACJ,CAAC;IACN,CAAC;CACJ,CAAA;AA1BiB,qCAAO,GAAY;IAC7B,EAAE,EAAE,6BAA6B;IACjC,QAAQ,EAAE,QAAQ;IAClB,KAAK,EAAE,qBAAqB;CAC9B,CAAA;AAGF;IADC,IAAA,kBAAM,EAAC,2BAAiB,CAAC;IAAE,IAAA,oBAAQ,GAAE;;wEACkB;AAGxD;IADC,IAAA,kBAAM,EAAC,qBAAY,CAAC;;mEACyB;AAXrC,6BAA6B;IADzC,IAAA,sBAAU,GAAE;GACA,6BAA6B,CA2BzC;AA3BY,sEAA6B"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { PluginDeployerResolverContext } from '../../../common/plugin-protocol';
|
|
2
|
-
import { LocalPluginDeployerResolver } from './local-plugin-deployer-resolver';
|
|
3
|
-
export declare class LocalFilePluginDeployerResolver extends LocalPluginDeployerResolver {
|
|
4
|
-
static LOCAL_FILE: string;
|
|
5
|
-
protected get supportedScheme(): string;
|
|
6
|
-
resolveFromLocalPath(pluginResolverContext: PluginDeployerResolverContext, localPath: string): Promise<void>;
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=local-file-plugin-deployer-resolver.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"local-file-plugin-deployer-resolver.d.ts","sourceRoot":"","sources":["../../../../src/main/node/resolvers/local-file-plugin-deployer-resolver.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAGhF,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAE/E,qBACa,+BAAgC,SAAQ,2BAA2B;IAC5E,MAAM,CAAC,UAAU,SAAgB;IAEjC,SAAS,KAAK,eAAe,IAAI,MAAM,CAEtC;IAEK,oBAAoB,CAAC,qBAAqB,EAAE,6BAA6B,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAIrH"}
|
|
@@ -1,43 +0,0 @@
|
|
|
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 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 LocalFilePluginDeployerResolver_1;
|
|
24
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.LocalFilePluginDeployerResolver = void 0;
|
|
26
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
27
|
-
const path = require("path");
|
|
28
|
-
const local_plugin_deployer_resolver_1 = require("./local-plugin-deployer-resolver");
|
|
29
|
-
let LocalFilePluginDeployerResolver = LocalFilePluginDeployerResolver_1 = class LocalFilePluginDeployerResolver extends local_plugin_deployer_resolver_1.LocalPluginDeployerResolver {
|
|
30
|
-
get supportedScheme() {
|
|
31
|
-
return LocalFilePluginDeployerResolver_1.LOCAL_FILE;
|
|
32
|
-
}
|
|
33
|
-
async resolveFromLocalPath(pluginResolverContext, localPath) {
|
|
34
|
-
const fileName = path.basename(localPath);
|
|
35
|
-
pluginResolverContext.addPlugin(fileName, localPath);
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
LocalFilePluginDeployerResolver.LOCAL_FILE = 'local-file';
|
|
39
|
-
LocalFilePluginDeployerResolver = LocalFilePluginDeployerResolver_1 = __decorate([
|
|
40
|
-
(0, inversify_1.injectable)()
|
|
41
|
-
], LocalFilePluginDeployerResolver);
|
|
42
|
-
exports.LocalFilePluginDeployerResolver = LocalFilePluginDeployerResolver;
|
|
43
|
-
//# sourceMappingURL=local-file-plugin-deployer-resolver.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"local-file-plugin-deployer-resolver.js","sourceRoot":"","sources":["../../../../src/main/node/resolvers/local-file-plugin-deployer-resolver.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,2EAA2E;AAC3E,gFAAgF;;;;;;;;;;AAGhF,4DAA0D;AAC1D,6BAA6B;AAC7B,qFAA+E;AAG/E,IAAa,+BAA+B,uCAA5C,MAAa,+BAAgC,SAAQ,4DAA2B;IAG5E,IAAc,eAAe;QACzB,OAAO,iCAA+B,CAAC,UAAU,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,oBAAoB,CAAC,qBAAoD,EAAE,SAAiB;QAC9F,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAC1C,qBAAqB,CAAC,SAAS,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IACzD,CAAC;CACJ,CAAA;AAVU,0CAAU,GAAG,YAAY,CAAC;AADxB,+BAA+B;IAD3C,IAAA,sBAAU,GAAE;GACA,+BAA+B,CAW3C;AAXY,0EAA+B"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
// *****************************************************************************
|
|
2
|
-
// Copyright (C) 2018 Red Hat, Inc. and others.
|
|
3
|
-
//
|
|
4
|
-
// This program and the accompanying materials are made available under the
|
|
5
|
-
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
-
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
-
//
|
|
8
|
-
// This Source Code may also be made available under the following Secondary
|
|
9
|
-
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
-
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
-
// with the GNU Classpath Exception which is available at
|
|
12
|
-
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
-
//
|
|
14
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
-
// *****************************************************************************
|
|
16
|
-
|
|
17
|
-
import { injectable, inject, optional } from '@theia/core/shared/inversify';
|
|
18
|
-
import { PluginServer } from '../../common';
|
|
19
|
-
import { Command } from '@theia/core/lib/common/command';
|
|
20
|
-
import { QuickInputService, QuickPick, QuickPickItem } from '@theia/core/lib/browser';
|
|
21
|
-
|
|
22
|
-
@injectable()
|
|
23
|
-
export class PluginExtDeployCommandService /* implements QuickOpenModel */ {
|
|
24
|
-
public static COMMAND: Command = {
|
|
25
|
-
id: 'plugin-ext:deploy-plugin-id',
|
|
26
|
-
category: 'Plugin',
|
|
27
|
-
label: 'Deploy Plugin by Id',
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
@inject(QuickInputService) @optional()
|
|
31
|
-
protected readonly quickInputService: QuickInputService;
|
|
32
|
-
|
|
33
|
-
@inject(PluginServer)
|
|
34
|
-
protected readonly pluginServer: PluginServer;
|
|
35
|
-
|
|
36
|
-
deploy(): void {
|
|
37
|
-
this.quickInputService?.showQuickPick([],
|
|
38
|
-
{
|
|
39
|
-
placeholder: "Plugin's id to deploy.",
|
|
40
|
-
onDidChangeValue: (quickPick: QuickPick<QuickPickItem>, filter: string) => {
|
|
41
|
-
quickPick.items = [{
|
|
42
|
-
label: filter,
|
|
43
|
-
detail: 'Deploy this plugin',
|
|
44
|
-
execute: () => this.pluginServer.deploy(filter)
|
|
45
|
-
}];
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
// *****************************************************************************
|
|
2
|
-
// Copyright (C) 2018 Red Hat, Inc. and others.
|
|
3
|
-
//
|
|
4
|
-
// This program and the accompanying materials are made available under the
|
|
5
|
-
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
-
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
-
//
|
|
8
|
-
// This Source Code may also be made available under the following Secondary
|
|
9
|
-
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
-
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
-
// with the GNU Classpath Exception which is available at
|
|
12
|
-
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
-
//
|
|
14
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
-
// *****************************************************************************
|
|
16
|
-
|
|
17
|
-
import { PluginDeployerResolverContext } from '../../../common/plugin-protocol';
|
|
18
|
-
import { injectable } from '@theia/core/shared/inversify';
|
|
19
|
-
import * as path from 'path';
|
|
20
|
-
import { LocalPluginDeployerResolver } from './local-plugin-deployer-resolver';
|
|
21
|
-
|
|
22
|
-
@injectable()
|
|
23
|
-
export class LocalFilePluginDeployerResolver extends LocalPluginDeployerResolver {
|
|
24
|
-
static LOCAL_FILE = 'local-file';
|
|
25
|
-
|
|
26
|
-
protected get supportedScheme(): string {
|
|
27
|
-
return LocalFilePluginDeployerResolver.LOCAL_FILE;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
async resolveFromLocalPath(pluginResolverContext: PluginDeployerResolverContext, localPath: string): Promise<void> {
|
|
31
|
-
const fileName = path.basename(localPath);
|
|
32
|
-
pluginResolverContext.addPlugin(fileName, localPath);
|
|
33
|
-
}
|
|
34
|
-
}
|