@theia/plugin-ext 1.18.0-next.83ecbc39 → 1.18.0-next.86181832
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/arrays.d.ts +4 -0
- package/lib/common/arrays.d.ts.map +1 -1
- package/lib/common/arrays.js +9 -1
- package/lib/common/arrays.js.map +1 -1
- package/lib/common/plugin-api-rpc.d.ts +1 -2
- package/lib/common/plugin-api-rpc.d.ts.map +1 -1
- package/lib/common/plugin-api-rpc.js.map +1 -1
- package/lib/hosted/node/scanners/scanner-theia.js +1 -1
- package/lib/hosted/node/scanners/scanner-theia.js.map +1 -1
- package/lib/main/browser/custom-editors/custom-editor-opener.d.ts +1 -0
- package/lib/main/browser/custom-editors/custom-editor-opener.d.ts.map +1 -1
- package/lib/main/browser/custom-editors/custom-editor-opener.js +4 -1
- package/lib/main/browser/custom-editors/custom-editor-opener.js.map +1 -1
- package/lib/main/browser/dialogs/modal-notification.d.ts +1 -1
- package/lib/main/browser/dialogs/modal-notification.d.ts.map +1 -1
- package/lib/main/browser/dialogs/modal-notification.js +4 -4
- package/lib/main/browser/dialogs/modal-notification.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 +5 -3
- package/lib/main/browser/plugin-ext-frontend-module.js.map +1 -1
- package/lib/main/browser/plugin-ext-widget.d.ts.map +1 -1
- package/lib/main/browser/plugin-ext-widget.js +3 -2
- package/lib/main/browser/plugin-ext-widget.js.map +1 -1
- package/lib/main/browser/plugin-icon-theme-service.d.ts +2 -0
- package/lib/main/browser/plugin-icon-theme-service.d.ts.map +1 -1
- package/lib/main/browser/plugin-icon-theme-service.js +15 -2
- package/lib/main/browser/plugin-icon-theme-service.js.map +1 -1
- package/lib/main/browser/plugin-shared-style.js +1 -1
- package/lib/main/browser/plugin-shared-style.js.map +1 -1
- package/lib/main/browser/quick-open-main.d.ts +2 -5
- package/lib/main/browser/quick-open-main.d.ts.map +1 -1
- package/lib/main/browser/quick-open-main.js +48 -100
- package/lib/main/browser/quick-open-main.js.map +1 -1
- package/lib/main/browser/view/plugin-view-registry.js +1 -1
- package/lib/main/browser/view/plugin-view-registry.js.map +1 -1
- package/lib/main/browser/webview/webview.js +1 -1
- package/lib/main/browser/webview/webview.js.map +1 -1
- package/lib/plugin/languages.d.ts.map +1 -1
- package/lib/plugin/languages.js +2 -1
- package/lib/plugin/languages.js.map +1 -1
- package/lib/plugin/quick-open.d.ts +1 -3
- package/lib/plugin/quick-open.d.ts.map +1 -1
- package/lib/plugin/quick-open.js +2 -24
- package/lib/plugin/quick-open.js.map +1 -1
- package/lib/plugin/tasks/tasks.d.ts +1 -1
- package/lib/plugin/tasks/tasks.d.ts.map +1 -1
- package/lib/plugin/tasks/tasks.js +3 -2
- package/lib/plugin/tasks/tasks.js.map +1 -1
- package/lib/plugin/type-converters.d.ts.map +1 -1
- package/lib/plugin/type-converters.js +2 -1
- package/lib/plugin/type-converters.js.map +1 -1
- package/package.json +23 -23
- package/src/common/arrays.ts +8 -0
- package/src/common/plugin-api-rpc.ts +1 -2
- package/src/hosted/node/scanners/scanner-theia.ts +1 -1
- package/src/main/browser/custom-editors/custom-editor-opener.tsx +5 -1
- package/src/main/browser/dialogs/modal-notification.ts +6 -6
- package/src/main/browser/plugin-ext-frontend-module.ts +6 -4
- package/src/main/browser/plugin-ext-widget.tsx +3 -2
- package/src/main/browser/plugin-icon-theme-service.ts +12 -2
- package/src/main/browser/plugin-shared-style.ts +1 -1
- package/src/main/browser/quick-open-main.ts +53 -108
- package/src/main/browser/style/index.css +1 -5
- package/src/main/browser/style/plugin-sidebar.css +1 -1
- package/src/main/browser/view/plugin-view-registry.ts +2 -2
- package/src/main/browser/webview/pre/main.js +1 -1
- package/src/main/browser/webview/pre/service-worker.js +1 -1
- package/src/main/browser/webview/webview.ts +1 -1
- package/src/plugin/languages.ts +2 -1
- package/src/plugin/quick-open.ts +3 -27
- package/src/plugin/tasks/tasks.ts +3 -2
- package/src/plugin/type-converters.ts +5 -4
|
@@ -111,7 +111,7 @@ export class PluginSharedStyle {
|
|
|
111
111
|
background-position: 2px;
|
|
112
112
|
width: ${size}px;
|
|
113
113
|
height: ${size}px;
|
|
114
|
-
background: no-repeat url("${theme.type === 'light' ? lightIconUrl : darkIconUrl}");
|
|
114
|
+
background: center no-repeat url("${theme.type === 'light' ? lightIconUrl : darkIconUrl}");
|
|
115
115
|
background-size: ${size}px;
|
|
116
116
|
`));
|
|
117
117
|
return {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
17
17
|
|
|
18
|
-
import { InputBoxOptions
|
|
18
|
+
import { InputBoxOptions } from '@theia/plugin';
|
|
19
19
|
import { interfaces } from '@theia/core/shared/inversify';
|
|
20
20
|
import { RPCProtocol } from '../../common/rpc-protocol';
|
|
21
21
|
import {
|
|
@@ -23,15 +23,17 @@ import {
|
|
|
23
23
|
QuickOpenMain,
|
|
24
24
|
MAIN_RPC_CONTEXT,
|
|
25
25
|
TransferInputBox,
|
|
26
|
-
TransferQuickPick,
|
|
27
26
|
TransferQuickPickItems,
|
|
28
27
|
TransferQuickInput,
|
|
29
28
|
TransferQuickInputButton
|
|
30
29
|
} from '../../common/plugin-api-rpc';
|
|
31
30
|
import {
|
|
32
|
-
InputOptions,
|
|
31
|
+
InputOptions,
|
|
32
|
+
PickOptions,
|
|
33
|
+
QuickInputButton,
|
|
34
|
+
QuickInputButtonHandle,
|
|
35
|
+
QuickInputService
|
|
33
36
|
} from '@theia/core/lib/browser';
|
|
34
|
-
import { QuickPickService } from '@theia/core/lib/common/quick-pick-service';
|
|
35
37
|
import { DisposableCollection, Disposable } from '@theia/core/lib/common/disposable';
|
|
36
38
|
import { CancellationToken } from '@theia/core/lib/common/cancellation';
|
|
37
39
|
import { MonacoQuickInputService } from '@theia/monaco/lib/browser/monaco-quick-input-service';
|
|
@@ -47,7 +49,6 @@ export interface QuickInputSession {
|
|
|
47
49
|
export class QuickOpenMainImpl implements QuickOpenMain, Disposable {
|
|
48
50
|
|
|
49
51
|
private quickInputService: QuickInputService;
|
|
50
|
-
private quickPickService: QuickPickService;
|
|
51
52
|
private proxy: QuickOpenExt;
|
|
52
53
|
private delegate: MonacoQuickInputService;
|
|
53
54
|
private readonly items: Record<number, {
|
|
@@ -61,7 +62,6 @@ export class QuickOpenMainImpl implements QuickOpenMain, Disposable {
|
|
|
61
62
|
this.proxy = rpc.getProxy(MAIN_RPC_CONTEXT.QUICK_OPEN_EXT);
|
|
62
63
|
this.delegate = container.get(MonacoQuickInputService);
|
|
63
64
|
this.quickInputService = container.get(QuickInputService);
|
|
64
|
-
this.quickPickService = container.get(QuickPickService);
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
dispose(): void {
|
|
@@ -196,52 +196,53 @@ export class QuickOpenMainImpl implements QuickOpenMain, Disposable {
|
|
|
196
196
|
|
|
197
197
|
$createOrUpdate<T extends theia.QuickPickItem>(params: TransferQuickInput<T>): Promise<void> {
|
|
198
198
|
const sessionId = params.id;
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
199
|
+
let session = this.sessions.get(sessionId);
|
|
200
|
+
if (!session) {
|
|
201
|
+
if (params.type === 'quickPick') {
|
|
202
|
+
const quickPick = this.quickInputService.createQuickPick();
|
|
203
|
+
quickPick.onDidAccept(() => {
|
|
204
|
+
this.proxy.$acceptOnDidAccept(sessionId);
|
|
205
|
+
});
|
|
206
|
+
quickPick.onDidChangeActive((items: Array<monaco.quickInput.IQuickPickItem>) => {
|
|
207
|
+
this.proxy.$onDidChangeActive(sessionId, items.map(item => (item as TransferQuickPickItems).handle));
|
|
208
|
+
});
|
|
209
|
+
quickPick.onDidChangeSelection((items: Array<monaco.quickInput.IQuickPickItem>) => {
|
|
210
|
+
this.proxy.$onDidChangeSelection(sessionId, items.map(item => (item as TransferQuickPickItems).handle));
|
|
211
|
+
});
|
|
212
|
+
quickPick.onDidTriggerButton((button: QuickInputButtonHandle) => {
|
|
213
|
+
this.proxy.$acceptOnDidTriggerButton(sessionId, button);
|
|
214
|
+
});
|
|
215
|
+
quickPick.onDidChangeValue((value: string) => {
|
|
216
|
+
this.proxy.$acceptDidChangeValue(sessionId, value);
|
|
217
|
+
});
|
|
218
|
+
quickPick.onDidHide(() => {
|
|
219
|
+
this.proxy.$acceptOnDidHide(sessionId);
|
|
220
|
+
});
|
|
221
|
+
session = {
|
|
222
|
+
input: quickPick,
|
|
223
|
+
handlesToItems: new Map()
|
|
224
|
+
};
|
|
225
|
+
} else {
|
|
226
|
+
const inputBox = this.quickInputService.createInputBox();
|
|
227
|
+
inputBox.onDidAccept(() => {
|
|
228
|
+
this.proxy.$acceptOnDidAccept(sessionId);
|
|
229
|
+
});
|
|
230
|
+
inputBox.onDidTriggerButton((button: QuickInputButtonHandle) => {
|
|
231
|
+
this.proxy.$acceptOnDidTriggerButton(sessionId, button);
|
|
232
|
+
});
|
|
233
|
+
inputBox.onDidChangeValue((value: string) => {
|
|
234
|
+
this.proxy.$acceptDidChangeValue(sessionId, value);
|
|
235
|
+
});
|
|
236
|
+
inputBox.onDidHide(() => {
|
|
237
|
+
this.proxy.$acceptOnDidHide(sessionId);
|
|
238
|
+
});
|
|
239
|
+
session = {
|
|
240
|
+
input: inputBox,
|
|
241
|
+
handlesToItems: new Map()
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
this.sessions.set(sessionId, session);
|
|
245
|
+
}
|
|
245
246
|
if (session) {
|
|
246
247
|
const { input, handlesToItems } = session;
|
|
247
248
|
for (const param in params) {
|
|
@@ -297,47 +298,6 @@ export class QuickOpenMainImpl implements QuickOpenMain, Disposable {
|
|
|
297
298
|
return Promise.resolve(undefined);
|
|
298
299
|
}
|
|
299
300
|
|
|
300
|
-
async $showCustomQuickPick<T extends QuickPickItemExt>(options: TransferQuickPick<T>): Promise<void> {
|
|
301
|
-
const sessionId = options.id;
|
|
302
|
-
const toDispose = new DisposableCollection();
|
|
303
|
-
|
|
304
|
-
toDispose.push(this.quickPickService.onDidAccept(() => {
|
|
305
|
-
this.proxy.$acceptOnDidAccept(sessionId);
|
|
306
|
-
}));
|
|
307
|
-
toDispose.push(this.quickPickService.onDidChangeActive((e: { quickPick: any, activeItems: Array<QuickPickValue<number>> }) => {
|
|
308
|
-
this.proxy.$onDidChangeActive(sessionId, e.activeItems.map(item => item.value!));
|
|
309
|
-
}));
|
|
310
|
-
toDispose.push(this.quickPickService.onDidChangeSelection((e: { quickPick: any, selectedItems: Array<QuickPickValue<number>> }) => {
|
|
311
|
-
this.proxy.$onDidChangeSelection(sessionId, e.selectedItems.map(item => item.value!));
|
|
312
|
-
}));
|
|
313
|
-
toDispose.push(this.quickPickService.onDidChangeValue((e: { quickPick: any, filter: string }) => {
|
|
314
|
-
this.proxy.$acceptDidChangeValue(sessionId, e.filter);
|
|
315
|
-
}));
|
|
316
|
-
toDispose.push(this.quickPickService.onDidTriggerButton(button => {
|
|
317
|
-
this.proxy.$acceptOnDidTriggerButton(sessionId, button);
|
|
318
|
-
}));
|
|
319
|
-
toDispose.push(this.quickPickService.onDidHide(() => {
|
|
320
|
-
this.proxy.$acceptOnDidHide(sessionId);
|
|
321
|
-
if (!toDispose.disposed) {
|
|
322
|
-
toDispose.dispose();
|
|
323
|
-
}
|
|
324
|
-
}));
|
|
325
|
-
this.toDispose.push(toDispose);
|
|
326
|
-
|
|
327
|
-
this.quickPickService.show(this.convertToQuickPickItem(options.items), {
|
|
328
|
-
buttons: options.buttons ? this.convertToQuickInputButtons(options.buttons) : [],
|
|
329
|
-
placeholder: options.placeholder,
|
|
330
|
-
matchOnDescription: options.matchOnDescription,
|
|
331
|
-
step: options.step,
|
|
332
|
-
title: options.title,
|
|
333
|
-
totalSteps: options.totalSteps,
|
|
334
|
-
ignoreFocusOut: options.ignoreFocusOut,
|
|
335
|
-
value: options.value,
|
|
336
|
-
matchOnLabel: true,
|
|
337
|
-
runIfSingle: false,
|
|
338
|
-
});
|
|
339
|
-
}
|
|
340
|
-
|
|
341
301
|
$hide(): void {
|
|
342
302
|
this.delegate.hide();
|
|
343
303
|
}
|
|
@@ -351,21 +311,6 @@ export class QuickOpenMainImpl implements QuickOpenMain, Disposable {
|
|
|
351
311
|
return Promise.resolve(undefined);
|
|
352
312
|
}
|
|
353
313
|
|
|
354
|
-
private convertToQuickPickItem(items: TransferQuickPickItems[] | undefined): Array<QuickPickItem> {
|
|
355
|
-
const convertedItems: QuickPickValue<number>[] = [];
|
|
356
|
-
if (items) {
|
|
357
|
-
for (const i of items) {
|
|
358
|
-
convertedItems.push({
|
|
359
|
-
label: i.label,
|
|
360
|
-
description: i.description,
|
|
361
|
-
detail: i.detail,
|
|
362
|
-
value: i.handle
|
|
363
|
-
});
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
return convertedItems;
|
|
367
|
-
}
|
|
368
|
-
|
|
369
314
|
private convertToQuickInputButtons(buttons: Array<TransferQuickInputButton>): Array<QuickInputButton> {
|
|
370
315
|
return buttons.map((button, i) => ({
|
|
371
316
|
iconPath: getIconUris(button.iconPath),
|
|
@@ -37,11 +37,7 @@
|
|
|
37
37
|
.theia-plugin-view-container {
|
|
38
38
|
-webkit-mask: url('');
|
|
39
39
|
mask: url('');
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
.theia-plugin-test-tab-icon {
|
|
43
|
-
-webkit-mask: url('test.svg');
|
|
44
|
-
mask: url('test.svg');
|
|
40
|
+
background-color: var(--theia-activityBar-inactiveForeground);
|
|
45
41
|
}
|
|
46
42
|
|
|
47
43
|
.theia-plugin-file-icon,
|
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
.theia-plugins .pluginHeaderContainer {
|
|
31
31
|
padding: 5px 15px;
|
|
32
32
|
font-size: var(--theia-ui-font-size0);
|
|
33
|
-
border-bottom: 1px solid;
|
|
34
33
|
}
|
|
35
34
|
|
|
36
35
|
.theia-side-panel .theia-plugins .pluginHeaderContainer {
|
|
@@ -48,6 +47,7 @@
|
|
|
48
47
|
.theia-plugins .pluginName {
|
|
49
48
|
flex: 1;
|
|
50
49
|
margin-right: 5px;
|
|
50
|
+
margin-left: 4px;
|
|
51
51
|
font-size: var(--theia-ui-font-size1);
|
|
52
52
|
font-weight: 400;
|
|
53
53
|
}
|
|
@@ -18,7 +18,7 @@ import { injectable, inject, postConstruct, optional } from '@theia/core/shared/
|
|
|
18
18
|
import {
|
|
19
19
|
ApplicationShell, ViewContainer as ViewContainerWidget, WidgetManager,
|
|
20
20
|
ViewContainerIdentifier, ViewContainerTitleOptions, Widget, FrontendApplicationContribution,
|
|
21
|
-
StatefulWidget, CommonMenus, BaseWidget, TreeViewWelcomeWidget
|
|
21
|
+
StatefulWidget, CommonMenus, BaseWidget, TreeViewWelcomeWidget, codicon
|
|
22
22
|
} from '@theia/core/lib/browser';
|
|
23
23
|
import { ViewContainer, View, ViewWelcome } from '../../../common';
|
|
24
24
|
import { PluginSharedStyle } from '../plugin-shared-style';
|
|
@@ -146,7 +146,7 @@ export class PluginViewRegistry implements FrontendApplicationContribution {
|
|
|
146
146
|
});
|
|
147
147
|
this.doRegisterViewContainer('test', 'left', {
|
|
148
148
|
label: 'Test',
|
|
149
|
-
iconClass: '
|
|
149
|
+
iconClass: codicon('beaker'),
|
|
150
150
|
closeable: true
|
|
151
151
|
});
|
|
152
152
|
this.contextKeyService.onDidChange(e => {
|
|
@@ -477,7 +477,7 @@
|
|
|
477
477
|
const newFrame = document.createElement('iframe');
|
|
478
478
|
newFrame.setAttribute('id', 'pending-frame');
|
|
479
479
|
newFrame.setAttribute('frameborder', '0');
|
|
480
|
-
newFrame.setAttribute('sandbox', options.allowScripts ? 'allow-scripts allow-forms allow-same-origin' : 'allow-same-origin');
|
|
480
|
+
newFrame.setAttribute('sandbox', options.allowScripts ? 'allow-scripts allow-forms allow-same-origin allow-downloads' : 'allow-same-origin');
|
|
481
481
|
if (host.fakeLoad) {
|
|
482
482
|
// We should just be able to use srcdoc, but I wasn't
|
|
483
483
|
// seeing the service worker applying properly.
|
|
@@ -248,7 +248,7 @@ async function processLocalhostRequest(event, requestUrl) {
|
|
|
248
248
|
const origin = requestUrl.origin;
|
|
249
249
|
|
|
250
250
|
const resolveRedirect = redirectOrigin => {
|
|
251
|
-
if (!redirectOrigin) {
|
|
251
|
+
if (!redirectOrigin || requestUrl.origin === redirectOrigin) {
|
|
252
252
|
return fetch(event.request);
|
|
253
253
|
}
|
|
254
254
|
const location = event.request.url.replace(new RegExp(`^${requestUrl.origin}(/|$)`), `${redirectOrigin}$1`);
|
|
@@ -249,7 +249,7 @@ export class WebviewWidget extends BaseWidget implements StatefulWidget {
|
|
|
249
249
|
|
|
250
250
|
const element = document.createElement('iframe');
|
|
251
251
|
element.className = 'webview';
|
|
252
|
-
element.sandbox.add('allow-scripts', 'allow-forms', 'allow-same-origin');
|
|
252
|
+
element.sandbox.add('allow-scripts', 'allow-forms', 'allow-same-origin', 'allow-downloads');
|
|
253
253
|
element.setAttribute('src', `${this.externalEndpoint}/index.html?id=${this.identifier.id}`);
|
|
254
254
|
element.style.border = 'none';
|
|
255
255
|
element.style.width = '100%';
|
package/src/plugin/languages.ts
CHANGED
|
@@ -90,6 +90,7 @@ import { DeclarationAdapter } from './languages/declaration';
|
|
|
90
90
|
import { CallHierarchyAdapter } from './languages/call-hierarchy';
|
|
91
91
|
import { BinaryBuffer } from '@theia/core/lib/common/buffer';
|
|
92
92
|
import { DocumentSemanticTokensAdapter, DocumentRangeSemanticTokensAdapter } from './languages/semantic-highlighting';
|
|
93
|
+
import { isReadonlyArray } from '../common/arrays';
|
|
93
94
|
|
|
94
95
|
type Adapter = CompletionAdapter |
|
|
95
96
|
SignatureHelpAdapter |
|
|
@@ -204,7 +205,7 @@ export class LanguagesExtImpl implements LanguagesExt {
|
|
|
204
205
|
}
|
|
205
206
|
|
|
206
207
|
private transformDocumentSelector(selector: theia.DocumentSelector): SerializedDocumentFilter[] {
|
|
207
|
-
if (
|
|
208
|
+
if (isReadonlyArray(selector)) {
|
|
208
209
|
return selector.map(sel => this.doTransformDocumentSelector(sel)!);
|
|
209
210
|
}
|
|
210
211
|
|
package/src/plugin/quick-open.ts
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
17
17
|
import {
|
|
18
18
|
QuickOpenExt, PLUGIN_RPC_CONTEXT as Ext, QuickOpenMain, TransferInputBox, Plugin,
|
|
19
|
-
Item, TransferQuickInputButton, TransferQuickPickItems, TransferQuickInput
|
|
19
|
+
Item, TransferQuickInputButton, TransferQuickPickItems, TransferQuickInput
|
|
20
20
|
} from '../common/plugin-api-rpc';
|
|
21
21
|
import * as theia from '@theia/plugin';
|
|
22
22
|
import { QuickPickItem, InputBoxOptions, InputBox, QuickPick, QuickInput } from '@theia/plugin';
|
|
@@ -178,10 +178,6 @@ export class QuickOpenExtImpl implements QuickOpenExt {
|
|
|
178
178
|
return session;
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
-
showCustomQuickPick<T extends QuickPickItem>(options: TransferQuickPick<T>): void {
|
|
182
|
-
this.proxy.$showCustomQuickPick(options);
|
|
183
|
-
}
|
|
184
|
-
|
|
185
181
|
hide(): void {
|
|
186
182
|
this.proxy.$hide();
|
|
187
183
|
}
|
|
@@ -389,6 +385,7 @@ export class QuickInputExt implements QuickInput {
|
|
|
389
385
|
this._fireHide();
|
|
390
386
|
this.disposableCollection.dispose();
|
|
391
387
|
this._onDidDispose();
|
|
388
|
+
this.quickOpenMain.$dispose(this._id);
|
|
392
389
|
}
|
|
393
390
|
|
|
394
391
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -616,6 +613,7 @@ export class QuickPickExt<T extends theia.QuickPickItem> extends QuickInputExt i
|
|
|
616
613
|
this._handlesToItems.set(i, item);
|
|
617
614
|
this._itemsToHandles.set(item, i);
|
|
618
615
|
});
|
|
616
|
+
items.forEach((item, i) => Object.assign(item, { handle: i }));
|
|
619
617
|
this.update({
|
|
620
618
|
items
|
|
621
619
|
});
|
|
@@ -690,26 +688,4 @@ export class QuickPickExt<T extends theia.QuickPickItem> extends QuickInputExt i
|
|
|
690
688
|
this._selectedItems = items;
|
|
691
689
|
this._onDidChangeSelectionEmitter.fire(items);
|
|
692
690
|
}
|
|
693
|
-
|
|
694
|
-
show(): void {
|
|
695
|
-
super.show();
|
|
696
|
-
this.quickOpen.showCustomQuickPick({
|
|
697
|
-
id: this._id,
|
|
698
|
-
title: this.title,
|
|
699
|
-
step: this.step,
|
|
700
|
-
totalSteps: this.totalSteps,
|
|
701
|
-
enabled: this.enabled,
|
|
702
|
-
busy: this.busy,
|
|
703
|
-
ignoreFocusOut: this.ignoreFocusOut,
|
|
704
|
-
value: this.value,
|
|
705
|
-
placeholder: this.placeholder,
|
|
706
|
-
buttons: this.buttons,
|
|
707
|
-
items: convertToTransferQuickPickItems(this.items),
|
|
708
|
-
canSelectMany: this.canSelectMany,
|
|
709
|
-
matchOnDescription: this.matchOnDescription,
|
|
710
|
-
matchOnDetail: this.matchOnDetail,
|
|
711
|
-
activeItems: this.activeItems,
|
|
712
|
-
selectedItems: this.selectedItems
|
|
713
|
-
});
|
|
714
|
-
}
|
|
715
691
|
}
|
|
@@ -29,6 +29,7 @@ import { TaskProviderAdapter } from './task-provider';
|
|
|
29
29
|
import { Emitter, Event } from '@theia/core/lib/common/event';
|
|
30
30
|
import { TerminalServiceExtImpl } from '../terminal-ext';
|
|
31
31
|
import { UUID } from '@theia/core/shared/@phosphor/coreutils';
|
|
32
|
+
import { CancellationToken } from '@theia/core/lib/common/cancellation';
|
|
32
33
|
|
|
33
34
|
type ExecutionCallback = (resolvedDefinition: theia.TaskDefinition) => Thenable<theia.Pseudoterminal>;
|
|
34
35
|
export class TasksExtImpl implements TasksExt {
|
|
@@ -164,10 +165,10 @@ export class TasksExtImpl implements TasksExt {
|
|
|
164
165
|
throw new Error('Task was not successfully transformed into a task config');
|
|
165
166
|
}
|
|
166
167
|
|
|
167
|
-
$provideTasks(handle: number
|
|
168
|
+
$provideTasks(handle: number): Promise<TaskDto[] | undefined> {
|
|
168
169
|
const adapter = this.adaptersMap.get(handle);
|
|
169
170
|
if (adapter) {
|
|
170
|
-
return adapter.provideTasks(
|
|
171
|
+
return adapter.provideTasks(CancellationToken.None).then(tasks => {
|
|
171
172
|
if (tasks) {
|
|
172
173
|
for (const task of tasks) {
|
|
173
174
|
if (task.taskType === 'customExecution') {
|
|
@@ -27,6 +27,7 @@ import { isMarkdownString, MarkdownString } from './markdown-string';
|
|
|
27
27
|
import * as types from './types-impl';
|
|
28
28
|
import { UriComponents } from '../common/uri-components';
|
|
29
29
|
import { TaskGroup } from './types-impl';
|
|
30
|
+
import { isReadonlyArray } from '../common/arrays';
|
|
30
31
|
|
|
31
32
|
const SIDE_GROUP = -2;
|
|
32
33
|
const ACTIVE_GROUP = -1;
|
|
@@ -169,9 +170,9 @@ export function fromRangeOrRangeWithMessage(ranges: theia.Range[] | theia.Decora
|
|
|
169
170
|
});
|
|
170
171
|
} else {
|
|
171
172
|
return ranges.map((r): DecorationOptions =>
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
173
|
+
({
|
|
174
|
+
range: fromRange(r)!
|
|
175
|
+
}));
|
|
175
176
|
}
|
|
176
177
|
}
|
|
177
178
|
|
|
@@ -213,7 +214,7 @@ export function toMarkdown(value: model.MarkdownString): MarkdownString {
|
|
|
213
214
|
export function fromDocumentSelector(selector: theia.DocumentSelector | undefined): LanguageSelector | undefined {
|
|
214
215
|
if (!selector) {
|
|
215
216
|
return undefined;
|
|
216
|
-
} else if (
|
|
217
|
+
} else if (isReadonlyArray(selector)) {
|
|
217
218
|
return <LanguageSelector>selector.map(fromDocumentSelector);
|
|
218
219
|
} else if (typeof selector === 'string') {
|
|
219
220
|
return selector;
|