@codingame/monaco-vscode-view-common-service-override 5.3.0 → 6.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/package.json +3 -3
- package/viewCommon.js +1 -1
- package/vscode/src/vs/base/browser/ui/centered/centeredViewLayout.js +2 -1
- package/vscode/src/vs/base/browser/ui/grid/grid.js +34 -24
- package/vscode/src/vs/base/browser/ui/grid/gridview.js +35 -34
- package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +9 -60
- package/vscode/src/vs/workbench/browser/actions/listCommands.js +119 -79
- package/vscode/src/vs/workbench/browser/actions/navigationActions.js +76 -64
- package/vscode/src/vs/workbench/browser/media/style.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js +51 -71
- package/vscode/src/vs/workbench/browser/parts/activitybar/media/activityaction.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.js +21 -18
- package/vscode/src/vs/workbench/browser/parts/compositeBar.js +6 -6
- package/vscode/src/vs/workbench/browser/parts/compositePart.js +11 -8
- package/vscode/src/vs/workbench/browser/parts/editor/auxiliaryEditorPart.js +8 -7
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +112 -107
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +2 -2
- package/vscode/src/vs/workbench/browser/parts/editor/editorDropTarget.js +36 -30
- package/vscode/src/vs/workbench/browser/parts/editor/editorPart.js +75 -69
- package/vscode/src/vs/workbench/browser/parts/editor/editorParts.js +143 -25
- package/vscode/src/vs/workbench/browser/parts/paneCompositeBar.js +20 -16
- package/vscode/src/vs/workbench/browser/parts/paneCompositePart.js +13 -11
- package/vscode/src/vs/workbench/browser/parts/paneCompositePartService.js +5 -4
- package/vscode/src/vs/workbench/browser/parts/panel/panelPart.js +8 -5
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarActions.js +9 -6
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.js +51 -37
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +28 -25
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +23 -13
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +5 -5
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditor.contribution.js +3 -2
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.js +2 -1
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.js +34 -23
- package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +3 -2
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +7 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +3 -2
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpener.contribution.js +1 -0
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js +17 -15
- package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.js +2 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.js +2 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.js +4 -3
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/conflictActions.js +7 -7
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +2 -2
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.js +2 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +9 -8
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js +2 -2
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +11 -6
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/scrollSynchronizer.js +24 -23
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +3 -2
- package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.js +5 -4
- package/vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.js +2 -1
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +26 -23
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +23 -13
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +5 -5
- package/vscode/src/vs/workbench/contrib/webview/browser/resourceLoading.js +2 -2
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +7 -6
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewService.js +8 -6
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +10 -8
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +3 -2
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.js +4 -3
- package/vscode/src/vs/workbench/services/activity/browser/activityService.js +1 -0
- package/vscode/src/vs/workbench/services/editor/browser/editorPaneService.js +1 -0
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +21 -19
- package/vscode/src/vs/workbench/services/history/browser/historyService.js +73 -63
- package/vscode/src/vs/workbench/services/progress/browser/progressService.js +19 -15
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.js +1 -0
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +23 -18
- package/vscode/src/vs/workbench/services/views/common/viewContainerModel.js +20 -14
- package/vscode/src/vs/base/browser/deviceAccess.js +0 -61
- package/vscode/src/vs/platform/languagePacks/common/localizedStrings.js +0 -13
- package/vscode/src/vs/workbench/browser/window.js +0 -330
- package/vscode/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.js +0 -371
- package/vscode/src/vs/workbench/services/driver/browser/driver.js +0 -188
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { KeyMod, KeyCode } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
1
2
|
import { EditorContextKeys } from 'vscode/vscode/vs/editor/common/editorContextKeys';
|
|
2
3
|
import { localizeWithPath, localize2WithPath } from 'vscode/vscode/vs/nls';
|
|
3
4
|
import { Action2, MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
4
5
|
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
6
|
+
import { KeybindingWeight } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
5
7
|
import { Categories } from 'vscode/vscode/vs/platform/action/common/actionCommonCategories';
|
|
6
8
|
import { KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_ENABLED, KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_VISIBLE, KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_FOCUSED } from 'vscode/vscode/vs/workbench/contrib/webview/browser/webview';
|
|
7
9
|
import { IWebviewService } from 'vscode/vscode/vs/workbench/contrib/webview/browser/webview.service';
|
|
@@ -26,8 +28,8 @@ class ShowWebViewEditorFindWidgetAction extends Action2 {
|
|
|
26
28
|
webviewActiveContextKeyExpr,
|
|
27
29
|
KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_ENABLED
|
|
28
30
|
))),
|
|
29
|
-
primary:
|
|
30
|
-
weight:
|
|
31
|
+
primary: KeyMod.CtrlCmd | KeyCode.KeyF,
|
|
32
|
+
weight: KeybindingWeight.EditorContrib
|
|
31
33
|
}
|
|
32
34
|
});
|
|
33
35
|
}
|
|
@@ -47,8 +49,8 @@ class HideWebViewEditorFindCommand extends Action2 {
|
|
|
47
49
|
webviewActiveContextKeyExpr,
|
|
48
50
|
KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_VISIBLE
|
|
49
51
|
))),
|
|
50
|
-
primary:
|
|
51
|
-
weight:
|
|
52
|
+
primary: KeyCode.Escape,
|
|
53
|
+
weight: KeybindingWeight.EditorContrib
|
|
52
54
|
}
|
|
53
55
|
});
|
|
54
56
|
}
|
|
@@ -68,8 +70,8 @@ class WebViewEditorFindNextCommand extends Action2 {
|
|
|
68
70
|
webviewActiveContextKeyExpr,
|
|
69
71
|
KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_FOCUSED
|
|
70
72
|
))),
|
|
71
|
-
primary:
|
|
72
|
-
weight:
|
|
73
|
+
primary: KeyCode.Enter,
|
|
74
|
+
weight: KeybindingWeight.EditorContrib
|
|
73
75
|
}
|
|
74
76
|
});
|
|
75
77
|
}
|
|
@@ -89,8 +91,8 @@ class WebViewEditorFindPreviousCommand extends Action2 {
|
|
|
89
91
|
webviewActiveContextKeyExpr,
|
|
90
92
|
KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_FOCUSED
|
|
91
93
|
))),
|
|
92
|
-
primary:
|
|
93
|
-
weight:
|
|
94
|
+
primary: KeyMod.Shift | KeyCode.Enter,
|
|
95
|
+
weight: KeybindingWeight.EditorContrib
|
|
94
96
|
}
|
|
95
97
|
});
|
|
96
98
|
}
|
|
@@ -3,9 +3,10 @@ import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
|
3
3
|
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
4
4
|
import { registerAction2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
5
5
|
import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
|
|
6
|
+
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
6
7
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
7
8
|
import { EditorPaneDescriptor } from 'vscode/vscode/vs/workbench/browser/editor';
|
|
8
|
-
import { registerWorkbenchContribution2 } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
9
|
+
import { registerWorkbenchContribution2, WorkbenchPhase } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
9
10
|
import { EditorExtensions } from 'vscode/vscode/vs/workbench/common/editor';
|
|
10
11
|
import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
11
12
|
import { ShowWebViewEditorFindWidgetAction, HideWebViewEditorFindCommand, WebViewEditorFindNextCommand, WebViewEditorFindPreviousCommand, ReloadWebviewAction } from './webviewCommands.js';
|
|
@@ -55,7 +56,7 @@ WebviewPanelContribution = ( (__decorate([
|
|
|
55
56
|
( (__param(0, IEditorService))),
|
|
56
57
|
( (__param(1, IEditorGroupsService)))
|
|
57
58
|
], WebviewPanelContribution)));
|
|
58
|
-
registerWorkbenchContribution2(WebviewPanelContribution.ID, WebviewPanelContribution,
|
|
59
|
+
registerWorkbenchContribution2(WebviewPanelContribution.ID, WebviewPanelContribution, WorkbenchPhase.BlockStartup);
|
|
59
60
|
( (Registry.as(EditorExtensions.EditorFactory))).registerEditorSerializer(WebviewEditorInputSerializer.ID, WebviewEditorInputSerializer);
|
|
60
61
|
registerAction2(ShowWebViewEditorFindWidgetAction);
|
|
61
62
|
registerAction2(HideWebViewEditorFindCommand);
|
|
@@ -11,6 +11,7 @@ import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/c
|
|
|
11
11
|
import { IKeybindingService } from 'vscode/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
12
12
|
import { IOpenerService } from 'vscode/vscode/vs/platform/opener/common/opener.service';
|
|
13
13
|
import { IProgressService } from 'vscode/vscode/vs/platform/progress/common/progress.service';
|
|
14
|
+
import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
14
15
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
15
16
|
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
16
17
|
import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService.service';
|
|
@@ -18,7 +19,7 @@ import { ViewPane, ViewPaneShowActions } from 'vscode/vscode/vs/workbench/browse
|
|
|
18
19
|
import { Memento } from 'vscode/vscode/vs/workbench/common/memento';
|
|
19
20
|
import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views.service';
|
|
20
21
|
import { IViewsService } from 'vscode/vscode/vs/workbench/services/views/common/viewsService.service';
|
|
21
|
-
import { ExtensionKeyedWebviewOriginStore } from 'vscode/vscode/vs/workbench/contrib/webview/browser/webview';
|
|
22
|
+
import { ExtensionKeyedWebviewOriginStore, WebviewContentPurpose } from 'vscode/vscode/vs/workbench/contrib/webview/browser/webview';
|
|
22
23
|
import { IWebviewService } from 'vscode/vscode/vs/workbench/contrib/webview/browser/webview.service';
|
|
23
24
|
import { WebviewWindowDragMonitor } from 'vscode/vscode/vs/workbench/contrib/webview/browser/webviewWindowDragMonitor';
|
|
24
25
|
import { IWebviewViewService } from 'vscode/vscode/vs/workbench/contrib/webviewView/browser/webviewViewService.service';
|
|
@@ -57,7 +58,7 @@ let WebviewViewPane = class WebviewViewPane extends ViewPane {
|
|
|
57
58
|
this.extensionId = options.fromExtensionId;
|
|
58
59
|
this.defaultTitle = this.title;
|
|
59
60
|
this.memento = ( new Memento(`webviewView.${this.id}`, storageService));
|
|
60
|
-
this.viewState = this.memento.getMemento(
|
|
61
|
+
this.viewState = this.memento.getMemento(StorageScope.WORKSPACE, StorageTarget.MACHINE);
|
|
61
62
|
this._register(this.onDidChangeBodyVisibility(() => this.updateTreeVisibility()));
|
|
62
63
|
this._register(this.webviewViewService.onNewResolverRegistered(e => {
|
|
63
64
|
if (e.viewType === this.id) {
|
|
@@ -121,7 +122,7 @@ let WebviewViewPane = class WebviewViewPane extends ViewPane {
|
|
|
121
122
|
origin,
|
|
122
123
|
providedViewType: this.id,
|
|
123
124
|
title: this.title,
|
|
124
|
-
options: { purpose:
|
|
125
|
+
options: { purpose: WebviewContentPurpose.WebviewView },
|
|
125
126
|
contentOptions: {},
|
|
126
127
|
extension: this.extensionId ? { id: this.extensionId } : undefined
|
|
127
128
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import { IActivityService } from 'vscode/vscode/vs/workbench/services/activity/common/activity.service';
|
|
3
3
|
import { Disposable, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
|
+
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
4
5
|
import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views.service';
|
|
5
6
|
import { ACCOUNTS_ACTIVITY_ID, GLOBAL_ACTIVITY_ID } from 'vscode/vscode/vs/workbench/common/activity';
|
|
6
7
|
import { Event, Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
2
2
|
import { EditorPaneDescriptor } from 'vscode/vscode/vs/workbench/browser/editor';
|
|
3
|
+
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
3
4
|
|
|
4
5
|
class EditorPaneService {
|
|
5
6
|
constructor() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import { isRelativePattern } from 'vscode/vscode/vs/base/common/glob';
|
|
3
|
-
import { insert,
|
|
3
|
+
import { insert, distinct, firstOrDefault } from 'vscode/vscode/vs/base/common/arrays';
|
|
4
4
|
import { Disposable, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
5
5
|
import { isEqual, extname, basename } from 'vscode/vscode/vs/base/common/resources';
|
|
6
6
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
@@ -9,13 +9,15 @@ import { EditorResolution, EditorActivation } from 'vscode/vscode/vs/platform/ed
|
|
|
9
9
|
import { isResourceSideBySideEditorInput, EditorResourceAccessor, SideBySideEditor, isEditorInputWithOptions, DEFAULT_EDITOR_ASSOCIATION, isResourceDiffEditorInput, isEditorInputWithOptionsAndGroup, isResourceMergeEditorInput, isResourceMultiDiffEditorInput, isUntitledResourceEditorInput } from 'vscode/vscode/vs/workbench/common/editor';
|
|
10
10
|
import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
11
11
|
import { Schemas } from 'vscode/vscode/vs/base/common/network';
|
|
12
|
-
import { globMatchesResource, editorsAssociationsSettingId, RegisteredEditorPriority, priorityToRank } from 'vscode/vscode/vs/workbench/services/editor/common/editorResolverService';
|
|
12
|
+
import { ResolvedStatus, globMatchesResource, editorsAssociationsSettingId, RegisteredEditorPriority, priorityToRank } from 'vscode/vscode/vs/workbench/services/editor/common/editorResolverService';
|
|
13
13
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
14
14
|
import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
15
15
|
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
16
16
|
import 'vscode/vscode/vs/platform/notification/common/notification';
|
|
17
17
|
import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification.service';
|
|
18
18
|
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
19
|
+
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
20
|
+
import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
19
21
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
20
22
|
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
21
23
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
@@ -48,9 +50,9 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
48
50
|
this._flattenedEditors = ( (new Map()));
|
|
49
51
|
this._shouldReFlattenEditors = true;
|
|
50
52
|
this.cache = ( (new Set(
|
|
51
|
-
JSON.parse(this.storageService.get(EditorResolverService_1.cacheStorageID,
|
|
53
|
+
JSON.parse(this.storageService.get(EditorResolverService_1.cacheStorageID, StorageScope.PROFILE, JSON.stringify([])))
|
|
52
54
|
)));
|
|
53
|
-
this.storageService.remove(EditorResolverService_1.cacheStorageID,
|
|
55
|
+
this.storageService.remove(EditorResolverService_1.cacheStorageID, StorageScope.PROFILE);
|
|
54
56
|
this._register(this.storageService.onWillSaveState(() => {
|
|
55
57
|
this.cacheEditors();
|
|
56
58
|
}));
|
|
@@ -83,7 +85,7 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
83
85
|
resolvedUntypedAndGroup = resolvedUntypedAndGroupResult;
|
|
84
86
|
}
|
|
85
87
|
if (!resolvedUntypedAndGroup) {
|
|
86
|
-
return
|
|
88
|
+
return ResolvedStatus.NONE;
|
|
87
89
|
}
|
|
88
90
|
const [untypedEditor, group, activation] = resolvedUntypedAndGroup;
|
|
89
91
|
if (activation) {
|
|
@@ -97,25 +99,25 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
97
99
|
resource = ( (URI.from({ scheme: Schemas.untitled })));
|
|
98
100
|
}
|
|
99
101
|
else if (resource.scheme === undefined || resource === null) {
|
|
100
|
-
return
|
|
102
|
+
return ResolvedStatus.NONE;
|
|
101
103
|
}
|
|
102
104
|
if (untypedEditor.options?.override === EditorResolution.PICK) {
|
|
103
105
|
const picked = await this.doPickEditor(untypedEditor);
|
|
104
106
|
if (!picked) {
|
|
105
|
-
return
|
|
107
|
+
return ResolvedStatus.ABORT;
|
|
106
108
|
}
|
|
107
109
|
untypedEditor.options = picked;
|
|
108
110
|
}
|
|
109
111
|
let { editor: selectedEditor, conflictingDefault } = this.getEditor(resource, untypedEditor.options?.override);
|
|
110
112
|
if (!selectedEditor && (untypedEditor.options?.override || isEditorInputWithOptions(editor))) {
|
|
111
|
-
return
|
|
113
|
+
return ResolvedStatus.NONE;
|
|
112
114
|
}
|
|
113
115
|
else if (!selectedEditor) {
|
|
114
116
|
const resolvedEditor = this.getEditor(resource, DEFAULT_EDITOR_ASSOCIATION.id);
|
|
115
117
|
selectedEditor = resolvedEditor?.editor;
|
|
116
118
|
conflictingDefault = resolvedEditor?.conflictingDefault;
|
|
117
119
|
if (!selectedEditor) {
|
|
118
|
-
return
|
|
120
|
+
return ResolvedStatus.NONE;
|
|
119
121
|
}
|
|
120
122
|
}
|
|
121
123
|
if (isResourceDiffEditorInput(untypedEditor) && untypedEditor.options?.override === undefined) {
|
|
@@ -130,12 +132,12 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
130
132
|
conflictingDefault = conflictingDefaultDiff;
|
|
131
133
|
}
|
|
132
134
|
if (!selectedEditor) {
|
|
133
|
-
return
|
|
135
|
+
return ResolvedStatus.NONE;
|
|
134
136
|
}
|
|
135
137
|
}
|
|
136
138
|
untypedEditor.options = { override: selectedEditor.editorInfo.id, ...untypedEditor.options };
|
|
137
139
|
if (selectedEditor.editorFactoryObject.createDiffEditorInput === undefined && isResourceDiffEditorInput(untypedEditor)) {
|
|
138
|
-
return
|
|
140
|
+
return ResolvedStatus.NONE;
|
|
139
141
|
}
|
|
140
142
|
const input = await this.doResolveEditor(untypedEditor, group, selectedEditor);
|
|
141
143
|
if (conflictingDefault && input) {
|
|
@@ -148,16 +150,16 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
148
150
|
}
|
|
149
151
|
return { ...input, group };
|
|
150
152
|
}
|
|
151
|
-
return
|
|
153
|
+
return ResolvedStatus.ABORT;
|
|
152
154
|
}
|
|
153
155
|
async doResolveSideBySideEditor(editor, preferredGroup) {
|
|
154
156
|
const primaryResolvedEditor = await this.resolveEditor(editor.primary, preferredGroup);
|
|
155
157
|
if (!isEditorInputWithOptionsAndGroup(primaryResolvedEditor)) {
|
|
156
|
-
return
|
|
158
|
+
return ResolvedStatus.NONE;
|
|
157
159
|
}
|
|
158
160
|
const secondaryResolvedEditor = await this.resolveEditor(editor.secondary, primaryResolvedEditor.group ?? preferredGroup);
|
|
159
161
|
if (!isEditorInputWithOptionsAndGroup(secondaryResolvedEditor)) {
|
|
160
|
-
return
|
|
162
|
+
return ResolvedStatus.NONE;
|
|
161
163
|
}
|
|
162
164
|
return {
|
|
163
165
|
group: primaryResolvedEditor.group ?? secondaryResolvedEditor.group,
|
|
@@ -261,7 +263,7 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
261
263
|
return editors;
|
|
262
264
|
}
|
|
263
265
|
get _registeredEditors() {
|
|
264
|
-
return
|
|
266
|
+
return Array.from(( (this._flattenedEditors.values()))).flat();
|
|
265
267
|
}
|
|
266
268
|
updateUserAssociations(globPattern, editorID) {
|
|
267
269
|
const newAssociation = { viewType: editorID, filenamePattern: globPattern };
|
|
@@ -439,12 +441,12 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
439
441
|
}
|
|
440
442
|
async doHandleConflictingDefaults(resource, editorName, untypedInput, currentEditor, group) {
|
|
441
443
|
const editors = this.findMatchingEditors(resource);
|
|
442
|
-
const storedChoices = JSON.parse(this.storageService.get(EditorResolverService_1.conflictingDefaultsStorageID,
|
|
444
|
+
const storedChoices = JSON.parse(this.storageService.get(EditorResolverService_1.conflictingDefaultsStorageID, StorageScope.PROFILE, '{}'));
|
|
443
445
|
const globForResource = `*${extname(resource)}`;
|
|
444
446
|
const writeCurrentEditorsToStorage = () => {
|
|
445
447
|
storedChoices[globForResource] = [];
|
|
446
448
|
editors.forEach(editor => storedChoices[globForResource].push(editor.editorInfo.id));
|
|
447
|
-
this.storageService.store(EditorResolverService_1.conflictingDefaultsStorageID, JSON.stringify(storedChoices),
|
|
449
|
+
this.storageService.store(EditorResolverService_1.conflictingDefaultsStorageID, JSON.stringify(storedChoices), StorageScope.PROFILE, StorageTarget.MACHINE);
|
|
448
450
|
};
|
|
449
451
|
if (storedChoices[globForResource] && storedChoices[globForResource].find(editorID => editorID === currentEditor.editorId)) {
|
|
450
452
|
return;
|
|
@@ -462,7 +464,7 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
462
464
|
}
|
|
463
465
|
untypedInput.options = picked;
|
|
464
466
|
const replacementEditor = await this.resolveEditor(untypedInput, group);
|
|
465
|
-
if (replacementEditor ===
|
|
467
|
+
if (replacementEditor === ResolvedStatus.ABORT || replacementEditor === ResolvedStatus.NONE) {
|
|
466
468
|
return;
|
|
467
469
|
}
|
|
468
470
|
group.replaceEditors([
|
|
@@ -624,7 +626,7 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
624
626
|
cacheStorage.add(association.filenamePattern);
|
|
625
627
|
}
|
|
626
628
|
}
|
|
627
|
-
this.storageService.store(EditorResolverService_1.cacheStorageID, JSON.stringify(Array.from(cacheStorage)),
|
|
629
|
+
this.storageService.store(EditorResolverService_1.cacheStorageID, JSON.stringify(Array.from(cacheStorage)), StorageScope.PROFILE, StorageTarget.MACHINE);
|
|
628
630
|
}
|
|
629
631
|
resourceMatchesCache(resource) {
|
|
630
632
|
if (!this.cache) {
|