@codingame/monaco-vscode-view-common-service-override 31.0.0 → 32.0.0
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/index.js +3 -0
- package/package.json +3 -3
- package/service-override/vs/workbench/contrib/webview/browser/pre/service-worker.js +107 -88
- package/vscode/src/vs/sessions/common/theme.d.ts +21 -0
- package/vscode/src/vs/sessions/common/theme.js +126 -0
- package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +56 -56
- package/vscode/src/vs/workbench/browser/actions/helpActions.js +20 -20
- package/vscode/src/vs/workbench/browser/actions/listCommands.js +3 -3
- package/vscode/src/vs/workbench/browser/actions/navigationActions.js +6 -6
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +173 -168
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.d.ts +1 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +31 -10
- package/vscode/src/vs/workbench/browser/parts/titlebar/menubar.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/browser/parts/titlebar/menubar.contribution.js +78 -0
- package/vscode/src/vs/workbench/browser/workbench.zenMode.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/browser/workbench.zenMode.contribution.js +140 -0
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +12 -12
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +3 -3
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +3 -3
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditor.contribution.js +8 -2
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.js +84 -1
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.d.ts +11 -1
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.js +184 -19
- package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +9 -5
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +9 -2
- package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.d.ts +27 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +44 -12
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.js +7 -7
- package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.js +8 -8
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.js +29 -29
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.js +14 -14
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorAccessibilityHelp.js +5 -5
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/colors.js +13 -13
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/conflictActions.js +20 -20
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editorGutter.js +1 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +3 -3
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +10 -10
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js +3 -3
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.js +12 -12
- package/vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/scrollLocking/browser/scrollLocking.js +7 -7
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +10 -10
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +3 -3
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +3 -3
- package/vscode/src/vs/workbench/contrib/webview/browser/overlayWebview.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/webview/browser/overlayWebview.js +16 -8
- package/vscode/src/vs/workbench/contrib/webview/browser/resourceLoading.d.ts +9 -5
- package/vscode/src/vs/workbench/contrib/webview/browser/resourceLoading.js +22 -5
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.d.ts +4 -7
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +133 -32
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +5 -5
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.d.ts +0 -5
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.js +5 -27
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.d.ts +15 -7
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +129 -55
- package/vscode/src/vs/workbench/services/history/browser/historyService.js +9 -9
- package/vscode/src/vs/workbench/services/progress/browser/progressService.js +7 -7
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorHandler.js +1 -2
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.d.ts +3 -2
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +31 -33
- package/vscode/src/vs/workbench/services/views/browser/viewsService.js +9 -9
|
@@ -2,16 +2,16 @@ import * as glob from "@codingame/monaco-vscode-api/vscode/vs/base/common/glob";
|
|
|
2
2
|
import { Disposable, IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
3
3
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
4
4
|
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { RegisteredEditorInfo, RegisteredEditorOptions, EditorAssociations, ResolvedEditor, EditorInputFactoryObject } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorResolverService";
|
|
8
|
-
import { IEditorResolverService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorResolverService.service";
|
|
9
|
-
import { IQuickInputService } from "@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service";
|
|
5
|
+
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
6
|
+
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
10
7
|
import { INotificationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service";
|
|
8
|
+
import { IQuickInputService } from "@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service";
|
|
11
9
|
import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
|
|
10
|
+
import { IUntypedEditorInput } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor";
|
|
12
11
|
import { IExtensionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
12
|
+
import { IEditorGroupsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service";
|
|
13
|
+
import { EditorAssociations, EditorInputFactoryObject, RegisteredEditorInfo, RegisteredEditorOptions, ResolvedEditor } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorResolverService";
|
|
14
|
+
import { IEditorResolverService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorResolverService.service";
|
|
15
15
|
import { PreferredGroup } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService";
|
|
16
16
|
export declare class EditorResolverService extends Disposable implements IEditorResolverService {
|
|
17
17
|
private readonly editorGroupService;
|
|
@@ -39,7 +39,12 @@ export declare class EditorResolverService extends Disposable implements IEditor
|
|
|
39
39
|
bufferChangeEvents(callback: Function): void;
|
|
40
40
|
registerEditor(globPattern: string | glob.IRelativePattern, editorInfo: RegisteredEditorInfo, options: RegisteredEditorOptions, editorFactoryObject: EditorInputFactoryObject): IDisposable;
|
|
41
41
|
getAssociationsForResource(resource: URI): EditorAssociations;
|
|
42
|
+
private getAssociationsForResourceByType;
|
|
43
|
+
private getAssociationsForResourceFromSetting;
|
|
44
|
+
private getRawAssociationsForResourceByType;
|
|
45
|
+
private getRawAssociationsForResourceFromSetting;
|
|
42
46
|
getAllUserAssociations(): EditorAssociations;
|
|
47
|
+
private getAllUserAssociationsForSetting;
|
|
43
48
|
/**
|
|
44
49
|
* Given the nested nature of the editors map, we merge factories of the same glob and id to make it flat
|
|
45
50
|
* and easier to work with
|
|
@@ -50,6 +55,8 @@ export declare class EditorResolverService extends Disposable implements IEditor
|
|
|
50
55
|
*/
|
|
51
56
|
private get _registeredEditors();
|
|
52
57
|
updateUserAssociations(globPattern: string, editorID: string): void;
|
|
58
|
+
private updateUserAssociationsForType;
|
|
59
|
+
private updateUserAssociationsForSetting;
|
|
53
60
|
private findMatchingEditors;
|
|
54
61
|
getEditors(resource?: URI): RegisteredEditorInfo[];
|
|
55
62
|
/**
|
|
@@ -57,6 +64,7 @@ export declare class EditorResolverService extends Disposable implements IEditor
|
|
|
57
64
|
* @returns The editor and whether there was another default which conflicted with it
|
|
58
65
|
*/
|
|
59
66
|
private getEditor;
|
|
67
|
+
private getEffectivePriority;
|
|
60
68
|
private doResolveEditor;
|
|
61
69
|
/**
|
|
62
70
|
* Moves the first existing editor for a resource to the target group unless already opened there.
|
|
@@ -1,32 +1,38 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import { isRelativePattern } from '@codingame/monaco-vscode-api/vscode/vs/base/common/glob';
|
|
4
3
|
import { insert, distinct } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arrays';
|
|
4
|
+
import { PauseableEmitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
5
|
+
import { isRelativePattern } from '@codingame/monaco-vscode-api/vscode/vs/base/common/glob';
|
|
5
6
|
import { Disposable, toDisposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
7
|
+
import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
6
8
|
import { isEqual, extname, basename } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
7
9
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
10
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
8
11
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
9
12
|
import { EditorResolution, EditorActivation } from '@codingame/monaco-vscode-api/vscode/vs/platform/editor/common/editor';
|
|
10
|
-
import
|
|
11
|
-
import { IEditorGroupsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
12
|
-
import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
13
|
-
import { ResolvedStatus, globMatchesResource, editorsAssociationsSettingId, RegisteredEditorPriority, priorityToRank } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorResolverService';
|
|
13
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/extensions';
|
|
14
14
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
15
|
-
import {
|
|
16
|
-
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
15
|
+
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
17
16
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification';
|
|
18
17
|
import { INotificationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service';
|
|
19
|
-
import '@codingame/monaco-vscode-api/vscode/vs/platform/
|
|
18
|
+
import { IQuickInputService } from '@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
20
19
|
import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
|
|
21
20
|
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
21
|
+
import { isResourceSideBySideEditorInput, EditorResourceAccessor, SideBySideEditor, isResourceDiffEditorInput, isResourceMergeEditorInput, isEditorInputWithOptions, DEFAULT_EDITOR_ASSOCIATION, isEditorInputWithOptionsAndGroup, isResourceMultiDiffEditorInput, isUntitledResourceEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
|
|
22
|
+
import { SideBySideEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor/sideBySideEditorInput';
|
|
22
23
|
import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
23
|
-
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
24
24
|
import { findGroup } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupFinder';
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
25
|
+
import { IEditorGroupsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
26
|
+
import { ResolvedStatus, editorsAssociationsSettingId, diffEditorsAssociationsSettingId, globMatchesResource, RegisteredEditorPriority, priorityToRank } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorResolverService';
|
|
27
27
|
import Severity from '@codingame/monaco-vscode-api/vscode/vs/base/common/severity';
|
|
28
28
|
|
|
29
29
|
var EditorResolverService_1;
|
|
30
|
+
var EditorAssociationType;
|
|
31
|
+
(function(EditorAssociationType) {
|
|
32
|
+
EditorAssociationType[EditorAssociationType["Editor"] = 0] = "Editor";
|
|
33
|
+
EditorAssociationType[EditorAssociationType["DiffEditor"] = 1] = "DiffEditor";
|
|
34
|
+
EditorAssociationType[EditorAssociationType["MergeEditor"] = 2] = "MergeEditor";
|
|
35
|
+
})(EditorAssociationType || (EditorAssociationType = {}));
|
|
30
36
|
let EditorResolverService = class EditorResolverService extends Disposable {
|
|
31
37
|
static {
|
|
32
38
|
EditorResolverService_1 = this;
|
|
@@ -112,7 +118,8 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
112
118
|
let resource = EditorResourceAccessor.getCanonicalUri(untypedEditor, {
|
|
113
119
|
supportSideBySide: SideBySideEditor.PRIMARY
|
|
114
120
|
});
|
|
115
|
-
|
|
121
|
+
const editorAssociationType = isResourceDiffEditorInput(untypedEditor) ? EditorAssociationType.DiffEditor : isResourceMergeEditorInput(untypedEditor) ? EditorAssociationType.MergeEditor : EditorAssociationType.Editor;
|
|
122
|
+
if (this.cache && resource && (this.resourceMatchesCache(resource) || this.resourceMatchesUserAssociation(resource, editorAssociationType))) {
|
|
116
123
|
await this.extensionService.whenInstalledExtensionsRegistered();
|
|
117
124
|
}
|
|
118
125
|
if (resource === undefined) {
|
|
@@ -132,11 +139,11 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
132
139
|
let {
|
|
133
140
|
editor: selectedEditor,
|
|
134
141
|
conflictingDefault
|
|
135
|
-
} = this.getEditor(resource, untypedEditor.options?.override);
|
|
142
|
+
} = this.getEditor(resource, untypedEditor.options?.override, editorAssociationType);
|
|
136
143
|
if (!selectedEditor && (untypedEditor.options?.override || isEditorInputWithOptions(editor))) {
|
|
137
144
|
return ResolvedStatus.NONE;
|
|
138
145
|
} else if (!selectedEditor) {
|
|
139
|
-
const resolvedEditor = this.getEditor(resource, DEFAULT_EDITOR_ASSOCIATION.id);
|
|
146
|
+
const resolvedEditor = this.getEditor(resource, DEFAULT_EDITOR_ASSOCIATION.id, editorAssociationType);
|
|
140
147
|
selectedEditor = resolvedEditor?.editor;
|
|
141
148
|
conflictingDefault = resolvedEditor?.conflictingDefault;
|
|
142
149
|
if (!selectedEditor) {
|
|
@@ -154,12 +161,12 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
154
161
|
}
|
|
155
162
|
const {
|
|
156
163
|
editor: selectedEditor2
|
|
157
|
-
} = this.getEditor(resource2, undefined);
|
|
164
|
+
} = this.getEditor(resource2, undefined, editorAssociationType);
|
|
158
165
|
if (!selectedEditor2 || selectedEditor.editorInfo.id !== selectedEditor2.editorInfo.id) {
|
|
159
166
|
const {
|
|
160
167
|
editor: selectedDiff,
|
|
161
168
|
conflictingDefault: conflictingDefaultDiff
|
|
162
|
-
} = this.getEditor(resource, DEFAULT_EDITOR_ASSOCIATION.id);
|
|
169
|
+
} = this.getEditor(resource, DEFAULT_EDITOR_ASSOCIATION.id, editorAssociationType);
|
|
163
170
|
selectedEditor = selectedDiff;
|
|
164
171
|
conflictingDefault = conflictingDefaultDiff;
|
|
165
172
|
}
|
|
@@ -255,20 +262,45 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
255
262
|
});
|
|
256
263
|
}
|
|
257
264
|
getAssociationsForResource(resource) {
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
)
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
+
return this.getAssociationsForResourceFromSetting(resource, editorsAssociationsSettingId);
|
|
266
|
+
}
|
|
267
|
+
getAssociationsForResourceByType(resource, associationType) {
|
|
268
|
+
if (associationType === EditorAssociationType.DiffEditor || associationType === EditorAssociationType.MergeEditor) {
|
|
269
|
+
const diffAssociations = this.getAssociationsForResourceFromSetting(resource, diffEditorsAssociationsSettingId);
|
|
270
|
+
if (diffAssociations.length) {
|
|
271
|
+
return diffAssociations;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
return this.getAssociationsForResource(resource);
|
|
275
|
+
}
|
|
276
|
+
getAssociationsForResourceFromSetting(resource, settingId) {
|
|
277
|
+
const matchingAssociations = this.getRawAssociationsForResourceFromSetting(resource, settingId);
|
|
265
278
|
const allEditors = this._registeredEditors;
|
|
266
279
|
return matchingAssociations.filter(
|
|
267
280
|
association => allEditors.find(c => c.editorInfo.id === association.viewType)
|
|
268
281
|
);
|
|
269
282
|
}
|
|
283
|
+
getRawAssociationsForResourceByType(resource, associationType) {
|
|
284
|
+
if (associationType === EditorAssociationType.Editor) {
|
|
285
|
+
return this.getRawAssociationsForResourceFromSetting(resource, editorsAssociationsSettingId);
|
|
286
|
+
}
|
|
287
|
+
const diffAssociations = this.getRawAssociationsForResourceFromSetting(resource, diffEditorsAssociationsSettingId);
|
|
288
|
+
return diffAssociations.length ? diffAssociations : this.getRawAssociationsForResourceFromSetting(resource, editorsAssociationsSettingId);
|
|
289
|
+
}
|
|
290
|
+
getRawAssociationsForResourceFromSetting(resource, settingId) {
|
|
291
|
+
const associations = this.getAllUserAssociationsForSetting(settingId);
|
|
292
|
+
const matchingAssociations = associations.filter(
|
|
293
|
+
association => association.filenamePattern && globMatchesResource(association.filenamePattern, resource)
|
|
294
|
+
);
|
|
295
|
+
return matchingAssociations.sort(
|
|
296
|
+
(a, b) => (b.filenamePattern?.length ?? 0) - (a.filenamePattern?.length ?? 0)
|
|
297
|
+
);
|
|
298
|
+
}
|
|
270
299
|
getAllUserAssociations() {
|
|
271
|
-
|
|
300
|
+
return this.getAllUserAssociationsForSetting(editorsAssociationsSettingId);
|
|
301
|
+
}
|
|
302
|
+
getAllUserAssociationsForSetting(settingId) {
|
|
303
|
+
const inspectedEditorAssociations = this.configurationService.inspect(settingId) || {};
|
|
272
304
|
const defaultAssociations = inspectedEditorAssociations.defaultValue ?? {};
|
|
273
305
|
const workspaceAssociations = inspectedEditorAssociations.workspaceValue ?? {};
|
|
274
306
|
const userAssociations = inspectedEditorAssociations.userValue ?? {};
|
|
@@ -333,24 +365,40 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
333
365
|
return Array.from(( this._flattenedEditors.values())).flat();
|
|
334
366
|
}
|
|
335
367
|
updateUserAssociations(globPattern, editorID) {
|
|
368
|
+
this.updateUserAssociationsForSetting(editorsAssociationsSettingId, globPattern, editorID);
|
|
369
|
+
}
|
|
370
|
+
updateUserAssociationsForType(associationType, globPattern, editorID) {
|
|
371
|
+
this.updateUserAssociationsForSetting(
|
|
372
|
+
associationType === EditorAssociationType.DiffEditor ? diffEditorsAssociationsSettingId : editorsAssociationsSettingId,
|
|
373
|
+
globPattern,
|
|
374
|
+
editorID
|
|
375
|
+
);
|
|
376
|
+
}
|
|
377
|
+
updateUserAssociationsForSetting(settingId, globPattern, editorID) {
|
|
336
378
|
const newAssociation = {
|
|
337
379
|
viewType: editorID,
|
|
338
380
|
filenamePattern: globPattern
|
|
339
381
|
};
|
|
340
|
-
const currentAssociations = this.
|
|
382
|
+
const currentAssociations = this.getAllUserAssociationsForSetting(settingId);
|
|
341
383
|
const newSettingObject = Object.create(null);
|
|
342
384
|
for (const association of [...currentAssociations, newAssociation]) {
|
|
343
385
|
if (association.filenamePattern) {
|
|
344
386
|
newSettingObject[association.filenamePattern] = association.viewType;
|
|
345
387
|
}
|
|
346
388
|
}
|
|
347
|
-
this.configurationService.updateValue(
|
|
389
|
+
this.configurationService.updateValue(settingId, newSettingObject);
|
|
348
390
|
}
|
|
349
|
-
findMatchingEditors(resource) {
|
|
350
|
-
const userSettings = this.
|
|
391
|
+
findMatchingEditors(resource, associationType = EditorAssociationType.Editor) {
|
|
392
|
+
const userSettings = this.getAssociationsForResourceByType(resource, associationType);
|
|
351
393
|
const matchingEditors = [];
|
|
352
394
|
for (const [key, editors] of this._flattenedEditors) {
|
|
353
395
|
for (const editor of editors) {
|
|
396
|
+
if (associationType === EditorAssociationType.DiffEditor && !editor.editorFactoryObject.createDiffEditorInput) {
|
|
397
|
+
continue;
|
|
398
|
+
}
|
|
399
|
+
if (associationType === EditorAssociationType.MergeEditor && !editor.editorFactoryObject.createMergeEditorInput) {
|
|
400
|
+
continue;
|
|
401
|
+
}
|
|
354
402
|
const foundInSettings = userSettings.find(setting => setting.viewType === editor.editorInfo.id);
|
|
355
403
|
if ((foundInSettings && editor.editorInfo.priority !== RegisteredEditorPriority.exclusive) || globMatchesResource(key, resource)) {
|
|
356
404
|
matchingEditors.push(editor);
|
|
@@ -358,10 +406,12 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
358
406
|
}
|
|
359
407
|
}
|
|
360
408
|
return matchingEditors.sort((a, b) => {
|
|
361
|
-
|
|
409
|
+
const aPriority = this.getEffectivePriority(a.editorInfo, associationType);
|
|
410
|
+
const bPriority = this.getEffectivePriority(b.editorInfo, associationType);
|
|
411
|
+
if (priorityToRank(bPriority) === priorityToRank(aPriority) && typeof b.globPattern === "string" && typeof a.globPattern === "string") {
|
|
362
412
|
return b.globPattern.length - a.globPattern.length;
|
|
363
413
|
}
|
|
364
|
-
return priorityToRank(
|
|
414
|
+
return priorityToRank(bPriority) - priorityToRank(aPriority);
|
|
365
415
|
});
|
|
366
416
|
}
|
|
367
417
|
getEditors(resource) {
|
|
@@ -375,9 +425,15 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
375
425
|
}
|
|
376
426
|
return distinct(( this._registeredEditors.map(editor => editor.editorInfo)), editor => editor.id);
|
|
377
427
|
}
|
|
378
|
-
getEditor(resource, editorId) {
|
|
428
|
+
getEditor(resource, editorId, associationType) {
|
|
379
429
|
const findMatchingEditor = (editors, viewType) => {
|
|
380
430
|
return editors.find(editor => {
|
|
431
|
+
if (associationType === EditorAssociationType.DiffEditor && !editor.editorFactoryObject.createDiffEditorInput) {
|
|
432
|
+
return false;
|
|
433
|
+
}
|
|
434
|
+
if (associationType === EditorAssociationType.MergeEditor && !editor.editorFactoryObject.createMergeEditorInput) {
|
|
435
|
+
return false;
|
|
436
|
+
}
|
|
381
437
|
if (editor.options?.canSupportResource !== undefined) {
|
|
382
438
|
return editor.editorInfo.id === viewType && editor.options.canSupportResource(resource);
|
|
383
439
|
}
|
|
@@ -391,11 +447,11 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
391
447
|
conflictingDefault: false
|
|
392
448
|
};
|
|
393
449
|
}
|
|
394
|
-
const editors = this.findMatchingEditors(resource);
|
|
395
|
-
const associationsFromSetting = this.
|
|
450
|
+
const editors = this.findMatchingEditors(resource, associationType);
|
|
451
|
+
const associationsFromSetting = this.getAssociationsForResourceByType(resource, associationType);
|
|
396
452
|
const minPriority = editorId === EditorResolution.EXCLUSIVE_ONLY ? RegisteredEditorPriority.exclusive : RegisteredEditorPriority.builtin;
|
|
397
453
|
let possibleEditors = editors.filter(
|
|
398
|
-
editor => priorityToRank(editor.editorInfo
|
|
454
|
+
editor => priorityToRank(this.getEffectivePriority(editor.editorInfo, associationType)) >= priorityToRank(minPriority) && editor.editorInfo.id !== DEFAULT_EDITOR_ASSOCIATION.id
|
|
399
455
|
);
|
|
400
456
|
if (possibleEditors.length === 0) {
|
|
401
457
|
return {
|
|
@@ -403,12 +459,12 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
403
459
|
conflictingDefault: false
|
|
404
460
|
};
|
|
405
461
|
}
|
|
406
|
-
const selectedViewType = possibleEditors[0].editorInfo
|
|
462
|
+
const selectedViewType = this.getEffectivePriority(possibleEditors[0].editorInfo, associationType) === RegisteredEditorPriority.exclusive ? possibleEditors[0].editorInfo.id : associationsFromSetting[0]?.viewType || (possibleEditors.find(
|
|
407
463
|
editor => (!editor.options?.canSupportResource || editor.options.canSupportResource(resource))
|
|
408
464
|
)?.editorInfo.id) || possibleEditors[0].editorInfo.id;
|
|
409
465
|
let conflictingDefault = false;
|
|
410
466
|
possibleEditors = possibleEditors.filter(
|
|
411
|
-
editor => editor.editorInfo
|
|
467
|
+
editor => this.getEffectivePriority(editor.editorInfo, associationType) !== RegisteredEditorPriority.exclusive
|
|
412
468
|
).filter(
|
|
413
469
|
editor => !editor.options?.canSupportResource || editor.options.canSupportResource(resource)
|
|
414
470
|
);
|
|
@@ -420,6 +476,16 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
420
476
|
conflictingDefault
|
|
421
477
|
};
|
|
422
478
|
}
|
|
479
|
+
getEffectivePriority(editorInfo, associationType) {
|
|
480
|
+
switch (associationType) {
|
|
481
|
+
case EditorAssociationType.DiffEditor:
|
|
482
|
+
return editorInfo.diffEditorPriority ?? editorInfo.priority;
|
|
483
|
+
case EditorAssociationType.MergeEditor:
|
|
484
|
+
return editorInfo.mergeEditorPriority ?? editorInfo.priority;
|
|
485
|
+
default:
|
|
486
|
+
return editorInfo.priority;
|
|
487
|
+
}
|
|
488
|
+
}
|
|
423
489
|
async doResolveEditor(editor, group, selectedEditor) {
|
|
424
490
|
let options = editor.options;
|
|
425
491
|
const resource = EditorResourceAccessor.getCanonicalUri(editor, {
|
|
@@ -540,7 +606,8 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
540
606
|
return out;
|
|
541
607
|
}
|
|
542
608
|
async doHandleConflictingDefaults(resource, editorName, untypedInput, currentEditor, group) {
|
|
543
|
-
const
|
|
609
|
+
const associationType = isResourceDiffEditorInput(untypedInput) ? EditorAssociationType.DiffEditor : isResourceMergeEditorInput(untypedInput) ? EditorAssociationType.MergeEditor : EditorAssociationType.Editor;
|
|
610
|
+
const editors = this.findMatchingEditors(resource, associationType);
|
|
544
611
|
const storedChoices = JSON.parse(this.storageService.get(
|
|
545
612
|
EditorResolverService_1.conflictingDefaultsStorageID,
|
|
546
613
|
StorageScope.PROFILE,
|
|
@@ -560,8 +627,8 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
560
627
|
if (storedChoices[globForResource]?.find(editorID => editorID === currentEditor.editorId)) {
|
|
561
628
|
return;
|
|
562
629
|
}
|
|
563
|
-
const handle = this.notificationService.prompt(Severity.Warning, ( localize(
|
|
564
|
-
label: ( localize(
|
|
630
|
+
const handle = this.notificationService.prompt(Severity.Warning, ( localize(16493, "There are multiple default editors available for the resource.")), [{
|
|
631
|
+
label: ( localize(16494, "Configure Default")),
|
|
565
632
|
run: async () => {
|
|
566
633
|
const picked = await this.doPickEditor(untypedInput, true);
|
|
567
634
|
if (!picked) {
|
|
@@ -579,7 +646,7 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
579
646
|
}]);
|
|
580
647
|
}
|
|
581
648
|
}, {
|
|
582
|
-
label: ( localize(
|
|
649
|
+
label: ( localize(16495, "Keep {0}", editorName)),
|
|
583
650
|
run: writeCurrentEditorsToStorage
|
|
584
651
|
}]);
|
|
585
652
|
const onCloseListener = handle.onDidClose(() => {
|
|
@@ -587,11 +654,14 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
587
654
|
onCloseListener.dispose();
|
|
588
655
|
});
|
|
589
656
|
}
|
|
590
|
-
mapEditorsToQuickPickEntry(resource, showDefaultPicker) {
|
|
657
|
+
mapEditorsToQuickPickEntry(resource, showDefaultPicker, associationType) {
|
|
591
658
|
const currentEditor = this.editorGroupService.activeGroup.findEditors(resource).at(0);
|
|
592
|
-
let registeredEditors = resource.scheme === Schemas.untitled ? this._registeredEditors.filter(e => e.editorInfo.priority !== RegisteredEditorPriority.exclusive) : this.findMatchingEditors(resource);
|
|
659
|
+
let registeredEditors = resource.scheme === Schemas.untitled ? this._registeredEditors.filter(e => e.editorInfo.priority !== RegisteredEditorPriority.exclusive) : this.findMatchingEditors(resource, associationType);
|
|
660
|
+
if (associationType === EditorAssociationType.DiffEditor) {
|
|
661
|
+
registeredEditors = registeredEditors.filter(editor => !!editor.editorFactoryObject.createDiffEditorInput);
|
|
662
|
+
}
|
|
593
663
|
registeredEditors = distinct(registeredEditors, c => c.editorInfo.id);
|
|
594
|
-
const defaultSetting = this.
|
|
664
|
+
const defaultSetting = this.getAssociationsForResourceByType(resource, associationType)[0]?.viewType;
|
|
595
665
|
registeredEditors = registeredEditors.sort((a, b) => {
|
|
596
666
|
if (a.editorInfo.id === DEFAULT_EDITOR_ASSOCIATION.id) {
|
|
597
667
|
return -1;
|
|
@@ -602,9 +672,9 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
602
672
|
}
|
|
603
673
|
});
|
|
604
674
|
const quickPickEntries = [];
|
|
605
|
-
const currentlyActiveLabel = ( localize(
|
|
606
|
-
const currentDefaultLabel = ( localize(
|
|
607
|
-
const currentDefaultAndActiveLabel = ( localize(
|
|
675
|
+
const currentlyActiveLabel = ( localize(16496, "Active"));
|
|
676
|
+
const currentDefaultLabel = ( localize(16497, "Default"));
|
|
677
|
+
const currentDefaultAndActiveLabel = ( localize(16498, "Active and Default"));
|
|
608
678
|
let defaultViewType = defaultSetting;
|
|
609
679
|
if (!defaultViewType && registeredEditors.length > 2 && registeredEditors[1]?.editorInfo.priority !== RegisteredEditorPriority.option) {
|
|
610
680
|
defaultViewType = registeredEditors[1]?.editorInfo.id;
|
|
@@ -631,7 +701,7 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
631
701
|
quickPickEntries.push(separator);
|
|
632
702
|
const configureDefaultEntry = {
|
|
633
703
|
id: EditorResolverService_1.configureDefaultID,
|
|
634
|
-
label: ( localize(
|
|
704
|
+
label: ( localize(16499, "Configure default editor for '{0}'...", `*${extname(resource)}`))
|
|
635
705
|
};
|
|
636
706
|
quickPickEntries.push(configureDefaultEntry);
|
|
637
707
|
}
|
|
@@ -646,12 +716,13 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
646
716
|
scheme: Schemas.untitled
|
|
647
717
|
}));
|
|
648
718
|
}
|
|
649
|
-
const
|
|
719
|
+
const associationType = isResourceDiffEditorInput(editor) ? EditorAssociationType.DiffEditor : EditorAssociationType.Editor;
|
|
720
|
+
const editorPicks = this.mapEditorsToQuickPickEntry(resource, showDefaultPicker, associationType);
|
|
650
721
|
const disposables = ( new DisposableStore());
|
|
651
722
|
const editorPicker = disposables.add(this.quickInputService.createQuickPick({
|
|
652
723
|
useSeparators: true
|
|
653
724
|
}));
|
|
654
|
-
const placeHolderMessage = showDefaultPicker ? ( localize(
|
|
725
|
+
const placeHolderMessage = showDefaultPicker ? ( localize(16500, "Select new default editor for '{0}'", `*${extname(resource)}`)) : ( localize(16501, "Select editor for '{0}'", basename(resource)));
|
|
655
726
|
editorPicker.placeholder = placeHolderMessage;
|
|
656
727
|
editorPicker.canAcceptInBackground = true;
|
|
657
728
|
editorPicker.items = editorPicks;
|
|
@@ -670,7 +741,7 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
670
741
|
};
|
|
671
742
|
}
|
|
672
743
|
if (resource && showDefaultPicker && result?.item.id) {
|
|
673
|
-
this.
|
|
744
|
+
this.updateUserAssociationsForType(associationType, `*${extname(resource)}`, result.item.id);
|
|
674
745
|
}
|
|
675
746
|
resolve(result);
|
|
676
747
|
}));
|
|
@@ -684,7 +755,7 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
684
755
|
openInBackground: false
|
|
685
756
|
});
|
|
686
757
|
if (resource && e.item?.id) {
|
|
687
|
-
this.
|
|
758
|
+
this.updateUserAssociationsForType(associationType, `*${extname(resource)}`, e.item.id);
|
|
688
759
|
}
|
|
689
760
|
}));
|
|
690
761
|
editorPicker.show();
|
|
@@ -718,7 +789,10 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
718
789
|
cacheStorage.add(globPattern);
|
|
719
790
|
}
|
|
720
791
|
}
|
|
721
|
-
const userAssociations =
|
|
792
|
+
const userAssociations = [
|
|
793
|
+
...this.getAllUserAssociations(),
|
|
794
|
+
...this.getAllUserAssociationsForSetting(diffEditorsAssociationsSettingId)
|
|
795
|
+
];
|
|
722
796
|
for (const association of userAssociations) {
|
|
723
797
|
if (association.filenamePattern) {
|
|
724
798
|
cacheStorage.add(association.filenamePattern);
|
|
@@ -731,10 +805,10 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
731
805
|
StorageTarget.MACHINE
|
|
732
806
|
);
|
|
733
807
|
}
|
|
734
|
-
resourceMatchesUserAssociation(resource) {
|
|
735
|
-
const userAssociations = this.
|
|
808
|
+
resourceMatchesUserAssociation(resource, associationType) {
|
|
809
|
+
const userAssociations = this.getRawAssociationsForResourceByType(resource, associationType);
|
|
736
810
|
for (const association of userAssociations) {
|
|
737
|
-
if (association.
|
|
811
|
+
if (association.viewType !== DEFAULT_EDITOR_ASSOCIATION.id) {
|
|
738
812
|
return true;
|
|
739
813
|
}
|
|
740
814
|
}
|
|
@@ -101,33 +101,33 @@ let HistoryService = class HistoryService extends Disposable {
|
|
|
101
101
|
return matcher;
|
|
102
102
|
}));
|
|
103
103
|
this.editorHelper = this.instantiationService.createInstance(EditorHelper);
|
|
104
|
-
this.canNavigateBackContextKey = ( new RawContextKey("canNavigateBack", false, ( localize(
|
|
105
|
-
this.canNavigateForwardContextKey = ( new RawContextKey("canNavigateForward", false, ( localize(
|
|
104
|
+
this.canNavigateBackContextKey = ( new RawContextKey("canNavigateBack", false, ( localize(16716, "Whether it is possible to navigate back in editor history")))).bindTo(this.contextKeyService);
|
|
105
|
+
this.canNavigateForwardContextKey = ( new RawContextKey("canNavigateForward", false, ( localize(16717, "Whether it is possible to navigate forward in editor history")))).bindTo(this.contextKeyService);
|
|
106
106
|
this.canNavigateBackInNavigationsContextKey = ( new RawContextKey("canNavigateBackInNavigationLocations", false, ( localize(
|
|
107
|
-
|
|
107
|
+
16718,
|
|
108
108
|
"Whether it is possible to navigate back in editor navigation locations history"
|
|
109
109
|
)))).bindTo(this.contextKeyService);
|
|
110
110
|
this.canNavigateForwardInNavigationsContextKey = ( new RawContextKey("canNavigateForwardInNavigationLocations", false, ( localize(
|
|
111
|
-
|
|
111
|
+
16719,
|
|
112
112
|
"Whether it is possible to navigate forward in editor navigation locations history"
|
|
113
113
|
)))).bindTo(this.contextKeyService);
|
|
114
114
|
this.canNavigateToLastNavigationLocationContextKey = ( new RawContextKey("canNavigateToLastNavigationLocation", false, ( localize(
|
|
115
|
-
|
|
115
|
+
16720,
|
|
116
116
|
"Whether it is possible to navigate to the last editor navigation location"
|
|
117
117
|
)))).bindTo(this.contextKeyService);
|
|
118
118
|
this.canNavigateBackInEditsContextKey = ( new RawContextKey("canNavigateBackInEditLocations", false, ( localize(
|
|
119
|
-
|
|
119
|
+
16721,
|
|
120
120
|
"Whether it is possible to navigate back in editor edit locations history"
|
|
121
121
|
)))).bindTo(this.contextKeyService);
|
|
122
122
|
this.canNavigateForwardInEditsContextKey = ( new RawContextKey("canNavigateForwardInEditLocations", false, ( localize(
|
|
123
|
-
|
|
123
|
+
16722,
|
|
124
124
|
"Whether it is possible to navigate forward in editor edit locations history"
|
|
125
125
|
)))).bindTo(this.contextKeyService);
|
|
126
126
|
this.canNavigateToLastEditLocationContextKey = ( new RawContextKey("canNavigateToLastEditLocation", false, ( localize(
|
|
127
|
-
|
|
127
|
+
16723,
|
|
128
128
|
"Whether it is possible to navigate to the last editor edit location"
|
|
129
129
|
)))).bindTo(this.contextKeyService);
|
|
130
|
-
this.canReopenClosedEditorContextKey = ( new RawContextKey("canReopenClosedEditor", false, ( localize(
|
|
130
|
+
this.canReopenClosedEditorContextKey = ( new RawContextKey("canReopenClosedEditor", false, ( localize(16724, "Whether it is possible to reopen the last closed editor")))).bindTo(this.contextKeyService);
|
|
131
131
|
this.registerListeners();
|
|
132
132
|
if (this.editorService.activeEditorPane) {
|
|
133
133
|
this.onDidActiveEditorChange();
|
|
@@ -173,20 +173,20 @@ let ProgressService = class ProgressService extends Disposable {
|
|
|
173
173
|
let title;
|
|
174
174
|
const source = options.source && typeof options.source !== "string" ? options.source.label : options.source;
|
|
175
175
|
if (progressTitle && progressMessage) {
|
|
176
|
-
text = ( localize(
|
|
177
|
-
title = source ? ( localize(
|
|
176
|
+
text = ( localize(16853, "{0}: {1}", progressTitle, progressMessage));
|
|
177
|
+
title = source ? ( localize(16854, "[{0}] {1}: {2}", source, progressTitle, progressMessage)) : text;
|
|
178
178
|
} else if (progressTitle) {
|
|
179
179
|
text = progressTitle;
|
|
180
|
-
title = source ? ( localize(
|
|
180
|
+
title = source ? ( localize(16855, "[{0}]: {1}", source, progressTitle)) : text;
|
|
181
181
|
} else if (progressMessage) {
|
|
182
182
|
text = progressMessage;
|
|
183
|
-
title = source ? ( localize(
|
|
183
|
+
title = source ? ( localize(16855, "[{0}]: {1}", source, progressMessage)) : text;
|
|
184
184
|
} else {
|
|
185
185
|
this.updateWindowProgress(idx + 1);
|
|
186
186
|
return;
|
|
187
187
|
}
|
|
188
188
|
const statusEntryProperties = {
|
|
189
|
-
name: ( localize(
|
|
189
|
+
name: ( localize(16856, "Progress Message")),
|
|
190
190
|
text,
|
|
191
191
|
showProgress: options.type || true,
|
|
192
192
|
ariaLabel: text,
|
|
@@ -292,7 +292,7 @@ let ProgressService = class ProgressService extends Disposable {
|
|
|
292
292
|
constructor() {
|
|
293
293
|
super(
|
|
294
294
|
"progress.cancel",
|
|
295
|
-
typeof options.cancellable === "string" ? options.cancellable : ( localize(
|
|
295
|
+
typeof options.cancellable === "string" ? options.cancellable : ( localize(16857, "Cancel")),
|
|
296
296
|
undefined,
|
|
297
297
|
true
|
|
298
298
|
);
|
|
@@ -484,7 +484,7 @@ let ProgressService = class ProgressService extends Disposable {
|
|
|
484
484
|
const buttons = options.buttons || [];
|
|
485
485
|
if (!options.sticky) {
|
|
486
486
|
buttons.push(
|
|
487
|
-
options.cancellable ? (typeof options.cancellable === "boolean" ? ( localize(
|
|
487
|
+
options.cancellable ? (typeof options.cancellable === "boolean" ? ( localize(16857, "Cancel")) : options.cancellable) : ( localize(16858, "Dismiss"))
|
|
488
488
|
);
|
|
489
489
|
}
|
|
490
490
|
dialog = ( new Dialog(
|
|
@@ -9,7 +9,6 @@ import { PLAINTEXT_LANGUAGE_ID } from '@codingame/monaco-vscode-api/vscode/vs/ed
|
|
|
9
9
|
import { IWorkbenchEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service';
|
|
10
10
|
import { IFilesConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/filesConfiguration/common/filesConfigurationService.service';
|
|
11
11
|
import { IPathService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/path/common/pathService.service';
|
|
12
|
-
import { UntitledTextEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/untitled/common/untitledTextEditorInput';
|
|
13
12
|
import { NO_TYPE_ID } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/workingCopy/common/workingCopy';
|
|
14
13
|
import { IWorkingCopyEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/workingCopy/common/workingCopyEditorService.service';
|
|
15
14
|
import { IUntitledTextEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/untitled/common/untitledTextEditorService.service';
|
|
@@ -91,7 +90,7 @@ let UntitledTextEditorWorkingCopyEditorHandler = class UntitledTextEditorWorking
|
|
|
91
90
|
if (!this.handles(workingCopy)) {
|
|
92
91
|
return false;
|
|
93
92
|
}
|
|
94
|
-
return
|
|
93
|
+
return isEqual(workingCopy.resource, editor.resource);
|
|
95
94
|
}
|
|
96
95
|
createEditor(workingCopy) {
|
|
97
96
|
let editorInputResource;
|
|
@@ -83,8 +83,9 @@ export declare class ViewDescriptorService extends Disposable implements IViewDe
|
|
|
83
83
|
getViewContainerModel(container: ViewContainer): ViewContainerModel;
|
|
84
84
|
getViewContainerById(id: string): ViewContainer | null;
|
|
85
85
|
getViewContainersByLocation(location: ViewContainerLocation): ViewContainer[];
|
|
86
|
-
private
|
|
87
|
-
private
|
|
86
|
+
private isViewContainerEnabled;
|
|
87
|
+
private isViewEnabled;
|
|
88
|
+
private isEnabled;
|
|
88
89
|
getDefaultViewContainer(location: ViewContainerLocation): ViewContainer | undefined;
|
|
89
90
|
canMoveViews(): boolean;
|
|
90
91
|
moveViewContainerToLocation(viewContainer: ViewContainer, location: ViewContainerLocation, requestedIndex?: number, reason?: string): void;
|