@codingame/monaco-vscode-host-service-override 13.1.7 → 14.0.1
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-host-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "14.0.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - host service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-
|
|
19
|
-
"@codingame/monaco-vscode-
|
|
20
|
-
"@codingame/monaco-vscode-
|
|
21
|
-
"@codingame/monaco-vscode-
|
|
18
|
+
"@codingame/monaco-vscode-2cbab29e-9393-5de6-b701-9a9555360b6b-common": "14.0.1",
|
|
19
|
+
"@codingame/monaco-vscode-411e0589-fa79-504b-b32c-80a88847b23a-common": "14.0.1",
|
|
20
|
+
"@codingame/monaco-vscode-api": "14.0.1",
|
|
21
|
+
"@codingame/monaco-vscode-d0fb86d3-2a47-594e-955b-9a24631a7124-common": "14.0.1"
|
|
22
22
|
},
|
|
23
23
|
"main": "index.js",
|
|
24
24
|
"module": "index.js",
|
|
@@ -8,9 +8,9 @@ import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench
|
|
|
8
8
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
9
9
|
import { isFolderToOpen, isWorkspaceToOpen, isFileToOpen } from '@codingame/monaco-vscode-api/vscode/vs/platform/window/common/window';
|
|
10
10
|
import { pathsToEditors, isResourceEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
|
|
11
|
-
import { whenEditorClosed } from '@codingame/monaco-vscode-
|
|
11
|
+
import { whenEditorClosed } from '@codingame/monaco-vscode-d0fb86d3-2a47-594e-955b-9a24631a7124-common/vscode/vs/workbench/browser/editor';
|
|
12
12
|
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
13
|
-
import { Verbosity } from '@codingame/monaco-vscode-
|
|
13
|
+
import { Verbosity } from '@codingame/monaco-vscode-2cbab29e-9393-5de6-b701-9a9555360b6b-common/vscode/vs/platform/label/common/label';
|
|
14
14
|
import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
|
|
15
15
|
import { ModifierKeyEmitter, onDidRegisterWindow, trackFocus, getActiveDocument, getWindowId, disposableWindowInterval, detectFullscreen, EventType, addDisposableListener, addDisposableThrottledListener } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
16
16
|
import { Disposable, DisposableStore, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
@@ -160,11 +160,15 @@ let BrowserHostService = class BrowserHostService extends Disposable {
|
|
|
160
160
|
const payload = this.preservePayload(false , options);
|
|
161
161
|
const fileOpenables = [];
|
|
162
162
|
const foldersToAdd = [];
|
|
163
|
+
const foldersToRemove = [];
|
|
163
164
|
for (const openable of toOpen) {
|
|
164
165
|
openable.label = openable.label || this.getRecentLabel(openable);
|
|
165
166
|
if (isFolderToOpen(openable)) {
|
|
166
167
|
if (options?.addMode) {
|
|
167
|
-
foldersToAdd.push(
|
|
168
|
+
foldersToAdd.push({ uri: openable.folderUri });
|
|
169
|
+
}
|
|
170
|
+
else if (options?.removeMode) {
|
|
171
|
+
foldersToRemove.push(openable.folderUri);
|
|
168
172
|
}
|
|
169
173
|
else {
|
|
170
174
|
this.doOpen({ folderUri: openable.folderUri }, { reuse: this.shouldReuse(options, false ), payload });
|
|
@@ -177,10 +181,15 @@ let BrowserHostService = class BrowserHostService extends Disposable {
|
|
|
177
181
|
fileOpenables.push(openable);
|
|
178
182
|
}
|
|
179
183
|
}
|
|
180
|
-
if (foldersToAdd.length > 0) {
|
|
181
|
-
this.withServices(accessor => {
|
|
184
|
+
if (foldersToAdd.length > 0 || foldersToRemove.length > 0) {
|
|
185
|
+
this.withServices(async (accessor) => {
|
|
182
186
|
const workspaceEditingService = accessor.get(IWorkspaceEditingService);
|
|
183
|
-
|
|
187
|
+
if (foldersToAdd.length > 0) {
|
|
188
|
+
await workspaceEditingService.addFolders(foldersToAdd);
|
|
189
|
+
}
|
|
190
|
+
if (foldersToRemove.length > 0) {
|
|
191
|
+
await workspaceEditingService.removeFolders(foldersToRemove);
|
|
192
|
+
}
|
|
184
193
|
});
|
|
185
194
|
}
|
|
186
195
|
if (fileOpenables.length > 0) {
|
|
@@ -295,7 +304,7 @@ let BrowserHostService = class BrowserHostService extends Disposable {
|
|
|
295
304
|
if (isWorkspaceToOpen(openable)) {
|
|
296
305
|
return this.labelService.getWorkspaceLabel(getWorkspaceIdentifier(openable.workspaceUri), { verbose: Verbosity.LONG });
|
|
297
306
|
}
|
|
298
|
-
return this.labelService.getUriLabel(openable.fileUri);
|
|
307
|
+
return this.labelService.getUriLabel(openable.fileUri, { appendWorkspaceSuffix: true });
|
|
299
308
|
}
|
|
300
309
|
shouldReuse(options = Object.create(null), isFile) {
|
|
301
310
|
if (options.waitMarkerFileURI) {
|
|
@@ -331,10 +340,10 @@ let BrowserHostService = class BrowserHostService extends Disposable {
|
|
|
331
340
|
const { confirmed } = await this.dialogService.confirm({
|
|
332
341
|
type: Severity.Warning,
|
|
333
342
|
message: ( localize(
|
|
334
|
-
|
|
343
|
+
11820,
|
|
335
344
|
"The browser interrupted the opening of a new tab or window. Press 'Open' to open it anyway."
|
|
336
345
|
)),
|
|
337
|
-
primaryButton: ( localize(
|
|
346
|
+
primaryButton: ( localize(11821, "&&Open"))
|
|
338
347
|
});
|
|
339
348
|
if (confirmed) {
|
|
340
349
|
await this.workspaceProvider.open(workspace, options);
|