@theia/plugin-ext 1.59.0 → 1.60.0-next.47
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.d.ts +3 -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/hosted-plugin-localization-service.js +2 -4
- package/lib/hosted/node/hosted-plugin-localization-service.js.map +1 -1
- package/lib/main/browser/custom-editors/custom-editor-widget.d.ts +1 -4
- package/lib/main/browser/custom-editors/custom-editor-widget.d.ts.map +1 -1
- package/lib/main/browser/custom-editors/custom-editor-widget.js +0 -11
- package/lib/main/browser/custom-editors/custom-editor-widget.js.map +1 -1
- package/lib/main/browser/custom-editors/custom-editors-main.d.ts +7 -6
- package/lib/main/browser/custom-editors/custom-editors-main.d.ts.map +1 -1
- package/lib/main/browser/custom-editors/custom-editors-main.js +13 -12
- package/lib/main/browser/custom-editors/custom-editors-main.js.map +1 -1
- package/lib/main/browser/debug/plugin-debug-configuration-provider.d.ts +5 -0
- package/lib/main/browser/debug/plugin-debug-configuration-provider.d.ts.map +1 -1
- package/lib/main/browser/debug/plugin-debug-configuration-provider.js +4 -3
- package/lib/main/browser/debug/plugin-debug-configuration-provider.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/plugin-ext-widget.d.ts +1 -1
- package/lib/main/browser/plugin-ext-widget.d.ts.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 +1 -0
- package/lib/main/browser/scm-main.js.map +1 -1
- package/lib/main/browser/tabs/tabs-main.js +1 -1
- package/lib/main/browser/tabs/tabs-main.js.map +1 -1
- package/lib/main/browser/view/plugin-view-registry.d.ts.map +1 -1
- package/lib/main/browser/view/plugin-view-registry.js +5 -3
- package/lib/main/browser/view/plugin-view-registry.js.map +1 -1
- package/lib/main/browser/view/plugin-view-widget.d.ts +2 -2
- package/lib/main/browser/view/plugin-view-widget.d.ts.map +1 -1
- package/lib/main/browser/view/plugin-view-widget.js +1 -1
- package/lib/main/browser/view/plugin-view-widget.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/main/browser/webviews-main.js +1 -1
- package/lib/main/browser/webviews-main.js.map +1 -1
- package/lib/plugin/custom-editors.d.ts +2 -2
- package/lib/plugin/custom-editors.d.ts.map +1 -1
- package/lib/plugin/custom-editors.js +5 -5
- package/lib/plugin/custom-editors.js.map +1 -1
- package/lib/plugin/scm.d.ts.map +1 -1
- package/lib/plugin/scm.js +10 -2
- package/lib/plugin/scm.js.map +1 -1
- package/lib/plugin/status-bar/status-bar-item.js +1 -1
- package/lib/plugin/status-bar/status-bar-item.js.map +1 -1
- package/lib/plugin/tasks/tasks.js +1 -1
- package/lib/plugin/tasks/tasks.js.map +1 -1
- package/lib/plugin/terminal-ext.js +1 -1
- package/lib/plugin/terminal-ext.js.map +1 -1
- package/lib/plugin/types-impl.js +1 -1
- package/lib/plugin/types-impl.js.map +1 -1
- package/package.json +28 -28
- package/src/common/plugin-api-rpc.ts +3 -2
- package/src/hosted/node/hosted-plugin-localization-service.ts +2 -5
- package/src/main/browser/custom-editors/custom-editor-widget.ts +1 -14
- package/src/main/browser/custom-editors/custom-editors-main.ts +18 -16
- package/src/main/browser/debug/plugin-debug-configuration-provider.ts +9 -3
- package/src/main/browser/dialogs/modal-notification.ts +1 -1
- package/src/main/browser/plugin-ext-widget.tsx +1 -1
- package/src/main/browser/scm-main.ts +2 -0
- package/src/main/browser/style/index.css +10 -10
- package/src/main/browser/style/webview.css +2 -2
- package/src/main/browser/tabs/tabs-main.ts +1 -1
- package/src/main/browser/view/plugin-view-registry.ts +5 -3
- package/src/main/browser/view/plugin-view-widget.ts +2 -2
- package/src/main/browser/webview/webview.ts +1 -1
- package/src/main/browser/webviews-main.ts +1 -1
- package/src/plugin/custom-editors.ts +5 -5
- package/src/plugin/scm.ts +10 -2
- package/src/plugin/status-bar/status-bar-item.ts +1 -1
- package/src/plugin/tasks/tasks.ts +1 -1
- package/src/plugin/terminal-ext.ts +1 -1
- package/src/plugin/types-impl.ts +1 -1
|
@@ -38,9 +38,10 @@ import { FileService } from '@theia/filesystem/lib/browser/file-service';
|
|
|
38
38
|
import { UndoRedoService } from '@theia/editor/lib/browser/undo-redo-service';
|
|
39
39
|
import { WebviewsMainImpl } from '../webviews-main';
|
|
40
40
|
import { WidgetManager } from '@theia/core/lib/browser/widget-manager';
|
|
41
|
-
import { ApplicationShell, LabelProvider, Saveable, SaveOptions } from '@theia/core/lib/browser';
|
|
41
|
+
import { ApplicationShell, LabelProvider, Saveable, SaveAsOptions, SaveOptions } from '@theia/core/lib/browser';
|
|
42
42
|
import { WebviewPanelOptions } from '@theia/plugin';
|
|
43
43
|
import { EditorPreferences } from '@theia/editor/lib/browser';
|
|
44
|
+
import { BinaryBuffer } from '@theia/core/lib/common/buffer';
|
|
44
45
|
|
|
45
46
|
const enum CustomEditorModelType {
|
|
46
47
|
Custom,
|
|
@@ -186,7 +187,7 @@ export class CustomEditorsMainImpl implements CustomEditorsMain, Disposable {
|
|
|
186
187
|
|
|
187
188
|
switch (modelType) {
|
|
188
189
|
case CustomEditorModelType.Text: {
|
|
189
|
-
const model = CustomTextEditorModel.create(viewType, resource, this.textModelService
|
|
190
|
+
const model = CustomTextEditorModel.create(viewType, resource, this.textModelService);
|
|
190
191
|
return this.customEditorService.models.add(resource, viewType, model);
|
|
191
192
|
}
|
|
192
193
|
case CustomEditorModelType.Custom: {
|
|
@@ -224,7 +225,7 @@ export interface CustomEditorModel extends Saveable, Disposable {
|
|
|
224
225
|
|
|
225
226
|
revert(options?: Saveable.RevertOptions): Promise<void>;
|
|
226
227
|
saveCustomEditor(options?: SaveOptions): Promise<void>;
|
|
227
|
-
saveCustomEditorAs(resource: TheiaURI, targetResource: TheiaURI, options?: SaveOptions): Promise<void>;
|
|
228
|
+
saveCustomEditorAs?(resource: TheiaURI, targetResource: TheiaURI, options?: SaveOptions): Promise<void>;
|
|
228
229
|
|
|
229
230
|
undo(): void;
|
|
230
231
|
redo(): void;
|
|
@@ -329,7 +330,7 @@ export class MainCustomEditorModel implements CustomEditorModel {
|
|
|
329
330
|
}
|
|
330
331
|
|
|
331
332
|
const cancellationSource = new CancellationTokenSource();
|
|
332
|
-
this.proxy.$revert(this.resource, this.viewType, cancellationSource.token);
|
|
333
|
+
await this.proxy.$revert(this.resource, this.viewType, cancellationSource.token);
|
|
333
334
|
this.change(() => {
|
|
334
335
|
this.isDirtyFromContentChange = false;
|
|
335
336
|
this.currentEditIndex = this.savePoint;
|
|
@@ -347,7 +348,7 @@ export class MainCustomEditorModel implements CustomEditorModel {
|
|
|
347
348
|
}
|
|
348
349
|
|
|
349
350
|
const cancelable = new CancellationTokenSource();
|
|
350
|
-
const savePromise = this.proxy.$
|
|
351
|
+
const savePromise = this.proxy.$save(this.resource, this.viewType, cancelable.token);
|
|
351
352
|
this.ongoingSave?.cancel();
|
|
352
353
|
this.ongoingSave = cancelable;
|
|
353
354
|
|
|
@@ -367,10 +368,14 @@ export class MainCustomEditorModel implements CustomEditorModel {
|
|
|
367
368
|
}
|
|
368
369
|
}
|
|
369
370
|
|
|
371
|
+
async saveAs(options: SaveAsOptions): Promise<void> {
|
|
372
|
+
await this.saveCustomEditorAs(new TheiaURI(this.resource), options.target, options);
|
|
373
|
+
}
|
|
374
|
+
|
|
370
375
|
async saveCustomEditorAs(resource: TheiaURI, targetResource: TheiaURI, options?: SaveOptions): Promise<void> {
|
|
371
376
|
if (this.editable) {
|
|
372
377
|
const source = new CancellationTokenSource();
|
|
373
|
-
await this.proxy.$
|
|
378
|
+
await this.proxy.$saveAs(this.resource, this.viewType, targetResource.toComponents(), source.token);
|
|
374
379
|
this.change(() => {
|
|
375
380
|
this.savePoint = this.currentEditIndex;
|
|
376
381
|
});
|
|
@@ -450,19 +455,17 @@ export class CustomTextEditorModel implements CustomEditorModel {
|
|
|
450
455
|
static async create(
|
|
451
456
|
viewType: string,
|
|
452
457
|
resource: TheiaURI,
|
|
453
|
-
editorModelService: EditorModelService
|
|
454
|
-
fileService: FileService,
|
|
458
|
+
editorModelService: EditorModelService
|
|
455
459
|
): Promise<CustomTextEditorModel> {
|
|
456
460
|
const model = await editorModelService.createModelReference(resource);
|
|
457
461
|
model.object.suppressOpenEditorWhenDirty = true;
|
|
458
|
-
return new CustomTextEditorModel(viewType, resource, model
|
|
462
|
+
return new CustomTextEditorModel(viewType, resource, model);
|
|
459
463
|
}
|
|
460
464
|
|
|
461
465
|
constructor(
|
|
462
466
|
readonly viewType: string,
|
|
463
467
|
readonly editorResource: TheiaURI,
|
|
464
|
-
private readonly model: Reference<MonacoEditorModel
|
|
465
|
-
private readonly fileService: FileService,
|
|
468
|
+
private readonly model: Reference<MonacoEditorModel>
|
|
466
469
|
) {
|
|
467
470
|
this.toDispose.push(
|
|
468
471
|
this.editorTextModel.onDirtyChanged(e => {
|
|
@@ -507,13 +510,12 @@ export class CustomTextEditorModel implements CustomEditorModel {
|
|
|
507
510
|
return this.saveCustomEditor(options);
|
|
508
511
|
}
|
|
509
512
|
|
|
510
|
-
|
|
511
|
-
return this.editorTextModel.
|
|
513
|
+
serialize(): Promise<BinaryBuffer> {
|
|
514
|
+
return this.editorTextModel.serialize();
|
|
512
515
|
}
|
|
513
516
|
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
await this.fileService.copy(resource, targetResource, { overwrite: false });
|
|
517
|
+
saveCustomEditor(options?: SaveOptions): Promise<void> {
|
|
518
|
+
return this.editorTextModel.save(options);
|
|
517
519
|
}
|
|
518
520
|
|
|
519
521
|
undo(): void {
|
|
@@ -23,6 +23,11 @@ import {
|
|
|
23
23
|
import { DebugConfiguration } from '@theia/debug/lib/common/debug-configuration';
|
|
24
24
|
|
|
25
25
|
export class PluginDebugConfigurationProvider implements DebugConfigurationProvider {
|
|
26
|
+
/**
|
|
27
|
+
* After https://github.com/eclipse-theia/theia/pull/13196, the debug config handles might change.
|
|
28
|
+
* Store the original handle to be able to call the extension host when getting by handle.
|
|
29
|
+
*/
|
|
30
|
+
protected readonly originalHandle: number;
|
|
26
31
|
public handle: number;
|
|
27
32
|
public type: string;
|
|
28
33
|
public triggerKind: DebugConfigurationProviderTriggerKind;
|
|
@@ -41,23 +46,24 @@ export class PluginDebugConfigurationProvider implements DebugConfigurationProvi
|
|
|
41
46
|
protected readonly debugExt: DebugExt
|
|
42
47
|
) {
|
|
43
48
|
this.handle = description.handle;
|
|
49
|
+
this.originalHandle = this.handle;
|
|
44
50
|
this.type = description.type;
|
|
45
51
|
this.triggerKind = description.trigger;
|
|
46
52
|
|
|
47
53
|
if (description.provideDebugConfiguration) {
|
|
48
|
-
this.provideDebugConfigurations = async (folder: string | undefined) => this.debugExt.$provideDebugConfigurationsByHandle(this.
|
|
54
|
+
this.provideDebugConfigurations = async (folder: string | undefined) => this.debugExt.$provideDebugConfigurationsByHandle(this.originalHandle, folder);
|
|
49
55
|
}
|
|
50
56
|
|
|
51
57
|
if (description.resolveDebugConfigurations) {
|
|
52
58
|
this.resolveDebugConfiguration =
|
|
53
59
|
async (folder: string | undefined, debugConfiguration: DebugConfiguration) =>
|
|
54
|
-
this.debugExt.$resolveDebugConfigurationByHandle(this.
|
|
60
|
+
this.debugExt.$resolveDebugConfigurationByHandle(this.originalHandle, folder, debugConfiguration);
|
|
55
61
|
}
|
|
56
62
|
|
|
57
63
|
if (description.resolveDebugConfigurationWithSubstitutedVariables) {
|
|
58
64
|
this.resolveDebugConfigurationWithSubstitutedVariables =
|
|
59
65
|
async (folder: string | undefined, debugConfiguration: DebugConfiguration) =>
|
|
60
|
-
this.debugExt.$resolveDebugConfigurationWithSubstitutedVariablesByHandle(this.
|
|
66
|
+
this.debugExt.$resolveDebugConfigurationWithSubstitutedVariablesByHandle(this.originalHandle, folder, debugConfiguration);
|
|
61
67
|
}
|
|
62
68
|
}
|
|
63
69
|
}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
import { injectable } from '@theia/core/shared/inversify';
|
|
17
|
-
import { Message } from '@theia/core/shared/@
|
|
17
|
+
import { Message } from '@theia/core/shared/@lumino/messaging';
|
|
18
18
|
import { codiconArray, Key } from '@theia/core/lib/browser';
|
|
19
19
|
import { AbstractDialog } from '@theia/core/lib/browser/dialogs';
|
|
20
20
|
import '../../../../src/main/browser/dialogs/style/modal-notification.css';
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
import * as React from '@theia/core/shared/react';
|
|
18
18
|
import { injectable, inject, postConstruct } from '@theia/core/shared/inversify';
|
|
19
|
-
import { Message } from '@theia/core/shared/@
|
|
19
|
+
import { Message } from '@theia/core/shared/@lumino/messaging';
|
|
20
20
|
import { PluginMetadata } from '../../common/plugin-protocol';
|
|
21
21
|
import { ReactWidget } from '@theia/core/lib/browser/widgets/react-widget';
|
|
22
22
|
import { AlertMessage } from '@theia/core/lib/browser/widgets/alert-message';
|
|
@@ -53,6 +53,8 @@ export class PluginScmResourceGroup implements ScmResourceGroup {
|
|
|
53
53
|
|
|
54
54
|
get hideWhenEmpty(): boolean { return !!this.features.hideWhenEmpty; }
|
|
55
55
|
|
|
56
|
+
get contextValue(): string | undefined { return this.features.contextValue; }
|
|
57
|
+
|
|
56
58
|
private readonly onDidChangeEmitter = new Emitter<void>();
|
|
57
59
|
readonly onDidChange: Event<void> = this.onDidChangeEmitter.event;
|
|
58
60
|
|
|
@@ -62,16 +62,16 @@
|
|
|
62
62
|
display: inline-block;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
.
|
|
66
|
-
.
|
|
67
|
-
.
|
|
68
|
-
.
|
|
69
|
-
.
|
|
70
|
-
.
|
|
71
|
-
.
|
|
72
|
-
.
|
|
73
|
-
.
|
|
74
|
-
.
|
|
65
|
+
.lm-TabBar.theia-app-sides .theia-plugin-file-icon,
|
|
66
|
+
.lm-TabBar.theia-app-sides .theia-plugin-file-icon::before,
|
|
67
|
+
.lm-TabBar.theia-app-sides .theia-plugin-folder-icon,
|
|
68
|
+
.lm-TabBar.theia-app-sides .theia-plugin-folder-icon::before,
|
|
69
|
+
.lm-TabBar.theia-app-sides .theia-plugin-folder-expanded-icon,
|
|
70
|
+
.lm-TabBar.theia-app-sides .theia-plugin-folder-expanded-icon::before,
|
|
71
|
+
.lm-TabBar.theia-app-sides .theia-plugin-root-folder-icon,
|
|
72
|
+
.lm-TabBar.theia-app-sides .theia-plugin-root-folder-icon::before,
|
|
73
|
+
.lm-TabBar.theia-app-sides .theia-plugin-root-folder-expanded-icon,
|
|
74
|
+
.lm-TabBar.theia-app-sides .theia-plugin-root-folder-expanded-icon::before {
|
|
75
75
|
padding: 0px !important;
|
|
76
76
|
width: var(--theia-private-sidebar-icon-size) !important;
|
|
77
77
|
height: var(--theia-private-sidebar-icon-size) !important;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
|
|
17
|
-
.theia-webview.
|
|
17
|
+
.theia-webview.lm-mod-hidden {
|
|
18
18
|
visibility: hidden;
|
|
19
19
|
display: flex !important;
|
|
20
20
|
}
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
content: "";
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
.
|
|
51
|
+
.lm-TabBar.theia-app-sides .theia-webview-icon::before {
|
|
52
52
|
width: var(--theia-private-sidebar-icon-size);
|
|
53
53
|
height: var(--theia-private-sidebar-icon-size);
|
|
54
54
|
background-size: contain;
|
|
@@ -68,7 +68,7 @@ export class TabsMainImpl implements TabsMain, Disposable {
|
|
|
68
68
|
this.createTabsModel();
|
|
69
69
|
|
|
70
70
|
const tabBars = this.applicationShell.mainPanel.tabBars();
|
|
71
|
-
for (
|
|
71
|
+
for (const tabBar of tabBars) {
|
|
72
72
|
this.attachListenersToTabBar(tabBar);
|
|
73
73
|
}
|
|
74
74
|
|
|
@@ -235,9 +235,11 @@ export class PluginViewRegistry implements FrontendApplicationContribution {
|
|
|
235
235
|
});
|
|
236
236
|
};
|
|
237
237
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
238
|
+
this.shell.initialized.then(() => {
|
|
239
|
+
hookDockPanelKey(this.shell.leftPanelHandler.dockPanel, this.viewContextKeys.activeViewlet);
|
|
240
|
+
hookDockPanelKey(this.shell.rightPanelHandler.dockPanel, this.viewContextKeys.activeAuxiliary);
|
|
241
|
+
hookDockPanelKey(this.shell.bottomPanel, this.viewContextKeys.activePanel);
|
|
242
|
+
});
|
|
241
243
|
}
|
|
242
244
|
|
|
243
245
|
protected async updateViewWelcomeVisibility(viewId: string): Promise<void> {
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
17
|
import { injectable, inject, postConstruct } from '@theia/core/shared/inversify';
|
|
18
|
-
import { Panel, Widget } from '@theia/core/shared/@
|
|
18
|
+
import { Panel, Widget } from '@theia/core/shared/@lumino/widgets';
|
|
19
19
|
import { MenuModelRegistry } from '@theia/core/lib/common/menu';
|
|
20
20
|
import { CommandRegistry } from '@theia/core/lib/common/command';
|
|
21
21
|
import { StatefulWidget } from '@theia/core/lib/browser/shell/shell-layout-restorer';
|
|
22
|
-
import { Message } from '@theia/core/shared/@
|
|
22
|
+
import { Message } from '@theia/core/shared/@lumino/messaging';
|
|
23
23
|
import { TreeViewWidget } from './tree-view-widget';
|
|
24
24
|
import { BadgeWidget, DescriptionWidget, DynamicToolbarWidget } from '@theia/core/lib/browser/view-container';
|
|
25
25
|
import { DisposableCollection, Emitter, Event } from '@theia/core/lib/common';
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
// copied and modified from https://github.com/microsoft/vscode/blob/ba40bd16433d5a817bfae15f3b4350e18f144af4/src/vs/workbench/contrib/webview/browser/webviewElement.ts#
|
|
22
22
|
|
|
23
23
|
import * as mime from 'mime';
|
|
24
|
-
import { JSONExt } from '@theia/core/shared/@
|
|
24
|
+
import { JSONExt } from '@theia/core/shared/@lumino/coreutils';
|
|
25
25
|
import { injectable, inject, postConstruct } from '@theia/core/shared/inversify';
|
|
26
26
|
import { WebviewPanelOptions, WebviewPortMapping } from '@theia/plugin';
|
|
27
27
|
import { BaseWidget, Message } from '@theia/core/lib/browser/widgets/widget';
|
|
@@ -25,7 +25,7 @@ import { WebviewWidget, WebviewWidgetIdentifier } from './webview/webview';
|
|
|
25
25
|
import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable';
|
|
26
26
|
import { ViewColumnService } from '@theia/core/lib/browser/shell/view-column-service';
|
|
27
27
|
import { WidgetManager } from '@theia/core/lib/browser/widget-manager';
|
|
28
|
-
import { JSONExt } from '@theia/core/shared/@
|
|
28
|
+
import { JSONExt } from '@theia/core/shared/@lumino/coreutils';
|
|
29
29
|
import { Mutable } from '@theia/core/lib/common/types';
|
|
30
30
|
import { HostedPluginSupport } from '../../hosted/browser/hosted-plugin';
|
|
31
31
|
import { IconUrl } from '../../common/plugin-protocol';
|
|
@@ -184,12 +184,12 @@ export class CustomEditorsExtImpl implements CustomEditorsExt {
|
|
|
184
184
|
|
|
185
185
|
async $undo(resourceComponents: UriComponents, viewType: string, editId: number, isDirty: boolean): Promise<void> {
|
|
186
186
|
const entry = this.getCustomDocumentEntry(viewType, resourceComponents);
|
|
187
|
-
|
|
187
|
+
await entry.undo(editId, isDirty);
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
async $redo(resourceComponents: UriComponents, viewType: string, editId: number, isDirty: boolean): Promise<void> {
|
|
191
191
|
const entry = this.getCustomDocumentEntry(viewType, resourceComponents);
|
|
192
|
-
|
|
192
|
+
await entry.redo(editId, isDirty);
|
|
193
193
|
}
|
|
194
194
|
|
|
195
195
|
async $revert(resourceComponents: UriComponents, viewType: string, cancellation: CancellationToken): Promise<void> {
|
|
@@ -198,16 +198,16 @@ export class CustomEditorsExtImpl implements CustomEditorsExt {
|
|
|
198
198
|
await provider.revertCustomDocument(entry.document, cancellation);
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
-
async $
|
|
201
|
+
async $save(resourceComponents: UriComponents, viewType: string, cancellation: CancellationToken): Promise<void> {
|
|
202
202
|
const entry = this.getCustomDocumentEntry(viewType, resourceComponents);
|
|
203
203
|
const provider = this.getCustomEditorProvider(viewType);
|
|
204
204
|
await provider.saveCustomDocument(entry.document, cancellation);
|
|
205
205
|
}
|
|
206
206
|
|
|
207
|
-
async $
|
|
207
|
+
async $saveAs(resourceComponents: UriComponents, viewType: string, targetResource: UriComponents, cancellation: CancellationToken): Promise<void> {
|
|
208
208
|
const entry = this.getCustomDocumentEntry(viewType, resourceComponents);
|
|
209
209
|
const provider = this.getCustomEditorProvider(viewType);
|
|
210
|
-
|
|
210
|
+
await provider.saveCustomDocumentAs(entry.document, URI.revive(targetResource), cancellation);
|
|
211
211
|
}
|
|
212
212
|
|
|
213
213
|
private getCustomEditorProvider(viewType: string): theia.CustomEditorProvider {
|
package/src/plugin/scm.ts
CHANGED
|
@@ -405,9 +405,17 @@ class ScmResourceGroupImpl implements theia.SourceControlResourceGroup {
|
|
|
405
405
|
this.proxy.$updateGroup(this.sourceControlHandle, this.handle, this.features);
|
|
406
406
|
}
|
|
407
407
|
|
|
408
|
+
private _contextValue: string | undefined = undefined;
|
|
409
|
+
get contextValue(): string | undefined { return this._contextValue; }
|
|
410
|
+
set contextValue(contextValue: string | undefined) {
|
|
411
|
+
this._contextValue = contextValue;
|
|
412
|
+
this.proxy.$updateGroup(this.sourceControlHandle, this.handle, this.features);
|
|
413
|
+
}
|
|
414
|
+
|
|
408
415
|
get features(): SourceControlGroupFeatures {
|
|
409
416
|
return {
|
|
410
|
-
hideWhenEmpty: this.hideWhenEmpty
|
|
417
|
+
hideWhenEmpty: this.hideWhenEmpty,
|
|
418
|
+
contextValue: this.contextValue
|
|
411
419
|
};
|
|
412
420
|
}
|
|
413
421
|
|
|
@@ -477,7 +485,7 @@ class ScmResourceGroupImpl implements theia.SourceControlResourceGroup {
|
|
|
477
485
|
// TODO remove the letter and colorId fields when the FileDecorationProvider is applied, see https://github.com/eclipse-theia/theia/pull/8911
|
|
478
486
|
const rawResource = {
|
|
479
487
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
480
|
-
handle, sourceUri, letter: (r as any).letter, colorId: (r as any).color
|
|
488
|
+
handle, sourceUri, letter: (r as any).letter, colorId: (r as any).color?.id, icons,
|
|
481
489
|
tooltip, strikeThrough, faded, contextValue, command
|
|
482
490
|
} as ScmRawResource;
|
|
483
491
|
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
import * as theia from '@theia/plugin';
|
|
17
17
|
import { ThemeColor, StatusBarAlignment } from '../types-impl';
|
|
18
18
|
import { StatusBarMessageRegistryMain } from '../../common/plugin-api-rpc';
|
|
19
|
-
import { UUID } from '@theia/core/shared/@
|
|
19
|
+
import { UUID } from '@theia/core/shared/@lumino/coreutils';
|
|
20
20
|
|
|
21
21
|
export class StatusBarItemImpl implements theia.StatusBarItem {
|
|
22
22
|
|
|
@@ -28,7 +28,7 @@ import { RPCProtocol } from '../../common/rpc-protocol';
|
|
|
28
28
|
import { TaskProviderAdapter } from './task-provider';
|
|
29
29
|
import { Emitter, Event } from '@theia/core/lib/common/event';
|
|
30
30
|
import { TerminalServiceExtImpl } from '../terminal-ext';
|
|
31
|
-
import { UUID } from '@theia/core/shared/@
|
|
31
|
+
import { UUID } from '@theia/core/shared/@lumino/coreutils';
|
|
32
32
|
import { CancellationToken } from '@theia/core/lib/common/cancellation';
|
|
33
33
|
|
|
34
34
|
type ExecutionCallback = (resolvedDefinition: theia.TaskDefinition) => Thenable<theia.Pseudoterminal>;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
|
-
import { UUID } from '@theia/core/shared/@
|
|
17
|
+
import { UUID } from '@theia/core/shared/@lumino/coreutils';
|
|
18
18
|
import { inject, injectable } from '@theia/core/shared/inversify';
|
|
19
19
|
import { TerminalServiceExt, TerminalServiceMain, PLUGIN_RPC_CONTEXT, Plugin, TerminalOptions } from '../common/plugin-api-rpc';
|
|
20
20
|
import { RPCProtocol } from '../common/rpc-protocol';
|
package/src/plugin/types-impl.ts
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
/* eslint-disable no-null/no-null */
|
|
23
23
|
|
|
24
|
-
import { UUID } from '@theia/core/shared/@
|
|
24
|
+
import { UUID } from '@theia/core/shared/@lumino/coreutils';
|
|
25
25
|
import { illegalArgument } from '../common/errors';
|
|
26
26
|
import type * as theia from '@theia/plugin';
|
|
27
27
|
import { URI as CodeURI, UriComponents } from '@theia/core/shared/vscode-uri';
|