@theia/plugin-ext 1.71.0-next.4 → 1.71.0-next.41
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/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 +3 -3
- 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 +6 -5
- package/lib/plugin/scm.js.map +1 -1
- 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/test-main.ts +13 -3
- package/src/plugin/file-system-event-service-ext-impl.ts +40 -14
- package/src/plugin/plugin-context.ts +3 -3
- package/src/plugin/scm.ts +8 -4
- 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/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)
|