@codingame/monaco-vscode-view-common-service-override 11.1.2 → 12.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.d.ts +3 -1
- package/index.js +110 -1
- package/package.json +64 -10
- package/service-override/tools/editorAssets.d.ts +1 -0
- package/service-override/tools/editorAssets.js +5 -0
- package/vscode/src/vs/platform/actions/browser/actionViewItemService.d.ts +21 -0
- package/vscode/src/vs/platform/actions/browser/actionViewItemService.js +2 -0
- package/vscode/src/vs/platform/webview/common/mimeTypes.d.ts +2 -0
- package/vscode/src/vs/platform/webview/common/mimeTypes.js +1 -0
- package/vscode/src/vs/platform/webview/common/webviewPortMapping.d.ts +18 -0
- package/vscode/src/vs/platform/webview/common/webviewPortMapping.js +1 -0
- package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.d.ts +7 -0
- package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +116 -115
- package/vscode/src/vs/workbench/browser/actions/listCommands.d.ts +1 -0
- package/vscode/src/vs/workbench/browser/actions/listCommands.js +120 -125
- package/vscode/src/vs/workbench/browser/actions/navigationActions.d.ts +1 -0
- package/vscode/src/vs/workbench/browser/actions/navigationActions.js +81 -74
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +216 -250
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.d.ts +21 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +26 -25
- package/vscode/src/vs/workbench/browser/parts/paneCompositePartService.d.ts +32 -0
- package/vscode/src/vs/workbench/browser/parts/paneCompositePartService.js +10 -8
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +58 -64
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.d.ts +50 -0
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +48 -38
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.d.ts +54 -0
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +19 -40
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/media/callHierarchy.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditor.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditor.contribution.js +7 -5
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.d.ts +58 -0
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.js +6 -4
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.d.ts +45 -0
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.js +6 -4
- package/vscode/src/vs/workbench/contrib/customEditor/browser/media/customEditor.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +16 -16
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.d.ts +65 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +15 -10
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditorModelManager.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditorModelManager.js +1 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +27 -25
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpener.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpener.contribution.js +4 -2
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js +6 -386
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.js +385 -0
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/media/languageStatus.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.js +20 -20
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.d.ts +105 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.js +50 -62
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.js +16 -15
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.js +15 -13
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorSerializer.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorSerializer.js +2 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/colors.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/colors.js +14 -13
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editorGutter.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editorGutter.js +2 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +15 -14
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.d.ts +45 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.js +3 -2
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.d.ts +43 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +37 -39
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js +22 -21
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/lineAlignment.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/lineAlignment.js +3 -2
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/media/mergeEditor.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.d.ts +117 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +57 -53
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/scrollSynchronizer.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/scrollSynchronizer.js +27 -25
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.d.ts +41 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +15 -13
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewZones.d.ts +29 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewZones.js +4 -3
- package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.js +28 -28
- package/vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.js +7 -5
- package/vscode/src/vs/workbench/contrib/sash/browser/sash.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/sash/browser/sash.js +2 -1
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/media/typeHierarchy.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +54 -56
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.d.ts +50 -0
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +48 -38
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.d.ts +52 -0
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +19 -30
- package/vscode/src/vs/workbench/contrib/webview/browser/overlayWebview.d.ts +101 -0
- package/vscode/src/vs/workbench/contrib/webview/browser/overlayWebview.js +3 -2
- package/vscode/src/vs/workbench/contrib/webview/browser/resourceLoading.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/webview/browser/resourceLoading.js +7 -6
- package/vscode/src/vs/workbench/contrib/webview/browser/themeing.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/webview/browser/themeing.js +7 -6
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.d.ts +139 -0
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +58 -56
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewFindWidget.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewFindWidget.js +4 -3
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewService.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewService.js +2 -1
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +28 -28
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditorInputSerializer.d.ts +50 -0
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditorInputSerializer.js +3 -2
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +15 -13
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.d.ts +64 -0
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.js +10 -8
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewService.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewService.js +1 -0
- package/vscode/src/vs/workbench/services/editor/browser/editorPaneService.d.ts +6 -0
- package/vscode/src/vs/workbench/services/editor/browser/editorPaneService.js +3 -1
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.d.ts +60 -0
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +64 -63
- package/vscode/src/vs/workbench/services/history/browser/historyService.d.ts +184 -0
- package/vscode/src/vs/workbench/services/history/browser/historyService.js +154 -148
- package/vscode/src/vs/workbench/services/progress/browser/media/progressService.css.js +1 -1
- package/vscode/src/vs/workbench/services/progress/browser/progressService.d.ts +36 -0
- package/vscode/src/vs/workbench/services/progress/browser/progressService.js +59 -54
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorHandler.d.ts +34 -0
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorHandler.js +4 -3
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.d.ts +71 -0
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.js +4 -2
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.d.ts +122 -0
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +86 -90
- package/vscode/src/vs/workbench/services/views/common/viewContainerModel.d.ts +80 -0
- package/vscode/src/vs/workbench/services/views/common/viewContainerModel.js +58 -64
- package/override/vs/workbench/browser/parts/editor/textEditor.js +0 -5
- package/override/vs/workbench/browser/parts/editor/textEditor.weak.js +0 -11
- package/tools/editorAssets.js +0 -4
- package/tools/url.js +0 -10
- package/viewCommon.js +0 -109
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { isRelativePattern } from 'vscode/vscode/vs/base/common/glob';
|
|
3
4
|
import { insert, distinct } from 'vscode/vscode/vs/base/common/arrays';
|
|
4
5
|
import { Disposable, toDisposable, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
@@ -9,20 +10,22 @@ import { EditorResolution, EditorActivation } from 'vscode/vscode/vs/platform/ed
|
|
|
9
10
|
import { isResourceSideBySideEditorInput, EditorResourceAccessor, SideBySideEditor, isEditorInputWithOptions, DEFAULT_EDITOR_ASSOCIATION, isResourceDiffEditorInput, isEditorInputWithOptionsAndGroup, isResourceMergeEditorInput, isResourceMultiDiffEditorInput, isUntitledResourceEditorInput } from 'vscode/vscode/vs/workbench/common/editor';
|
|
10
11
|
import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
11
12
|
import { Schemas } from 'vscode/vscode/vs/base/common/network';
|
|
12
|
-
import { globMatchesResource, editorsAssociationsSettingId, RegisteredEditorPriority, priorityToRank } from 'vscode/vscode/vs/workbench/services/editor/common/editorResolverService';
|
|
13
|
+
import { ResolvedStatus, globMatchesResource, editorsAssociationsSettingId, RegisteredEditorPriority, priorityToRank } from 'vscode/vscode/vs/workbench/services/editor/common/editorResolverService';
|
|
13
14
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
14
15
|
import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
15
16
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
16
17
|
import 'vscode/vscode/vs/platform/notification/common/notification';
|
|
17
18
|
import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification.service';
|
|
18
19
|
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
20
|
+
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
21
|
+
import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
19
22
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
20
23
|
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
21
24
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
22
|
-
import { findGroup } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupFinder';
|
|
23
|
-
import { SideBySideEditorInput } from 'vscode/vscode/vs/workbench/common/editor/sideBySideEditorInput';
|
|
25
|
+
import { findGroup } from '@codingame/monaco-vscode-b8988f79-16c1-5bff-b0e7-699bab3431da-common/vscode/vs/workbench/services/editor/common/editorGroupFinder';
|
|
26
|
+
import { SideBySideEditorInput } from '@codingame/monaco-vscode-5108c2c9-4ada-52d8-8c4b-fe03b3160e71-common/vscode/vs/workbench/common/editor/sideBySideEditorInput';
|
|
24
27
|
import { PauseableEmitter } from 'vscode/vscode/vs/base/common/event';
|
|
25
|
-
import Severity
|
|
28
|
+
import Severity from 'vscode/vscode/vs/base/common/severity';
|
|
26
29
|
|
|
27
30
|
var EditorResolverService_1;
|
|
28
31
|
let EditorResolverService = class EditorResolverService extends Disposable {
|
|
@@ -41,15 +44,15 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
41
44
|
this.storageService = storageService;
|
|
42
45
|
this.extensionService = extensionService;
|
|
43
46
|
this.logService = logService;
|
|
44
|
-
this._onDidChangeEditorRegistrations = this._register((
|
|
47
|
+
this._onDidChangeEditorRegistrations = this._register(( new PauseableEmitter()));
|
|
45
48
|
this.onDidChangeEditorRegistrations = this._onDidChangeEditorRegistrations.event;
|
|
46
|
-
this._editors = (
|
|
47
|
-
this._flattenedEditors = (
|
|
49
|
+
this._editors = ( new Map());
|
|
50
|
+
this._flattenedEditors = ( new Map());
|
|
48
51
|
this._shouldReFlattenEditors = true;
|
|
49
|
-
this.cache = (
|
|
50
|
-
JSON.parse(this.storageService.get(EditorResolverService_1.cacheStorageID,
|
|
51
|
-
))
|
|
52
|
-
this.storageService.remove(EditorResolverService_1.cacheStorageID,
|
|
52
|
+
this.cache = ( new Set(
|
|
53
|
+
JSON.parse(this.storageService.get(EditorResolverService_1.cacheStorageID, StorageScope.PROFILE, JSON.stringify([])))
|
|
54
|
+
));
|
|
55
|
+
this.storageService.remove(EditorResolverService_1.cacheStorageID, StorageScope.PROFILE);
|
|
53
56
|
this._register(this.storageService.onWillSaveState(() => {
|
|
54
57
|
this.cacheEditors();
|
|
55
58
|
}));
|
|
@@ -82,7 +85,7 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
82
85
|
resolvedUntypedAndGroup = resolvedUntypedAndGroupResult;
|
|
83
86
|
}
|
|
84
87
|
if (!resolvedUntypedAndGroup) {
|
|
85
|
-
return
|
|
88
|
+
return ResolvedStatus.NONE;
|
|
86
89
|
}
|
|
87
90
|
const [untypedEditor, group, activation] = resolvedUntypedAndGroup;
|
|
88
91
|
if (activation) {
|
|
@@ -93,34 +96,34 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
93
96
|
await this.extensionService.whenInstalledExtensionsRegistered();
|
|
94
97
|
}
|
|
95
98
|
if (resource === undefined) {
|
|
96
|
-
resource = (
|
|
99
|
+
resource = ( URI.from({ scheme: Schemas.untitled }));
|
|
97
100
|
}
|
|
98
101
|
else if (resource.scheme === undefined || resource === null) {
|
|
99
|
-
return
|
|
102
|
+
return ResolvedStatus.NONE;
|
|
100
103
|
}
|
|
101
104
|
if (untypedEditor.options?.override === EditorResolution.PICK) {
|
|
102
105
|
const picked = await this.doPickEditor(untypedEditor);
|
|
103
106
|
if (!picked) {
|
|
104
|
-
return
|
|
107
|
+
return ResolvedStatus.ABORT;
|
|
105
108
|
}
|
|
106
109
|
untypedEditor.options = picked;
|
|
107
110
|
}
|
|
108
111
|
let { editor: selectedEditor, conflictingDefault } = this.getEditor(resource, untypedEditor.options?.override);
|
|
109
112
|
if (!selectedEditor && (untypedEditor.options?.override || isEditorInputWithOptions(editor))) {
|
|
110
|
-
return
|
|
113
|
+
return ResolvedStatus.NONE;
|
|
111
114
|
}
|
|
112
115
|
else if (!selectedEditor) {
|
|
113
116
|
const resolvedEditor = this.getEditor(resource, DEFAULT_EDITOR_ASSOCIATION.id);
|
|
114
117
|
selectedEditor = resolvedEditor?.editor;
|
|
115
118
|
conflictingDefault = resolvedEditor?.conflictingDefault;
|
|
116
119
|
if (!selectedEditor) {
|
|
117
|
-
return
|
|
120
|
+
return ResolvedStatus.NONE;
|
|
118
121
|
}
|
|
119
122
|
}
|
|
120
123
|
if (isResourceDiffEditorInput(untypedEditor) && untypedEditor.options?.override === undefined) {
|
|
121
124
|
let resource2 = EditorResourceAccessor.getCanonicalUri(untypedEditor, { supportSideBySide: SideBySideEditor.SECONDARY });
|
|
122
125
|
if (!resource2) {
|
|
123
|
-
resource2 = (
|
|
126
|
+
resource2 = ( URI.from({ scheme: Schemas.untitled }));
|
|
124
127
|
}
|
|
125
128
|
const { editor: selectedEditor2 } = this.getEditor(resource2, undefined);
|
|
126
129
|
if (!selectedEditor2 || selectedEditor.editorInfo.id !== selectedEditor2.editorInfo.id) {
|
|
@@ -129,12 +132,12 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
129
132
|
conflictingDefault = conflictingDefaultDiff;
|
|
130
133
|
}
|
|
131
134
|
if (!selectedEditor) {
|
|
132
|
-
return
|
|
135
|
+
return ResolvedStatus.NONE;
|
|
133
136
|
}
|
|
134
137
|
}
|
|
135
138
|
untypedEditor.options = { override: selectedEditor.editorInfo.id, ...untypedEditor.options };
|
|
136
139
|
if (selectedEditor.editorFactoryObject.createDiffEditorInput === undefined && isResourceDiffEditorInput(untypedEditor)) {
|
|
137
|
-
return
|
|
140
|
+
return ResolvedStatus.NONE;
|
|
138
141
|
}
|
|
139
142
|
const input = await this.doResolveEditor(untypedEditor, group, selectedEditor);
|
|
140
143
|
if (conflictingDefault && input) {
|
|
@@ -147,16 +150,16 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
147
150
|
}
|
|
148
151
|
return { ...input, group };
|
|
149
152
|
}
|
|
150
|
-
return
|
|
153
|
+
return ResolvedStatus.ABORT;
|
|
151
154
|
}
|
|
152
155
|
async doResolveSideBySideEditor(editor, preferredGroup) {
|
|
153
156
|
const primaryResolvedEditor = await this.resolveEditor(editor.primary, preferredGroup);
|
|
154
157
|
if (!isEditorInputWithOptionsAndGroup(primaryResolvedEditor)) {
|
|
155
|
-
return
|
|
158
|
+
return ResolvedStatus.NONE;
|
|
156
159
|
}
|
|
157
160
|
const secondaryResolvedEditor = await this.resolveEditor(editor.secondary, primaryResolvedEditor.group ?? preferredGroup);
|
|
158
161
|
if (!isEditorInputWithOptionsAndGroup(secondaryResolvedEditor)) {
|
|
159
|
-
return
|
|
162
|
+
return ResolvedStatus.NONE;
|
|
160
163
|
}
|
|
161
164
|
return {
|
|
162
165
|
group: primaryResolvedEditor.group ?? secondaryResolvedEditor.group,
|
|
@@ -176,7 +179,7 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
176
179
|
registerEditor(globPattern, editorInfo, options, editorFactoryObject) {
|
|
177
180
|
let registeredEditor = this._editors.get(globPattern);
|
|
178
181
|
if (registeredEditor === undefined) {
|
|
179
|
-
registeredEditor = (
|
|
182
|
+
registeredEditor = ( new Map());
|
|
180
183
|
this._editors.set(globPattern, registeredEditor);
|
|
181
184
|
}
|
|
182
185
|
let editorsWithId = registeredEditor.get(editorInfo.id);
|
|
@@ -234,10 +237,10 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
234
237
|
return this._flattenedEditors;
|
|
235
238
|
}
|
|
236
239
|
this._shouldReFlattenEditors = false;
|
|
237
|
-
const editors = (
|
|
240
|
+
const editors = ( new Map());
|
|
238
241
|
for (const [glob, value] of this._editors) {
|
|
239
242
|
const registeredEditors = [];
|
|
240
|
-
for (const editors of (
|
|
243
|
+
for (const editors of ( value.values())) {
|
|
241
244
|
let registeredEditor = undefined;
|
|
242
245
|
for (const editor of editors) {
|
|
243
246
|
if (!registeredEditor) {
|
|
@@ -260,7 +263,7 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
260
263
|
return editors;
|
|
261
264
|
}
|
|
262
265
|
get _registeredEditors() {
|
|
263
|
-
return Array.from((
|
|
266
|
+
return Array.from(( this._flattenedEditors.values())).flat();
|
|
264
267
|
}
|
|
265
268
|
updateUserAssociations(globPattern, editorID) {
|
|
266
269
|
const newAssociation = { viewType: editorID, filenamePattern: globPattern };
|
|
@@ -298,11 +301,9 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
298
301
|
if (editors.find(e => e.editorInfo.priority === RegisteredEditorPriority.exclusive)) {
|
|
299
302
|
return [];
|
|
300
303
|
}
|
|
301
|
-
return (
|
|
302
|
-
(editors.map(editor => editor.editorInfo))
|
|
303
|
-
);
|
|
304
|
+
return ( editors.map(editor => editor.editorInfo));
|
|
304
305
|
}
|
|
305
|
-
return distinct((
|
|
306
|
+
return distinct(( this._registeredEditors.map(editor => editor.editorInfo)), editor => editor.id);
|
|
306
307
|
}
|
|
307
308
|
getEditor(resource, editorId) {
|
|
308
309
|
const findMatchingEditor = (editors, viewType) => {
|
|
@@ -371,7 +372,7 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
371
372
|
return { editor: inputWithOptions.editor, options: inputWithOptions.options ?? options };
|
|
372
373
|
}
|
|
373
374
|
if (isResourceSideBySideEditorInput(editor)) {
|
|
374
|
-
throw (
|
|
375
|
+
throw ( new Error(`Untyped side by side editor input not supported here.`));
|
|
375
376
|
}
|
|
376
377
|
if (isUntitledResourceEditorInput(editor)) {
|
|
377
378
|
if (!selectedEditor.editorFactoryObject.createUntitledEditorInput) {
|
|
@@ -381,7 +382,7 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
381
382
|
return { editor: inputWithOptions.editor, options: inputWithOptions.options ?? options };
|
|
382
383
|
}
|
|
383
384
|
if (resource === undefined) {
|
|
384
|
-
throw (
|
|
385
|
+
throw ( new Error(`Undefined resource on non untitled editor input.`));
|
|
385
386
|
}
|
|
386
387
|
const singleEditorPerResource = typeof selectedEditor.options?.singlePerResource === 'function' ? selectedEditor.options.singlePerResource() : selectedEditor.options?.singlePerResource;
|
|
387
388
|
if (singleEditorPerResource) {
|
|
@@ -438,18 +439,18 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
438
439
|
}
|
|
439
440
|
async doHandleConflictingDefaults(resource, editorName, untypedInput, currentEditor, group) {
|
|
440
441
|
const editors = this.findMatchingEditors(resource);
|
|
441
|
-
const storedChoices = JSON.parse(this.storageService.get(EditorResolverService_1.conflictingDefaultsStorageID,
|
|
442
|
+
const storedChoices = JSON.parse(this.storageService.get(EditorResolverService_1.conflictingDefaultsStorageID, StorageScope.PROFILE, '{}'));
|
|
442
443
|
const globForResource = `*${extname(resource)}`;
|
|
443
444
|
const writeCurrentEditorsToStorage = () => {
|
|
444
445
|
storedChoices[globForResource] = [];
|
|
445
446
|
editors.forEach(editor => storedChoices[globForResource].push(editor.editorInfo.id));
|
|
446
|
-
this.storageService.store(EditorResolverService_1.conflictingDefaultsStorageID, JSON.stringify(storedChoices),
|
|
447
|
+
this.storageService.store(EditorResolverService_1.conflictingDefaultsStorageID, JSON.stringify(storedChoices), StorageScope.PROFILE, StorageTarget.MACHINE);
|
|
447
448
|
};
|
|
448
449
|
if (storedChoices[globForResource] && storedChoices[globForResource].find(editorID => editorID === currentEditor.editorId)) {
|
|
449
450
|
return;
|
|
450
451
|
}
|
|
451
|
-
const handle = this.notificationService.prompt(Severity
|
|
452
|
-
label: ( localize(
|
|
452
|
+
const handle = this.notificationService.prompt(Severity.Warning, ( localize(11383, 'There are multiple default editors available for the resource.')), [{
|
|
453
|
+
label: ( localize(11384, 'Configure Default')),
|
|
453
454
|
run: async () => {
|
|
454
455
|
const picked = await this.doPickEditor(untypedInput, true);
|
|
455
456
|
if (!picked) {
|
|
@@ -457,7 +458,7 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
457
458
|
}
|
|
458
459
|
untypedInput.options = picked;
|
|
459
460
|
const replacementEditor = await this.resolveEditor(untypedInput, group);
|
|
460
|
-
if (replacementEditor ===
|
|
461
|
+
if (replacementEditor === ResolvedStatus.ABORT || replacementEditor === ResolvedStatus.NONE) {
|
|
461
462
|
return;
|
|
462
463
|
}
|
|
463
464
|
group.replaceEditors([
|
|
@@ -470,7 +471,7 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
470
471
|
}
|
|
471
472
|
},
|
|
472
473
|
{
|
|
473
|
-
label: ( localize(
|
|
474
|
+
label: ( localize(11385, 'Keep {0}', editorName)),
|
|
474
475
|
run: writeCurrentEditorsToStorage
|
|
475
476
|
}
|
|
476
477
|
]);
|
|
@@ -496,9 +497,9 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
496
497
|
}
|
|
497
498
|
});
|
|
498
499
|
const quickPickEntries = [];
|
|
499
|
-
const currentlyActiveLabel = ( localize(
|
|
500
|
-
const currentDefaultLabel = ( localize(
|
|
501
|
-
const currentDefaultAndActiveLabel = ( localize(
|
|
500
|
+
const currentlyActiveLabel = ( localize(11386, "Active"));
|
|
501
|
+
const currentDefaultLabel = ( localize(11387, "Default"));
|
|
502
|
+
const currentDefaultAndActiveLabel = ( localize(11388, "Active and Default"));
|
|
502
503
|
let defaultViewType = defaultSetting;
|
|
503
504
|
if (!defaultViewType && registeredEditors.length > 2 && registeredEditors[1]?.editorInfo.priority !== RegisteredEditorPriority.option) {
|
|
504
505
|
defaultViewType = registeredEditors[1]?.editorInfo.id;
|
|
@@ -523,7 +524,7 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
523
524
|
quickPickEntries.push(separator);
|
|
524
525
|
const configureDefaultEntry = {
|
|
525
526
|
id: EditorResolverService_1.configureDefaultID,
|
|
526
|
-
label: ( localize(
|
|
527
|
+
label: ( localize(11389, "Configure default editor for '{0}'...", `*${extname(resource)}`)),
|
|
527
528
|
};
|
|
528
529
|
quickPickEntries.push(configureDefaultEntry);
|
|
529
530
|
}
|
|
@@ -532,14 +533,14 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
532
533
|
async doPickEditor(editor, showDefaultPicker) {
|
|
533
534
|
let resource = EditorResourceAccessor.getOriginalUri(editor, { supportSideBySide: SideBySideEditor.PRIMARY });
|
|
534
535
|
if (resource === undefined) {
|
|
535
|
-
resource = (
|
|
536
|
+
resource = ( URI.from({ scheme: Schemas.untitled }));
|
|
536
537
|
}
|
|
537
538
|
const editorPicks = this.mapEditorsToQuickPickEntry(resource, showDefaultPicker);
|
|
538
|
-
const disposables = (
|
|
539
|
+
const disposables = ( new DisposableStore());
|
|
539
540
|
const editorPicker = disposables.add(this.quickInputService.createQuickPick({ useSeparators: true }));
|
|
540
541
|
const placeHolderMessage = showDefaultPicker ?
|
|
541
|
-
( localize(
|
|
542
|
-
( localize(
|
|
542
|
+
( localize(11390, "Select new default editor for '{0}'", `*${extname(resource)}`)) :
|
|
543
|
+
( localize(11391, "Select editor for '{0}'", basename(resource)));
|
|
543
544
|
editorPicker.placeholder = placeHolderMessage;
|
|
544
545
|
editorPicker.canAcceptInBackground = true;
|
|
545
546
|
editorPicker.items = editorPicks;
|
|
@@ -547,7 +548,7 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
547
548
|
if (firstItem) {
|
|
548
549
|
editorPicker.selectedItems = [firstItem];
|
|
549
550
|
}
|
|
550
|
-
const picked = await (
|
|
551
|
+
const picked = await ( new Promise(resolve => {
|
|
551
552
|
disposables.add(editorPicker.onDidAccept(e => {
|
|
552
553
|
let result = undefined;
|
|
553
554
|
if (editorPicker.selectedItems.length === 1) {
|
|
@@ -573,7 +574,7 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
573
574
|
}
|
|
574
575
|
}));
|
|
575
576
|
editorPicker.show();
|
|
576
|
-
}))
|
|
577
|
+
}));
|
|
577
578
|
editorPicker.dispose();
|
|
578
579
|
if (picked) {
|
|
579
580
|
if (picked.item.id === EditorResolverService_1.configureDefaultID) {
|
|
@@ -594,7 +595,7 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
594
595
|
}
|
|
595
596
|
}
|
|
596
597
|
cacheEditors() {
|
|
597
|
-
const cacheStorage = (
|
|
598
|
+
const cacheStorage = ( new Set());
|
|
598
599
|
for (const [globPattern, contribPoint] of this._flattenedEditors) {
|
|
599
600
|
const nonOptional = !!contribPoint.find(c => c.editorInfo.priority !== RegisteredEditorPriority.option && c.editorInfo.id !== DEFAULT_EDITOR_ASSOCIATION.id);
|
|
600
601
|
if (!nonOptional) {
|
|
@@ -613,7 +614,7 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
613
614
|
cacheStorage.add(association.filenamePattern);
|
|
614
615
|
}
|
|
615
616
|
}
|
|
616
|
-
this.storageService.store(EditorResolverService_1.cacheStorageID, JSON.stringify(Array.from(cacheStorage)),
|
|
617
|
+
this.storageService.store(EditorResolverService_1.cacheStorageID, JSON.stringify(Array.from(cacheStorage)), StorageScope.PROFILE, StorageTarget.MACHINE);
|
|
617
618
|
}
|
|
618
619
|
resourceMatchesCache(resource) {
|
|
619
620
|
if (!this.cache) {
|
|
@@ -627,16 +628,16 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
627
628
|
return false;
|
|
628
629
|
}
|
|
629
630
|
};
|
|
630
|
-
EditorResolverService = EditorResolverService_1 = (
|
|
631
|
-
(
|
|
632
|
-
(
|
|
633
|
-
(
|
|
634
|
-
(
|
|
635
|
-
(
|
|
636
|
-
(
|
|
637
|
-
(
|
|
638
|
-
(
|
|
639
|
-
(
|
|
640
|
-
], EditorResolverService))
|
|
631
|
+
EditorResolverService = EditorResolverService_1 = ( __decorate([
|
|
632
|
+
( __param(0, IEditorGroupsService)),
|
|
633
|
+
( __param(1, IInstantiationService)),
|
|
634
|
+
( __param(2, IConfigurationService)),
|
|
635
|
+
( __param(3, IQuickInputService)),
|
|
636
|
+
( __param(4, INotificationService)),
|
|
637
|
+
( __param(5, ITelemetryService)),
|
|
638
|
+
( __param(6, IStorageService)),
|
|
639
|
+
( __param(7, IExtensionService)),
|
|
640
|
+
( __param(8, ILogService))
|
|
641
|
+
], EditorResolverService));
|
|
641
642
|
|
|
642
643
|
export { EditorResolverService };
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { URI } from "vscode/vscode/vs/base/common/uri";
|
|
2
|
+
import { IResourceEditorInput } from "vscode/vscode/vs/platform/editor/common/editor";
|
|
3
|
+
import { IEditorPane, GroupIdentifier, IEditorPaneSelection, IEditorPaneSelectionChangeEvent } from "vscode/vscode/vs/workbench/common/editor";
|
|
4
|
+
import { EditorInput } from "vscode/vscode/vs/workbench/common/editor/editorInput";
|
|
5
|
+
import { IEditorService } from "vscode/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
6
|
+
import { GoFilter, GoScope } from "vscode/vscode/vs/workbench/services/history/common/history";
|
|
7
|
+
import { IHistoryService } from "vscode/vscode/vs/workbench/services/history/common/history.service";
|
|
8
|
+
import { FileChangesEvent, FileOperationEvent } from "vscode/vscode/vs/platform/files/common/files";
|
|
9
|
+
import { IFileService } from "vscode/vscode/vs/platform/files/common/files.service";
|
|
10
|
+
import { IWorkspaceContextService } from "vscode/vscode/vs/platform/workspace/common/workspace.service";
|
|
11
|
+
import { Disposable } from "vscode/vscode/vs/base/common/lifecycle";
|
|
12
|
+
import { IStorageService } from "vscode/vscode/vs/platform/storage/common/storage.service";
|
|
13
|
+
import { Event } from "vscode/vscode/vs/base/common/event";
|
|
14
|
+
import { IConfigurationService } from "vscode/vscode/vs/platform/configuration/common/configuration.service";
|
|
15
|
+
import { IEditorGroupsService } from "vscode/vscode/vs/workbench/services/editor/common/editorGroupsService.service";
|
|
16
|
+
import { IInstantiationService } from "vscode/vscode/vs/platform/instantiation/common/instantiation";
|
|
17
|
+
import { EditorServiceImpl } from "vscode/vscode/vs/workbench/browser/parts/editor/editor";
|
|
18
|
+
import { IWorkbenchLayoutService } from "vscode/vscode/vs/workbench/services/layout/browser/layoutService.service";
|
|
19
|
+
import { IContextKeyService } from "vscode/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
20
|
+
import { IWorkspacesService } from "vscode/vscode/vs/platform/workspaces/common/workspaces.service";
|
|
21
|
+
import { ILogService } from "vscode/vscode/vs/platform/log/common/log.service";
|
|
22
|
+
export declare class HistoryService extends Disposable implements IHistoryService {
|
|
23
|
+
private readonly editorService;
|
|
24
|
+
private readonly editorGroupService;
|
|
25
|
+
private readonly contextService;
|
|
26
|
+
private readonly storageService;
|
|
27
|
+
private readonly configurationService;
|
|
28
|
+
private readonly fileService;
|
|
29
|
+
private readonly workspacesService;
|
|
30
|
+
private readonly instantiationService;
|
|
31
|
+
private readonly layoutService;
|
|
32
|
+
private readonly contextKeyService;
|
|
33
|
+
private readonly logService;
|
|
34
|
+
readonly _serviceBrand: undefined;
|
|
35
|
+
private static readonly MOUSE_NAVIGATION_SETTING;
|
|
36
|
+
private static readonly NAVIGATION_SCOPE_SETTING;
|
|
37
|
+
private readonly activeEditorListeners;
|
|
38
|
+
private lastActiveEditor;
|
|
39
|
+
private readonly editorHelper;
|
|
40
|
+
constructor(editorService: EditorServiceImpl, editorGroupService: IEditorGroupsService, contextService: IWorkspaceContextService, storageService: IStorageService, configurationService: IConfigurationService, fileService: IFileService, workspacesService: IWorkspacesService, instantiationService: IInstantiationService, layoutService: IWorkbenchLayoutService, contextKeyService: IContextKeyService, logService: ILogService);
|
|
41
|
+
private registerListeners;
|
|
42
|
+
private onDidCloseEditor;
|
|
43
|
+
private registerMouseNavigationListener;
|
|
44
|
+
private onMouseDownOrUp;
|
|
45
|
+
private onDidRemoveGroup;
|
|
46
|
+
private onDidActiveEditorChange;
|
|
47
|
+
private onDidFilesChange;
|
|
48
|
+
private handleActiveEditorChange;
|
|
49
|
+
private handleActiveEditorSelectionChangeEvent;
|
|
50
|
+
private move;
|
|
51
|
+
private remove;
|
|
52
|
+
private removeFromRecentlyOpened;
|
|
53
|
+
clear(): void;
|
|
54
|
+
private readonly canNavigateBackContextKey;
|
|
55
|
+
private readonly canNavigateForwardContextKey;
|
|
56
|
+
private readonly canNavigateBackInNavigationsContextKey;
|
|
57
|
+
private readonly canNavigateForwardInNavigationsContextKey;
|
|
58
|
+
private readonly canNavigateToLastNavigationLocationContextKey;
|
|
59
|
+
private readonly canNavigateBackInEditsContextKey;
|
|
60
|
+
private readonly canNavigateForwardInEditsContextKey;
|
|
61
|
+
private readonly canNavigateToLastEditLocationContextKey;
|
|
62
|
+
private readonly canReopenClosedEditorContextKey;
|
|
63
|
+
updateContextKeys(): void;
|
|
64
|
+
private readonly _onDidChangeEditorNavigationStack;
|
|
65
|
+
readonly onDidChangeEditorNavigationStack: Event<void>;
|
|
66
|
+
private defaultScopedEditorNavigationStack;
|
|
67
|
+
private readonly editorGroupScopedNavigationStacks;
|
|
68
|
+
private readonly editorScopedNavigationStacks;
|
|
69
|
+
private editorNavigationScope;
|
|
70
|
+
private registerEditorNavigationScopeChangeListener;
|
|
71
|
+
private getStack;
|
|
72
|
+
goForward(filter?: GoFilter): Promise<void>;
|
|
73
|
+
goBack(filter?: GoFilter): Promise<void>;
|
|
74
|
+
goPrevious(filter?: GoFilter): Promise<void>;
|
|
75
|
+
goLast(filter?: GoFilter): Promise<void>;
|
|
76
|
+
private handleActiveEditorChangeInNavigationStacks;
|
|
77
|
+
private handleActiveEditorSelectionChangeInNavigationStacks;
|
|
78
|
+
private handleEditorCloseEventInHistory;
|
|
79
|
+
private handleEditorGroupRemoveInNavigationStacks;
|
|
80
|
+
private clearEditorNavigationStacks;
|
|
81
|
+
private removeFromEditorNavigationStacks;
|
|
82
|
+
private moveInEditorNavigationStacks;
|
|
83
|
+
private withEachEditorNavigationStack;
|
|
84
|
+
private disposeEditorNavigationStacks;
|
|
85
|
+
private recentlyUsedEditorsStack;
|
|
86
|
+
private recentlyUsedEditorsStackIndex;
|
|
87
|
+
private recentlyUsedEditorsInGroupStack;
|
|
88
|
+
private recentlyUsedEditorsInGroupStackIndex;
|
|
89
|
+
private navigatingInRecentlyUsedEditorsStack;
|
|
90
|
+
private navigatingInRecentlyUsedEditorsInGroupStack;
|
|
91
|
+
openNextRecentlyUsedEditor(groupId?: GroupIdentifier): Promise<void>;
|
|
92
|
+
openPreviouslyUsedEditor(groupId?: GroupIdentifier): Promise<void>;
|
|
93
|
+
private doNavigateInRecentlyUsedEditorsStack;
|
|
94
|
+
private ensureRecentlyUsedStack;
|
|
95
|
+
private handleEditorEventInRecentEditorsStack;
|
|
96
|
+
private static readonly MAX_RECENTLY_CLOSED_EDITORS;
|
|
97
|
+
private recentlyClosedEditors;
|
|
98
|
+
private ignoreEditorCloseEvent;
|
|
99
|
+
private handleEditorCloseEventInReopen;
|
|
100
|
+
reopenLastClosedEditor(): Promise<void>;
|
|
101
|
+
private doReopenLastClosedEditor;
|
|
102
|
+
private removeFromRecentlyClosedEditors;
|
|
103
|
+
private static readonly MAX_HISTORY_ITEMS;
|
|
104
|
+
private static readonly HISTORY_STORAGE_KEY;
|
|
105
|
+
private history;
|
|
106
|
+
private readonly editorHistoryListeners;
|
|
107
|
+
private readonly resourceExcludeMatcher;
|
|
108
|
+
private handleActiveEditorChangeInHistory;
|
|
109
|
+
private addToHistory;
|
|
110
|
+
private updateHistoryOnEditorDispose;
|
|
111
|
+
private includeInHistory;
|
|
112
|
+
private removeExcludedFromHistory;
|
|
113
|
+
private moveInHistory;
|
|
114
|
+
removeFromHistory(arg1: EditorInput | IResourceEditorInput | FileChangesEvent | FileOperationEvent): boolean;
|
|
115
|
+
private replaceInHistory;
|
|
116
|
+
clearRecentlyOpened(): void;
|
|
117
|
+
getHistory(): readonly (EditorInput | IResourceEditorInput)[];
|
|
118
|
+
private ensureHistoryLoaded;
|
|
119
|
+
private loadHistory;
|
|
120
|
+
private loadHistoryFromStorage;
|
|
121
|
+
private saveState;
|
|
122
|
+
getLastActiveWorkspaceRoot(schemeFilter?: string, authorityFilter?: string): URI | undefined;
|
|
123
|
+
getLastActiveFile(filterByScheme: string, filterByAuthority?: string): URI | undefined;
|
|
124
|
+
dispose(): void;
|
|
125
|
+
}
|
|
126
|
+
interface IEditorNavigationStackEntry {
|
|
127
|
+
groupId: GroupIdentifier;
|
|
128
|
+
editor: EditorInput | IResourceEditorInput;
|
|
129
|
+
selection?: IEditorPaneSelection;
|
|
130
|
+
}
|
|
131
|
+
export declare class EditorNavigationStack extends Disposable {
|
|
132
|
+
private readonly filter;
|
|
133
|
+
private readonly scope;
|
|
134
|
+
private readonly instantiationService;
|
|
135
|
+
private readonly editorService;
|
|
136
|
+
private readonly editorGroupService;
|
|
137
|
+
private readonly logService;
|
|
138
|
+
private static readonly MAX_STACK_SIZE;
|
|
139
|
+
private readonly _onDidChange;
|
|
140
|
+
readonly onDidChange: Event<void>;
|
|
141
|
+
private readonly mapEditorToDisposable;
|
|
142
|
+
private readonly mapGroupToDisposable;
|
|
143
|
+
private readonly editorHelper;
|
|
144
|
+
private stack;
|
|
145
|
+
private index;
|
|
146
|
+
private previousIndex;
|
|
147
|
+
private navigating;
|
|
148
|
+
private currentSelectionState;
|
|
149
|
+
get current(): IEditorNavigationStackEntry | undefined;
|
|
150
|
+
private set current(value);
|
|
151
|
+
constructor(filter: GoFilter, scope: GoScope, instantiationService: IInstantiationService, editorService: IEditorService, editorGroupService: IEditorGroupsService, logService: ILogService);
|
|
152
|
+
private registerListeners;
|
|
153
|
+
private traceStack;
|
|
154
|
+
private trace;
|
|
155
|
+
private traceEvent;
|
|
156
|
+
private registerGroupListeners;
|
|
157
|
+
private onWillMoveEditor;
|
|
158
|
+
notifyNavigation(editorPane: IEditorPane | undefined, event?: IEditorPaneSelectionChangeEvent): void;
|
|
159
|
+
private onSelectionAwareEditorNavigation;
|
|
160
|
+
private onNonSelectionAwareEditorNavigation;
|
|
161
|
+
private doAdd;
|
|
162
|
+
private doReplace;
|
|
163
|
+
addOrReplace(groupId: GroupIdentifier, editorCandidate: EditorInput | IResourceEditorInput, selection?: IEditorPaneSelection, forceReplace?: boolean): void;
|
|
164
|
+
private shouldReplaceStackEntry;
|
|
165
|
+
move(event: FileOperationEvent): void;
|
|
166
|
+
remove(arg1: EditorInput | FileChangesEvent | FileOperationEvent | GroupIdentifier): void;
|
|
167
|
+
private flatten;
|
|
168
|
+
clear(): void;
|
|
169
|
+
dispose(): void;
|
|
170
|
+
canGoForward(): boolean;
|
|
171
|
+
goForward(): Promise<void>;
|
|
172
|
+
canGoBack(): boolean;
|
|
173
|
+
goBack(): Promise<void>;
|
|
174
|
+
goPrevious(): Promise<void>;
|
|
175
|
+
canGoLast(): boolean;
|
|
176
|
+
goLast(): Promise<void>;
|
|
177
|
+
private maybeGoCurrent;
|
|
178
|
+
private isCurrentSelectionActive;
|
|
179
|
+
private setIndex;
|
|
180
|
+
private navigate;
|
|
181
|
+
private doNavigate;
|
|
182
|
+
isNavigating(): boolean;
|
|
183
|
+
}
|
|
184
|
+
export {};
|