@theia/plugin-ext 1.71.0-next.6 → 1.71.0-next.64
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 +5 -0
- package/lib/common/plugin-api-rpc.d.ts.map +1 -1
- package/lib/common/plugin-api-rpc.js +1 -0
- package/lib/common/plugin-api-rpc.js.map +1 -1
- package/lib/hosted/browser/hosted-plugin.d.ts.map +1 -1
- package/lib/hosted/browser/hosted-plugin.js +13 -6
- package/lib/hosted/browser/hosted-plugin.js.map +1 -1
- package/lib/main/browser/main-context.d.ts.map +1 -1
- package/lib/main/browser/main-context.js +2 -6
- package/lib/main/browser/main-context.js.map +1 -1
- package/lib/main/browser/main-file-system-event-service.d.ts +10 -2
- package/lib/main/browser/main-file-system-event-service.d.ts.map +1 -1
- package/lib/main/browser/main-file-system-event-service.js +19 -2
- package/lib/main/browser/main-file-system-event-service.js.map +1 -1
- package/lib/main/browser/menus/plugin-menu-command-adapter.js +1 -1
- package/lib/main/browser/menus/plugin-menu-command-adapter.js.map +1 -1
- package/lib/main/browser/menus/vscode-theia-menu-mappings.d.ts +1 -1
- package/lib/main/browser/menus/vscode-theia-menu-mappings.d.ts.map +1 -1
- package/lib/main/browser/menus/vscode-theia-menu-mappings.js +2 -2
- package/lib/main/browser/menus/vscode-theia-menu-mappings.js.map +1 -1
- package/lib/main/browser/scm-main.d.ts.map +1 -1
- package/lib/main/browser/scm-main.js +24 -1
- package/lib/main/browser/scm-main.js.map +1 -1
- package/lib/main/browser/scm-main.spec.d.ts +2 -0
- package/lib/main/browser/scm-main.spec.d.ts.map +1 -0
- package/lib/main/browser/scm-main.spec.js +87 -0
- package/lib/main/browser/scm-main.spec.js.map +1 -0
- package/lib/main/browser/test-main.d.ts +3 -2
- package/lib/main/browser/test-main.d.ts.map +1 -1
- package/lib/main/browser/test-main.js +12 -1
- package/lib/main/browser/test-main.js.map +1 -1
- package/lib/plugin/file-system-event-service-ext-impl.d.ts +11 -5
- package/lib/plugin/file-system-event-service-ext-impl.d.ts.map +1 -1
- package/lib/plugin/file-system-event-service-ext-impl.js +28 -9
- package/lib/plugin/file-system-event-service-ext-impl.js.map +1 -1
- package/lib/plugin/plugin-context.js +4 -4
- package/lib/plugin/plugin-context.js.map +1 -1
- package/lib/plugin/scm.d.ts +1 -1
- package/lib/plugin/scm.d.ts.map +1 -1
- package/lib/plugin/scm.js +23 -5
- package/lib/plugin/scm.js.map +1 -1
- package/lib/plugin/terminal-ext.d.ts +13 -3
- package/lib/plugin/terminal-ext.d.ts.map +1 -1
- package/lib/plugin/terminal-ext.js +51 -10
- package/lib/plugin/terminal-ext.js.map +1 -1
- package/lib/plugin/terminal-ext.spec.d.ts +2 -0
- package/lib/plugin/terminal-ext.spec.d.ts.map +1 -0
- package/lib/plugin/terminal-ext.spec.js +285 -0
- package/lib/plugin/terminal-ext.spec.js.map +1 -0
- package/lib/plugin/test-item.d.ts.map +1 -1
- package/lib/plugin/test-item.js +8 -3
- package/lib/plugin/test-item.js.map +1 -1
- package/lib/plugin/tests.d.ts.map +1 -1
- package/lib/plugin/tests.js +15 -3
- package/lib/plugin/tests.js.map +1 -1
- package/lib/plugin/type-converters.d.ts +2 -2
- package/lib/plugin/type-converters.d.ts.map +1 -1
- package/lib/plugin/type-converters.js +3 -9
- package/lib/plugin/type-converters.js.map +1 -1
- package/lib/plugin/types-impl.d.ts +1 -1
- package/lib/plugin/types-impl.d.ts.map +1 -1
- package/lib/plugin/types-impl.js +1 -1
- package/lib/plugin/types-impl.js.map +1 -1
- package/lib/plugin/workspace.d.ts.map +1 -1
- package/lib/plugin/workspace.js +17 -3
- package/lib/plugin/workspace.js.map +1 -1
- package/package.json +38 -38
- package/src/common/plugin-api-rpc.ts +6 -0
- package/src/hosted/browser/hosted-plugin.ts +13 -6
- package/src/main/browser/main-context.ts +3 -7
- package/src/main/browser/main-file-system-event-service.ts +26 -6
- package/src/main/browser/menus/plugin-menu-command-adapter.ts +1 -1
- package/src/main/browser/menus/vscode-theia-menu-mappings.ts +3 -3
- package/src/main/browser/scm-main.spec.ts +105 -0
- package/src/main/browser/scm-main.ts +25 -1
- package/src/main/browser/test-main.ts +13 -3
- package/src/plugin/file-system-event-service-ext-impl.ts +40 -14
- package/src/plugin/plugin-context.ts +7 -7
- package/src/plugin/scm.ts +26 -4
- package/src/plugin/terminal-ext.spec.ts +350 -0
- package/src/plugin/terminal-ext.ts +58 -12
- package/src/plugin/test-item.ts +8 -3
- package/src/plugin/tests.ts +14 -3
- package/src/plugin/type-converters.ts +7 -13
- package/src/plugin/types-impl.ts +2 -2
- package/src/plugin/workspace.ts +17 -3
package/src/plugin/types-impl.ts
CHANGED
|
@@ -737,7 +737,7 @@ export class ThemeIcon {
|
|
|
737
737
|
|
|
738
738
|
static readonly Folder: ThemeIcon = new ThemeIcon('folder');
|
|
739
739
|
|
|
740
|
-
|
|
740
|
+
constructor(public id: string, public color?: ThemeColor) {
|
|
741
741
|
}
|
|
742
742
|
|
|
743
743
|
}
|
|
@@ -816,7 +816,7 @@ export class RelativePattern {
|
|
|
816
816
|
}
|
|
817
817
|
set baseUri(baseUri: URI) {
|
|
818
818
|
this._baseUri = baseUri;
|
|
819
|
-
this.
|
|
819
|
+
this._base = baseUri.fsPath;
|
|
820
820
|
}
|
|
821
821
|
|
|
822
822
|
constructor(base: theia.WorkspaceFolder | URI | string, public pattern: string) {
|
package/src/plugin/workspace.ts
CHANGED
|
@@ -39,7 +39,6 @@ import { Disposable, URI } from './types-impl';
|
|
|
39
39
|
import { normalize } from '@theia/core/lib/common/paths';
|
|
40
40
|
import { relative } from '../common/paths-util';
|
|
41
41
|
import { Schemes, UriComponents } from '../common/uri-components';
|
|
42
|
-
import { toWorkspaceFolder } from './type-converters';
|
|
43
42
|
import { MessageRegistryExt } from './message-registry';
|
|
44
43
|
import * as Converter from './type-converters';
|
|
45
44
|
import { FileStat } from '@theia/filesystem/lib/common/files';
|
|
@@ -120,7 +119,22 @@ export class WorkspaceExtImpl implements WorkspaceExt {
|
|
|
120
119
|
|
|
121
120
|
$onWorkspaceFoldersChanged(event: WorkspaceRootsChangeEvent): void {
|
|
122
121
|
const newRoots = event.roots || [];
|
|
123
|
-
const
|
|
122
|
+
const oldFoldersByUri = new Map<string, theia.WorkspaceFolder>();
|
|
123
|
+
if (this.folders) {
|
|
124
|
+
for (const folder of this.folders) {
|
|
125
|
+
oldFoldersByUri.set(folder.uri.toString(), folder);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
const newFolders = newRoots.map((root, index) => {
|
|
129
|
+
const existing = oldFoldersByUri.get(root);
|
|
130
|
+
if (existing) {
|
|
131
|
+
// Preserve object identity even if the index changed,
|
|
132
|
+
// since extensions may use folder objects as Map keys.
|
|
133
|
+
Object.assign(existing, { index });
|
|
134
|
+
return existing;
|
|
135
|
+
}
|
|
136
|
+
return this.toWorkspaceFolder(root, index);
|
|
137
|
+
});
|
|
124
138
|
const delta = this.deltaFolders(this.folders, newFolders);
|
|
125
139
|
|
|
126
140
|
this.folders = newFolders;
|
|
@@ -347,7 +361,7 @@ export class WorkspaceExtImpl implements WorkspaceExt {
|
|
|
347
361
|
const folderPath = folder.uri.toString();
|
|
348
362
|
|
|
349
363
|
if (resourcePath === folderPath) {
|
|
350
|
-
return
|
|
364
|
+
return folder;
|
|
351
365
|
}
|
|
352
366
|
|
|
353
367
|
if (resourcePath.startsWith(folderPath)
|