@codingame/monaco-vscode-views-service-override 2.1.4 → 2.2.0-next.2
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 +11 -9
- package/index.js +8 -6
- package/package.json +11 -11
- package/tools/views.d.ts +102 -0
- package/tools/views.js +253 -0
- package/views.d.ts +4 -99
- package/views.js +52 -280
- package/external/rollup-plugin-styles/dist/runtime/inject-css.js +0 -3
- package/vscode/src/vs/base/browser/ui/centered/centeredViewLayout.js +0 -180
- package/vscode/src/vs/base/browser/ui/grid/grid.js +0 -494
- package/vscode/src/vs/base/browser/ui/grid/gridview.css.js +0 -6
- package/vscode/src/vs/base/browser/ui/grid/gridview.js +0 -1112
- package/vscode/src/vs/base/common/codicons.d.ts +0 -579
- package/vscode/src/vs/platform/webview/common/mimeTypes.js +0 -24
- package/vscode/src/vs/platform/webview/common/webviewPortMapping.js +0 -64
- package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +0 -790
- package/vscode/src/vs/workbench/browser/actions/listCommands.js +0 -764
- package/vscode/src/vs/workbench/browser/layout.d.ts +0 -26
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js +0 -612
- package/vscode/src/vs/workbench/browser/parts/activitybar/media/activityaction.css.js +0 -6
- package/vscode/src/vs/workbench/browser/parts/activitybar/media/activitybarpart.css.js +0 -6
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.js +0 -150
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/media/auxiliaryBarPart.css.js +0 -6
- package/vscode/src/vs/workbench/browser/parts/compositeBar.js +0 -605
- package/vscode/src/vs/workbench/browser/parts/compositePart.js +0 -335
- package/vscode/src/vs/workbench/browser/parts/editor/auxiliaryEditorPart.js +0 -223
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +0 -1407
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +0 -186
- package/vscode/src/vs/workbench/browser/parts/editor/editorDropTarget.js +0 -511
- package/vscode/src/vs/workbench/browser/parts/editor/editorPane.d.ts +0 -112
- package/vscode/src/vs/workbench/browser/parts/editor/editorPart.js +0 -1020
- package/vscode/src/vs/workbench/browser/parts/editor/editorParts.js +0 -391
- package/vscode/src/vs/workbench/browser/parts/editor/media/editordroptarget.css.js +0 -6
- package/vscode/src/vs/workbench/browser/parts/media/compositepart.css.js +0 -6
- package/vscode/src/vs/workbench/browser/parts/media/paneCompositePart.css.js +0 -6
- package/vscode/src/vs/workbench/browser/parts/paneCompositeBar.js +0 -645
- package/vscode/src/vs/workbench/browser/parts/paneCompositePart.js +0 -379
- package/vscode/src/vs/workbench/browser/parts/paneCompositePartService.js +0 -68
- package/vscode/src/vs/workbench/browser/parts/panel/panelPart.js +0 -146
- package/vscode/src/vs/workbench/browser/parts/sidebar/media/sidebarpart.css.js +0 -6
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.js +0 -222
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +0 -299
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +0 -365
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +0 -135
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/media/callHierarchy.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditor.contribution.js +0 -17
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.js +0 -145
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.js +0 -214
- package/vscode/src/vs/workbench/contrib/customEditor/browser/media/customEditor.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +0 -78
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditorModelManager.js +0 -63
- package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +0 -119
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpener.contribution.js +0 -6
- package/vscode/src/vs/workbench/contrib/files/browser/editors/binaryFileEditor.js +0 -79
- package/vscode/src/vs/workbench/contrib/files/browser/editors/fileEditorHandler.js +0 -74
- package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileEditor.js +0 -256
- package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileEditorTracker.js +0 -99
- package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler.js +0 -444
- package/vscode/src/vs/workbench/contrib/files/browser/explorerService.js +0 -432
- package/vscode/src/vs/workbench/contrib/files/browser/fileActions.contribution.js +0 -786
- package/vscode/src/vs/workbench/contrib/files/browser/fileCommands.js +0 -488
- package/vscode/src/vs/workbench/contrib/files/browser/files.contribution.js +0 -522
- package/vscode/src/vs/workbench/contrib/files/browser/workspaceWatcher.js +0 -152
- package/vscode/src/vs/workbench/contrib/files/common/dirtyFilesIndicator.js +0 -63
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js +0 -409
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/media/languageStatus.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.js +0 -693
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.js +0 -240
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.js +0 -77
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorSerializer.js +0 -42
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/colors.js +0 -71
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/conflictActions.js +0 -348
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editorGutter.js +0 -98
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +0 -146
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.js +0 -105
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +0 -401
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js +0 -197
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/fixedZoneWidget.js +0 -41
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/lineAlignment.js +0 -128
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/media/mergeEditor.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +0 -612
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/scrollSynchronizer.js +0 -158
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +0 -264
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewZones.js +0 -173
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/media/typeHierarchy.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +0 -282
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +0 -360
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +0 -133
- package/vscode/src/vs/workbench/contrib/webview/browser/overlayWebview.js +0 -290
- package/vscode/src/vs/workbench/contrib/webview/browser/resourceLoading.js +0 -96
- package/vscode/src/vs/workbench/contrib/webview/browser/themeing.js +0 -88
- package/vscode/src/vs/workbench/contrib/webview/browser/webview.contribution.js +0 -79
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +0 -648
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewFindWidget.js +0 -65
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewService.js +0 -59
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +0 -142
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditorInputSerializer.js +0 -121
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +0 -68
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.js +0 -235
- package/vscode/src/vs/workbench/services/activity/browser/activityService.js +0 -145
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +0 -670
- package/vscode/src/vs/workbench/services/history/browser/historyService.js +0 -1484
- package/vscode/src/vs/workbench/services/progress/browser/media/progressService.css.js +0 -6
- package/vscode/src/vs/workbench/services/progress/browser/progressService.js +0 -523
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorHandler.js +0 -101
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +0 -713
- package/vscode/src/vs/workbench/services/views/common/viewContainerModel.js +0 -598
|
@@ -1,1484 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
3
|
-
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
4
|
-
import { isEditorPaneWithSelection, isEditorInput, EditorResourceAccessor, EditorCloseContext, SideBySideEditor, isSideBySideEditorInput, isResourceEditorInput } from 'vscode/vscode/vs/workbench/common/editor';
|
|
5
|
-
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
|
|
6
|
-
import { IHistoryService } from 'vscode/vscode/vs/workbench/services/history/common/history';
|
|
7
|
-
import { FILES_EXCLUDE_CONFIG, FileChangesEvent, FileOperationEvent, IFileService } from 'vscode/vscode/vs/platform/files/common/files';
|
|
8
|
-
import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace';
|
|
9
|
-
import { Disposable, DisposableStore, dispose } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
10
|
-
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
11
|
-
import { Emitter, Event } from 'vscode/vscode/vs/base/common/event';
|
|
12
|
-
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration';
|
|
13
|
-
import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService';
|
|
14
|
-
import { getExcludes, SEARCH_EXCLUDE_CONFIG } from 'vscode/vscode/vs/workbench/services/search/common/search';
|
|
15
|
-
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
16
|
-
import { IWorkbenchLayoutService } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService';
|
|
17
|
-
import { RawContextKey, IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
18
|
-
import { coalesce, remove } from 'vscode/vscode/vs/base/common/arrays';
|
|
19
|
-
import { registerSingleton } from 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
20
|
-
import { WindowIdleValue, EventHelper, addDisposableListener, EventType } from 'vscode/vscode/vs/base/browser/dom';
|
|
21
|
-
import { IWorkspacesService } from 'vscode/vscode/vs/platform/workspaces/common/workspaces';
|
|
22
|
-
import { Schemas } from 'vscode/vscode/vs/base/common/network';
|
|
23
|
-
import { onUnexpectedError } from 'vscode/vscode/vs/base/common/errors';
|
|
24
|
-
import { ResourceGlobMatcher } from 'vscode/vscode/vs/workbench/common/resources';
|
|
25
|
-
import { IPathService } from 'vscode/vscode/vs/workbench/services/path/common/pathService';
|
|
26
|
-
import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity';
|
|
27
|
-
import { ILifecycleService } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
28
|
-
import { LogLevel, ILogService } from 'vscode/vscode/vs/platform/log/common/log';
|
|
29
|
-
import { mainWindow } from 'vscode/vscode/vs/base/browser/window';
|
|
30
|
-
|
|
31
|
-
var HistoryService_1, EditorNavigationStack_1;
|
|
32
|
-
let HistoryService = class HistoryService extends Disposable {
|
|
33
|
-
static { HistoryService_1 = this; }
|
|
34
|
-
static { this.MOUSE_NAVIGATION_SETTING = 'workbench.editor.mouseBackForwardToNavigate'; }
|
|
35
|
-
static { this.NAVIGATION_SCOPE_SETTING = 'workbench.editor.navigationScope'; }
|
|
36
|
-
constructor(editorService, editorGroupService, contextService, storageService, configurationService, fileService, workspacesService, instantiationService, layoutService, contextKeyService) {
|
|
37
|
-
super();
|
|
38
|
-
this.editorService = editorService;
|
|
39
|
-
this.editorGroupService = editorGroupService;
|
|
40
|
-
this.contextService = contextService;
|
|
41
|
-
this.storageService = storageService;
|
|
42
|
-
this.configurationService = configurationService;
|
|
43
|
-
this.fileService = fileService;
|
|
44
|
-
this.workspacesService = workspacesService;
|
|
45
|
-
this.instantiationService = instantiationService;
|
|
46
|
-
this.layoutService = layoutService;
|
|
47
|
-
this.contextKeyService = contextKeyService;
|
|
48
|
-
this.activeEditorListeners = this._register(( new DisposableStore()));
|
|
49
|
-
this.lastActiveEditor = undefined;
|
|
50
|
-
this.editorHelper = this.instantiationService.createInstance(EditorHelper);
|
|
51
|
-
this.canNavigateBackContextKey = (( new RawContextKey('canNavigateBack', false, ( localizeWithPath(
|
|
52
|
-
'vs/workbench/services/history/browser/historyService',
|
|
53
|
-
'canNavigateBack',
|
|
54
|
-
"Whether it is possible to navigate back in editor history"
|
|
55
|
-
))))).bindTo(this.contextKeyService);
|
|
56
|
-
this.canNavigateForwardContextKey = (( new RawContextKey('canNavigateForward', false, ( localizeWithPath(
|
|
57
|
-
'vs/workbench/services/history/browser/historyService',
|
|
58
|
-
'canNavigateForward',
|
|
59
|
-
"Whether it is possible to navigate forward in editor history"
|
|
60
|
-
))))).bindTo(this.contextKeyService);
|
|
61
|
-
this.canNavigateBackInNavigationsContextKey = (( new RawContextKey('canNavigateBackInNavigationLocations', false, ( localizeWithPath(
|
|
62
|
-
'vs/workbench/services/history/browser/historyService',
|
|
63
|
-
'canNavigateBackInNavigationLocations',
|
|
64
|
-
"Whether it is possible to navigate back in editor navigation locations history"
|
|
65
|
-
))))).bindTo(this.contextKeyService);
|
|
66
|
-
this.canNavigateForwardInNavigationsContextKey = (( new RawContextKey('canNavigateForwardInNavigationLocations', false, ( localizeWithPath(
|
|
67
|
-
'vs/workbench/services/history/browser/historyService',
|
|
68
|
-
'canNavigateForwardInNavigationLocations',
|
|
69
|
-
"Whether it is possible to navigate forward in editor navigation locations history"
|
|
70
|
-
))))).bindTo(this.contextKeyService);
|
|
71
|
-
this.canNavigateToLastNavigationLocationContextKey = (( new RawContextKey('canNavigateToLastNavigationLocation', false, ( localizeWithPath(
|
|
72
|
-
'vs/workbench/services/history/browser/historyService',
|
|
73
|
-
'canNavigateToLastNavigationLocation',
|
|
74
|
-
"Whether it is possible to navigate to the last editor navigation location"
|
|
75
|
-
))))).bindTo(this.contextKeyService);
|
|
76
|
-
this.canNavigateBackInEditsContextKey = (( new RawContextKey('canNavigateBackInEditLocations', false, ( localizeWithPath(
|
|
77
|
-
'vs/workbench/services/history/browser/historyService',
|
|
78
|
-
'canNavigateBackInEditLocations',
|
|
79
|
-
"Whether it is possible to navigate back in editor edit locations history"
|
|
80
|
-
))))).bindTo(this.contextKeyService);
|
|
81
|
-
this.canNavigateForwardInEditsContextKey = (( new RawContextKey('canNavigateForwardInEditLocations', false, ( localizeWithPath(
|
|
82
|
-
'vs/workbench/services/history/browser/historyService',
|
|
83
|
-
'canNavigateForwardInEditLocations',
|
|
84
|
-
"Whether it is possible to navigate forward in editor edit locations history"
|
|
85
|
-
))))).bindTo(this.contextKeyService);
|
|
86
|
-
this.canNavigateToLastEditLocationContextKey = (( new RawContextKey('canNavigateToLastEditLocation', false, ( localizeWithPath(
|
|
87
|
-
'vs/workbench/services/history/browser/historyService',
|
|
88
|
-
'canNavigateToLastEditLocation',
|
|
89
|
-
"Whether it is possible to navigate to the last editor edit location"
|
|
90
|
-
))))).bindTo(this.contextKeyService);
|
|
91
|
-
this.canReopenClosedEditorContextKey = (( new RawContextKey('canReopenClosedEditor', false, ( localizeWithPath(
|
|
92
|
-
'vs/workbench/services/history/browser/historyService',
|
|
93
|
-
'canReopenClosedEditor',
|
|
94
|
-
"Whether it is possible to reopen the last closed editor"
|
|
95
|
-
))))).bindTo(this.contextKeyService);
|
|
96
|
-
this._onDidChangeEditorNavigationStack = this._register(( new Emitter()));
|
|
97
|
-
this.onDidChangeEditorNavigationStack = this._onDidChangeEditorNavigationStack.event;
|
|
98
|
-
this.defaultScopedEditorNavigationStack = undefined;
|
|
99
|
-
this.editorGroupScopedNavigationStacks = ( new Map());
|
|
100
|
-
this.editorScopedNavigationStacks = ( new Map());
|
|
101
|
-
this.editorNavigationScope = 0 ;
|
|
102
|
-
this.recentlyUsedEditorsStack = undefined;
|
|
103
|
-
this.recentlyUsedEditorsStackIndex = 0;
|
|
104
|
-
this.recentlyUsedEditorsInGroupStack = undefined;
|
|
105
|
-
this.recentlyUsedEditorsInGroupStackIndex = 0;
|
|
106
|
-
this.navigatingInRecentlyUsedEditorsStack = false;
|
|
107
|
-
this.navigatingInRecentlyUsedEditorsInGroupStack = false;
|
|
108
|
-
this.recentlyClosedEditors = [];
|
|
109
|
-
this.ignoreEditorCloseEvent = false;
|
|
110
|
-
this.history = undefined;
|
|
111
|
-
this.editorHistoryListeners = ( new Map());
|
|
112
|
-
this.resourceExcludeMatcher = this._register(( new WindowIdleValue(mainWindow, () => {
|
|
113
|
-
const matcher = this._register(this.instantiationService.createInstance(ResourceGlobMatcher, root => getExcludes(root ? this.configurationService.getValue({ resource: root }) : this.configurationService.getValue()) || Object.create(null), event => event.affectsConfiguration(FILES_EXCLUDE_CONFIG) || event.affectsConfiguration(SEARCH_EXCLUDE_CONFIG)));
|
|
114
|
-
this._register(matcher.onExpressionChange(() => this.removeExcludedFromHistory()));
|
|
115
|
-
return matcher;
|
|
116
|
-
})));
|
|
117
|
-
this.registerListeners();
|
|
118
|
-
if (this.editorService.activeEditorPane) {
|
|
119
|
-
this.onDidActiveEditorChange();
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
registerListeners() {
|
|
123
|
-
this.registerMouseNavigationListener();
|
|
124
|
-
this._register(this.editorService.onDidActiveEditorChange(() => this.onDidActiveEditorChange()));
|
|
125
|
-
this._register(this.editorService.onDidOpenEditorFail(event => this.remove(event.editor)));
|
|
126
|
-
this._register(this.editorService.onDidCloseEditor(event => this.onDidCloseEditor(event)));
|
|
127
|
-
this._register(this.editorService.onDidMostRecentlyActiveEditorsChange(() => this.handleEditorEventInRecentEditorsStack()));
|
|
128
|
-
this._register(this.editorGroupService.onDidRemoveGroup(e => this.onDidRemoveGroup(e)));
|
|
129
|
-
this._register(this.fileService.onDidFilesChange(event => this.onDidFilesChange(event)));
|
|
130
|
-
this._register(this.fileService.onDidRunOperation(event => this.onDidFilesChange(event)));
|
|
131
|
-
this._register(this.storageService.onWillSaveState(() => this.saveState()));
|
|
132
|
-
this.registerEditorNavigationScopeChangeListener();
|
|
133
|
-
this._register(this.onDidChangeEditorNavigationStack(() => this.updateContextKeys()));
|
|
134
|
-
this._register(this.editorGroupService.onDidChangeActiveGroup(() => this.updateContextKeys()));
|
|
135
|
-
}
|
|
136
|
-
onDidCloseEditor(e) {
|
|
137
|
-
this.handleEditorCloseEventInHistory(e);
|
|
138
|
-
this.handleEditorCloseEventInReopen(e);
|
|
139
|
-
}
|
|
140
|
-
registerMouseNavigationListener() {
|
|
141
|
-
const mouseBackForwardSupportListener = this._register(( new DisposableStore()));
|
|
142
|
-
const handleMouseBackForwardSupport = () => {
|
|
143
|
-
mouseBackForwardSupportListener.clear();
|
|
144
|
-
if (this.configurationService.getValue(HistoryService_1.MOUSE_NAVIGATION_SETTING)) {
|
|
145
|
-
this._register(Event.runAndSubscribe(this.layoutService.onDidAddContainer, ({ container, disposables }) => {
|
|
146
|
-
const eventDisposables = disposables.add(( new DisposableStore()));
|
|
147
|
-
eventDisposables.add(addDisposableListener(container, EventType.MOUSE_DOWN, e => this.onMouseDownOrUp(e, true)));
|
|
148
|
-
eventDisposables.add(addDisposableListener(container, EventType.MOUSE_UP, e => this.onMouseDownOrUp(e, false)));
|
|
149
|
-
mouseBackForwardSupportListener.add(eventDisposables);
|
|
150
|
-
}, { container: this.layoutService.mainContainer, disposables: this._store }));
|
|
151
|
-
}
|
|
152
|
-
};
|
|
153
|
-
this._register(this.configurationService.onDidChangeConfiguration(event => {
|
|
154
|
-
if (event.affectsConfiguration(HistoryService_1.MOUSE_NAVIGATION_SETTING)) {
|
|
155
|
-
handleMouseBackForwardSupport();
|
|
156
|
-
}
|
|
157
|
-
}));
|
|
158
|
-
handleMouseBackForwardSupport();
|
|
159
|
-
}
|
|
160
|
-
onMouseDownOrUp(event, isMouseDown) {
|
|
161
|
-
switch (event.button) {
|
|
162
|
-
case 3:
|
|
163
|
-
EventHelper.stop(event);
|
|
164
|
-
if (isMouseDown) {
|
|
165
|
-
this.goBack();
|
|
166
|
-
}
|
|
167
|
-
break;
|
|
168
|
-
case 4:
|
|
169
|
-
EventHelper.stop(event);
|
|
170
|
-
if (isMouseDown) {
|
|
171
|
-
this.goForward();
|
|
172
|
-
}
|
|
173
|
-
break;
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
onDidRemoveGroup(group) {
|
|
177
|
-
this.handleEditorGroupRemoveInNavigationStacks(group);
|
|
178
|
-
}
|
|
179
|
-
onDidActiveEditorChange() {
|
|
180
|
-
const activeEditorGroup = this.editorGroupService.activeGroup;
|
|
181
|
-
const activeEditorPane = activeEditorGroup.activeEditorPane;
|
|
182
|
-
if (this.lastActiveEditor && this.editorHelper.matchesEditorIdentifier(this.lastActiveEditor, activeEditorPane)) {
|
|
183
|
-
return;
|
|
184
|
-
}
|
|
185
|
-
this.lastActiveEditor = activeEditorPane?.input && activeEditorPane.group ? { editor: activeEditorPane.input, groupId: activeEditorPane.group.id } : undefined;
|
|
186
|
-
this.activeEditorListeners.clear();
|
|
187
|
-
this.handleActiveEditorChange(activeEditorGroup, activeEditorPane);
|
|
188
|
-
if (isEditorPaneWithSelection(activeEditorPane)) {
|
|
189
|
-
this.activeEditorListeners.add(activeEditorPane.onDidChangeSelection(e => this.handleActiveEditorSelectionChangeEvent(activeEditorGroup, activeEditorPane, e)));
|
|
190
|
-
}
|
|
191
|
-
this.updateContextKeys();
|
|
192
|
-
}
|
|
193
|
-
onDidFilesChange(event) {
|
|
194
|
-
if (event instanceof FileChangesEvent) {
|
|
195
|
-
if (event.gotDeleted()) {
|
|
196
|
-
this.remove(event);
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
else {
|
|
200
|
-
if (event.isOperation(1 )) {
|
|
201
|
-
this.remove(event);
|
|
202
|
-
}
|
|
203
|
-
else if (event.isOperation(2 ) && event.target.isFile) {
|
|
204
|
-
this.move(event);
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
handleActiveEditorChange(group, editorPane) {
|
|
209
|
-
this.handleActiveEditorChangeInHistory(editorPane);
|
|
210
|
-
this.handleActiveEditorChangeInNavigationStacks(group, editorPane);
|
|
211
|
-
}
|
|
212
|
-
handleActiveEditorSelectionChangeEvent(group, editorPane, event) {
|
|
213
|
-
this.handleActiveEditorSelectionChangeInNavigationStacks(group, editorPane, event);
|
|
214
|
-
}
|
|
215
|
-
move(event) {
|
|
216
|
-
this.moveInHistory(event);
|
|
217
|
-
this.moveInEditorNavigationStacks(event);
|
|
218
|
-
}
|
|
219
|
-
remove(arg1) {
|
|
220
|
-
this.removeFromHistory(arg1);
|
|
221
|
-
this.removeFromEditorNavigationStacks(arg1);
|
|
222
|
-
this.removeFromRecentlyClosedEditors(arg1);
|
|
223
|
-
this.removeFromRecentlyOpened(arg1);
|
|
224
|
-
}
|
|
225
|
-
removeFromRecentlyOpened(arg1) {
|
|
226
|
-
let resource = undefined;
|
|
227
|
-
if (isEditorInput(arg1)) {
|
|
228
|
-
resource = EditorResourceAccessor.getOriginalUri(arg1);
|
|
229
|
-
}
|
|
230
|
-
else if (arg1 instanceof FileChangesEvent) ;
|
|
231
|
-
else {
|
|
232
|
-
resource = arg1.resource;
|
|
233
|
-
}
|
|
234
|
-
if (resource) {
|
|
235
|
-
this.workspacesService.removeRecentlyOpened([resource]);
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
clear() {
|
|
239
|
-
this.clearRecentlyOpened();
|
|
240
|
-
this.clearEditorNavigationStacks();
|
|
241
|
-
this.recentlyClosedEditors = [];
|
|
242
|
-
this.updateContextKeys();
|
|
243
|
-
}
|
|
244
|
-
updateContextKeys() {
|
|
245
|
-
this.contextKeyService.bufferChangeEvents(() => {
|
|
246
|
-
const activeStack = this.getStack();
|
|
247
|
-
this.canNavigateBackContextKey.set(activeStack.canGoBack(0 ));
|
|
248
|
-
this.canNavigateForwardContextKey.set(activeStack.canGoForward(0 ));
|
|
249
|
-
this.canNavigateBackInNavigationsContextKey.set(activeStack.canGoBack(2 ));
|
|
250
|
-
this.canNavigateForwardInNavigationsContextKey.set(activeStack.canGoForward(2 ));
|
|
251
|
-
this.canNavigateToLastNavigationLocationContextKey.set(activeStack.canGoLast(2 ));
|
|
252
|
-
this.canNavigateBackInEditsContextKey.set(activeStack.canGoBack(1 ));
|
|
253
|
-
this.canNavigateForwardInEditsContextKey.set(activeStack.canGoForward(1 ));
|
|
254
|
-
this.canNavigateToLastEditLocationContextKey.set(activeStack.canGoLast(1 ));
|
|
255
|
-
this.canReopenClosedEditorContextKey.set(this.recentlyClosedEditors.length > 0);
|
|
256
|
-
});
|
|
257
|
-
}
|
|
258
|
-
registerEditorNavigationScopeChangeListener() {
|
|
259
|
-
const handleEditorNavigationScopeChange = () => {
|
|
260
|
-
this.disposeEditorNavigationStacks();
|
|
261
|
-
const configuredScope = this.configurationService.getValue(HistoryService_1.NAVIGATION_SCOPE_SETTING);
|
|
262
|
-
if (configuredScope === 'editorGroup') {
|
|
263
|
-
this.editorNavigationScope = 1 ;
|
|
264
|
-
}
|
|
265
|
-
else if (configuredScope === 'editor') {
|
|
266
|
-
this.editorNavigationScope = 2 ;
|
|
267
|
-
}
|
|
268
|
-
else {
|
|
269
|
-
this.editorNavigationScope = 0 ;
|
|
270
|
-
}
|
|
271
|
-
};
|
|
272
|
-
this._register(this.configurationService.onDidChangeConfiguration(event => {
|
|
273
|
-
if (event.affectsConfiguration(HistoryService_1.NAVIGATION_SCOPE_SETTING)) {
|
|
274
|
-
handleEditorNavigationScopeChange();
|
|
275
|
-
}
|
|
276
|
-
}));
|
|
277
|
-
handleEditorNavigationScopeChange();
|
|
278
|
-
}
|
|
279
|
-
getStack(group = this.editorGroupService.activeGroup, editor = group.activeEditor) {
|
|
280
|
-
switch (this.editorNavigationScope) {
|
|
281
|
-
case 2 : {
|
|
282
|
-
if (!editor) {
|
|
283
|
-
return ( new NoOpEditorNavigationStacks());
|
|
284
|
-
}
|
|
285
|
-
let stacksForGroup = this.editorScopedNavigationStacks.get(group.id);
|
|
286
|
-
if (!stacksForGroup) {
|
|
287
|
-
stacksForGroup = ( new Map());
|
|
288
|
-
this.editorScopedNavigationStacks.set(group.id, stacksForGroup);
|
|
289
|
-
}
|
|
290
|
-
let stack = stacksForGroup.get(editor)?.stack;
|
|
291
|
-
if (!stack) {
|
|
292
|
-
const disposable = ( new DisposableStore());
|
|
293
|
-
stack = disposable.add(this.instantiationService.createInstance(EditorNavigationStacks, 2 ));
|
|
294
|
-
disposable.add(stack.onDidChange(() => this._onDidChangeEditorNavigationStack.fire()));
|
|
295
|
-
stacksForGroup.set(editor, { stack, disposable });
|
|
296
|
-
}
|
|
297
|
-
return stack;
|
|
298
|
-
}
|
|
299
|
-
case 1 : {
|
|
300
|
-
let stack = this.editorGroupScopedNavigationStacks.get(group.id)?.stack;
|
|
301
|
-
if (!stack) {
|
|
302
|
-
const disposable = ( new DisposableStore());
|
|
303
|
-
stack = disposable.add(this.instantiationService.createInstance(EditorNavigationStacks, 1 ));
|
|
304
|
-
disposable.add(stack.onDidChange(() => this._onDidChangeEditorNavigationStack.fire()));
|
|
305
|
-
this.editorGroupScopedNavigationStacks.set(group.id, { stack, disposable });
|
|
306
|
-
}
|
|
307
|
-
return stack;
|
|
308
|
-
}
|
|
309
|
-
case 0 : {
|
|
310
|
-
if (!this.defaultScopedEditorNavigationStack) {
|
|
311
|
-
this.defaultScopedEditorNavigationStack = this._register(this.instantiationService.createInstance(EditorNavigationStacks, 0 ));
|
|
312
|
-
this._register(this.defaultScopedEditorNavigationStack.onDidChange(() => this._onDidChangeEditorNavigationStack.fire()));
|
|
313
|
-
}
|
|
314
|
-
return this.defaultScopedEditorNavigationStack;
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
goForward(filter) {
|
|
319
|
-
return this.getStack().goForward(filter);
|
|
320
|
-
}
|
|
321
|
-
goBack(filter) {
|
|
322
|
-
return this.getStack().goBack(filter);
|
|
323
|
-
}
|
|
324
|
-
goPrevious(filter) {
|
|
325
|
-
return this.getStack().goPrevious(filter);
|
|
326
|
-
}
|
|
327
|
-
goLast(filter) {
|
|
328
|
-
return this.getStack().goLast(filter);
|
|
329
|
-
}
|
|
330
|
-
handleActiveEditorChangeInNavigationStacks(group, editorPane) {
|
|
331
|
-
this.getStack(group, editorPane?.input).handleActiveEditorChange(editorPane);
|
|
332
|
-
}
|
|
333
|
-
handleActiveEditorSelectionChangeInNavigationStacks(group, editorPane, event) {
|
|
334
|
-
this.getStack(group, editorPane.input).handleActiveEditorSelectionChange(editorPane, event);
|
|
335
|
-
}
|
|
336
|
-
handleEditorCloseEventInHistory(e) {
|
|
337
|
-
const editors = this.editorScopedNavigationStacks.get(e.groupId);
|
|
338
|
-
if (editors) {
|
|
339
|
-
const editorStack = editors.get(e.editor);
|
|
340
|
-
if (editorStack) {
|
|
341
|
-
editorStack.disposable.dispose();
|
|
342
|
-
editors.delete(e.editor);
|
|
343
|
-
}
|
|
344
|
-
if (editors.size === 0) {
|
|
345
|
-
this.editorScopedNavigationStacks.delete(e.groupId);
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
handleEditorGroupRemoveInNavigationStacks(group) {
|
|
350
|
-
this.defaultScopedEditorNavigationStack?.remove(group.id);
|
|
351
|
-
const editorGroupStack = this.editorGroupScopedNavigationStacks.get(group.id);
|
|
352
|
-
if (editorGroupStack) {
|
|
353
|
-
editorGroupStack.disposable.dispose();
|
|
354
|
-
this.editorGroupScopedNavigationStacks.delete(group.id);
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
clearEditorNavigationStacks() {
|
|
358
|
-
this.withEachEditorNavigationStack(stack => stack.clear());
|
|
359
|
-
}
|
|
360
|
-
removeFromEditorNavigationStacks(arg1) {
|
|
361
|
-
this.withEachEditorNavigationStack(stack => stack.remove(arg1));
|
|
362
|
-
}
|
|
363
|
-
moveInEditorNavigationStacks(event) {
|
|
364
|
-
this.withEachEditorNavigationStack(stack => stack.move(event));
|
|
365
|
-
}
|
|
366
|
-
withEachEditorNavigationStack(fn) {
|
|
367
|
-
if (this.defaultScopedEditorNavigationStack) {
|
|
368
|
-
fn(this.defaultScopedEditorNavigationStack);
|
|
369
|
-
}
|
|
370
|
-
for (const [, entry] of this.editorGroupScopedNavigationStacks) {
|
|
371
|
-
fn(entry.stack);
|
|
372
|
-
}
|
|
373
|
-
for (const [, entries] of this.editorScopedNavigationStacks) {
|
|
374
|
-
for (const [, entry] of entries) {
|
|
375
|
-
fn(entry.stack);
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
disposeEditorNavigationStacks() {
|
|
380
|
-
this.defaultScopedEditorNavigationStack?.dispose();
|
|
381
|
-
this.defaultScopedEditorNavigationStack = undefined;
|
|
382
|
-
for (const [, stack] of this.editorGroupScopedNavigationStacks) {
|
|
383
|
-
stack.disposable.dispose();
|
|
384
|
-
}
|
|
385
|
-
this.editorGroupScopedNavigationStacks.clear();
|
|
386
|
-
for (const [, stacks] of this.editorScopedNavigationStacks) {
|
|
387
|
-
for (const [, stack] of stacks) {
|
|
388
|
-
stack.disposable.dispose();
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
this.editorScopedNavigationStacks.clear();
|
|
392
|
-
}
|
|
393
|
-
openNextRecentlyUsedEditor(groupId) {
|
|
394
|
-
const [stack, index] = this.ensureRecentlyUsedStack(index => index - 1, groupId);
|
|
395
|
-
return this.doNavigateInRecentlyUsedEditorsStack(stack[index], groupId);
|
|
396
|
-
}
|
|
397
|
-
openPreviouslyUsedEditor(groupId) {
|
|
398
|
-
const [stack, index] = this.ensureRecentlyUsedStack(index => index + 1, groupId);
|
|
399
|
-
return this.doNavigateInRecentlyUsedEditorsStack(stack[index], groupId);
|
|
400
|
-
}
|
|
401
|
-
async doNavigateInRecentlyUsedEditorsStack(editorIdentifier, groupId) {
|
|
402
|
-
if (editorIdentifier) {
|
|
403
|
-
const acrossGroups = typeof groupId !== 'number' || !this.editorGroupService.getGroup(groupId);
|
|
404
|
-
if (acrossGroups) {
|
|
405
|
-
this.navigatingInRecentlyUsedEditorsStack = true;
|
|
406
|
-
}
|
|
407
|
-
else {
|
|
408
|
-
this.navigatingInRecentlyUsedEditorsInGroupStack = true;
|
|
409
|
-
}
|
|
410
|
-
const group = this.editorGroupService.getGroup(editorIdentifier.groupId) ?? this.editorGroupService.activeGroup;
|
|
411
|
-
try {
|
|
412
|
-
await group.openEditor(editorIdentifier.editor);
|
|
413
|
-
}
|
|
414
|
-
finally {
|
|
415
|
-
if (acrossGroups) {
|
|
416
|
-
this.navigatingInRecentlyUsedEditorsStack = false;
|
|
417
|
-
}
|
|
418
|
-
else {
|
|
419
|
-
this.navigatingInRecentlyUsedEditorsInGroupStack = false;
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
ensureRecentlyUsedStack(indexModifier, groupId) {
|
|
425
|
-
let editors;
|
|
426
|
-
let index;
|
|
427
|
-
const group = typeof groupId === 'number' ? this.editorGroupService.getGroup(groupId) : undefined;
|
|
428
|
-
if (!group) {
|
|
429
|
-
editors = this.recentlyUsedEditorsStack || this.editorService.getEditors(0 );
|
|
430
|
-
index = this.recentlyUsedEditorsStackIndex;
|
|
431
|
-
}
|
|
432
|
-
else {
|
|
433
|
-
editors = this.recentlyUsedEditorsInGroupStack || ( group.getEditors(0 ).map(editor => ({ groupId: group.id, editor })));
|
|
434
|
-
index = this.recentlyUsedEditorsInGroupStackIndex;
|
|
435
|
-
}
|
|
436
|
-
let newIndex = indexModifier(index);
|
|
437
|
-
if (newIndex < 0) {
|
|
438
|
-
newIndex = 0;
|
|
439
|
-
}
|
|
440
|
-
else if (newIndex > editors.length - 1) {
|
|
441
|
-
newIndex = editors.length - 1;
|
|
442
|
-
}
|
|
443
|
-
if (!group) {
|
|
444
|
-
this.recentlyUsedEditorsStack = editors;
|
|
445
|
-
this.recentlyUsedEditorsStackIndex = newIndex;
|
|
446
|
-
}
|
|
447
|
-
else {
|
|
448
|
-
this.recentlyUsedEditorsInGroupStack = editors;
|
|
449
|
-
this.recentlyUsedEditorsInGroupStackIndex = newIndex;
|
|
450
|
-
}
|
|
451
|
-
return [editors, newIndex];
|
|
452
|
-
}
|
|
453
|
-
handleEditorEventInRecentEditorsStack() {
|
|
454
|
-
if (!this.navigatingInRecentlyUsedEditorsStack) {
|
|
455
|
-
this.recentlyUsedEditorsStack = undefined;
|
|
456
|
-
this.recentlyUsedEditorsStackIndex = 0;
|
|
457
|
-
}
|
|
458
|
-
if (!this.navigatingInRecentlyUsedEditorsInGroupStack) {
|
|
459
|
-
this.recentlyUsedEditorsInGroupStack = undefined;
|
|
460
|
-
this.recentlyUsedEditorsInGroupStackIndex = 0;
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
static { this.MAX_RECENTLY_CLOSED_EDITORS = 20; }
|
|
464
|
-
handleEditorCloseEventInReopen(event) {
|
|
465
|
-
if (this.ignoreEditorCloseEvent) {
|
|
466
|
-
return;
|
|
467
|
-
}
|
|
468
|
-
const { editor, context } = event;
|
|
469
|
-
if (context === EditorCloseContext.REPLACE || context === EditorCloseContext.MOVE) {
|
|
470
|
-
return;
|
|
471
|
-
}
|
|
472
|
-
const untypedEditor = editor.toUntyped();
|
|
473
|
-
if (!untypedEditor) {
|
|
474
|
-
return;
|
|
475
|
-
}
|
|
476
|
-
const associatedResources = [];
|
|
477
|
-
const editorResource = EditorResourceAccessor.getOriginalUri(editor, { supportSideBySide: SideBySideEditor.BOTH });
|
|
478
|
-
if (URI.isUri(editorResource)) {
|
|
479
|
-
associatedResources.push(editorResource);
|
|
480
|
-
}
|
|
481
|
-
else if (editorResource) {
|
|
482
|
-
associatedResources.push(...coalesce([editorResource.primary, editorResource.secondary]));
|
|
483
|
-
}
|
|
484
|
-
this.removeFromRecentlyClosedEditors(editor);
|
|
485
|
-
this.recentlyClosedEditors.push({
|
|
486
|
-
editorId: editor.editorId,
|
|
487
|
-
editor: untypedEditor,
|
|
488
|
-
resource: EditorResourceAccessor.getOriginalUri(editor),
|
|
489
|
-
associatedResources,
|
|
490
|
-
index: event.index,
|
|
491
|
-
sticky: event.sticky
|
|
492
|
-
});
|
|
493
|
-
if (this.recentlyClosedEditors.length > HistoryService_1.MAX_RECENTLY_CLOSED_EDITORS) {
|
|
494
|
-
this.recentlyClosedEditors.shift();
|
|
495
|
-
}
|
|
496
|
-
this.canReopenClosedEditorContextKey.set(true);
|
|
497
|
-
}
|
|
498
|
-
async reopenLastClosedEditor() {
|
|
499
|
-
const lastClosedEditor = this.recentlyClosedEditors.pop();
|
|
500
|
-
let reopenClosedEditorPromise = undefined;
|
|
501
|
-
if (lastClosedEditor) {
|
|
502
|
-
reopenClosedEditorPromise = this.doReopenLastClosedEditor(lastClosedEditor);
|
|
503
|
-
}
|
|
504
|
-
this.canReopenClosedEditorContextKey.set(this.recentlyClosedEditors.length > 0);
|
|
505
|
-
return reopenClosedEditorPromise;
|
|
506
|
-
}
|
|
507
|
-
async doReopenLastClosedEditor(lastClosedEditor) {
|
|
508
|
-
const options = { pinned: true, sticky: lastClosedEditor.sticky, index: lastClosedEditor.index, ignoreError: true };
|
|
509
|
-
if ((lastClosedEditor.sticky && !this.editorGroupService.activeGroup.isSticky(lastClosedEditor.index)) ||
|
|
510
|
-
(!lastClosedEditor.sticky && this.editorGroupService.activeGroup.isSticky(lastClosedEditor.index))) {
|
|
511
|
-
options.index = undefined;
|
|
512
|
-
}
|
|
513
|
-
let editorPane = undefined;
|
|
514
|
-
if (!this.editorGroupService.activeGroup.contains(lastClosedEditor.editor)) {
|
|
515
|
-
this.ignoreEditorCloseEvent = true;
|
|
516
|
-
try {
|
|
517
|
-
editorPane = await this.editorService.openEditor({
|
|
518
|
-
...lastClosedEditor.editor,
|
|
519
|
-
options: {
|
|
520
|
-
...lastClosedEditor.editor.options,
|
|
521
|
-
...options
|
|
522
|
-
}
|
|
523
|
-
});
|
|
524
|
-
}
|
|
525
|
-
finally {
|
|
526
|
-
this.ignoreEditorCloseEvent = false;
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
|
-
if (!editorPane) {
|
|
530
|
-
remove(this.recentlyClosedEditors, lastClosedEditor);
|
|
531
|
-
this.reopenLastClosedEditor();
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
removeFromRecentlyClosedEditors(arg1) {
|
|
535
|
-
this.recentlyClosedEditors = this.recentlyClosedEditors.filter(recentlyClosedEditor => {
|
|
536
|
-
if (isEditorInput(arg1) && recentlyClosedEditor.editorId !== arg1.editorId) {
|
|
537
|
-
return true;
|
|
538
|
-
}
|
|
539
|
-
if (recentlyClosedEditor.resource && this.editorHelper.matchesFile(recentlyClosedEditor.resource, arg1)) {
|
|
540
|
-
return false;
|
|
541
|
-
}
|
|
542
|
-
if (( recentlyClosedEditor.associatedResources.some(
|
|
543
|
-
associatedResource => this.editorHelper.matchesFile(associatedResource, arg1)
|
|
544
|
-
))) {
|
|
545
|
-
return false;
|
|
546
|
-
}
|
|
547
|
-
return true;
|
|
548
|
-
});
|
|
549
|
-
this.canReopenClosedEditorContextKey.set(this.recentlyClosedEditors.length > 0);
|
|
550
|
-
}
|
|
551
|
-
static { this.MAX_HISTORY_ITEMS = 200; }
|
|
552
|
-
static { this.HISTORY_STORAGE_KEY = 'history.entries'; }
|
|
553
|
-
handleActiveEditorChangeInHistory(editorPane) {
|
|
554
|
-
const editor = editorPane?.input;
|
|
555
|
-
if (!editor || editor.isDisposed() || !this.includeInHistory(editor)) {
|
|
556
|
-
return;
|
|
557
|
-
}
|
|
558
|
-
this.removeFromHistory(editor);
|
|
559
|
-
this.addToHistory(editor);
|
|
560
|
-
}
|
|
561
|
-
addToHistory(editor, insertFirst = true) {
|
|
562
|
-
this.ensureHistoryLoaded(this.history);
|
|
563
|
-
const historyInput = this.editorHelper.preferResourceEditorInput(editor);
|
|
564
|
-
if (!historyInput) {
|
|
565
|
-
return;
|
|
566
|
-
}
|
|
567
|
-
if (insertFirst) {
|
|
568
|
-
this.history.unshift(historyInput);
|
|
569
|
-
}
|
|
570
|
-
else {
|
|
571
|
-
this.history.push(historyInput);
|
|
572
|
-
}
|
|
573
|
-
if (this.history.length > HistoryService_1.MAX_HISTORY_ITEMS) {
|
|
574
|
-
this.editorHelper.clearOnEditorDispose(this.history.pop(), this.editorHistoryListeners);
|
|
575
|
-
}
|
|
576
|
-
if (isEditorInput(historyInput)) {
|
|
577
|
-
this.editorHelper.onEditorDispose(historyInput, () => this.updateHistoryOnEditorDispose(historyInput), this.editorHistoryListeners);
|
|
578
|
-
}
|
|
579
|
-
}
|
|
580
|
-
updateHistoryOnEditorDispose(editor) {
|
|
581
|
-
if (!isSideBySideEditorInput(editor)) {
|
|
582
|
-
this.removeFromHistory(editor);
|
|
583
|
-
}
|
|
584
|
-
else {
|
|
585
|
-
const resourceInputs = [];
|
|
586
|
-
const sideInputs = editor.primary.matches(editor.secondary) ? [editor.primary] : [editor.primary, editor.secondary];
|
|
587
|
-
for (const sideInput of sideInputs) {
|
|
588
|
-
const candidateResourceInput = this.editorHelper.preferResourceEditorInput(sideInput);
|
|
589
|
-
if (isResourceEditorInput(candidateResourceInput)) {
|
|
590
|
-
resourceInputs.push(candidateResourceInput);
|
|
591
|
-
}
|
|
592
|
-
}
|
|
593
|
-
this.replaceInHistory(editor, ...resourceInputs);
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
includeInHistory(editor) {
|
|
597
|
-
if (isEditorInput(editor)) {
|
|
598
|
-
return true;
|
|
599
|
-
}
|
|
600
|
-
return !this.resourceExcludeMatcher.value.matches(editor.resource);
|
|
601
|
-
}
|
|
602
|
-
removeExcludedFromHistory() {
|
|
603
|
-
this.ensureHistoryLoaded(this.history);
|
|
604
|
-
this.history = this.history.filter(entry => {
|
|
605
|
-
const include = this.includeInHistory(entry);
|
|
606
|
-
if (!include) {
|
|
607
|
-
this.editorHelper.clearOnEditorDispose(entry, this.editorHistoryListeners);
|
|
608
|
-
}
|
|
609
|
-
return include;
|
|
610
|
-
});
|
|
611
|
-
}
|
|
612
|
-
moveInHistory(event) {
|
|
613
|
-
if (event.isOperation(2 )) {
|
|
614
|
-
const removed = this.removeFromHistory(event);
|
|
615
|
-
if (removed) {
|
|
616
|
-
this.addToHistory({ resource: event.target.resource });
|
|
617
|
-
}
|
|
618
|
-
}
|
|
619
|
-
}
|
|
620
|
-
removeFromHistory(arg1) {
|
|
621
|
-
let removed = false;
|
|
622
|
-
this.ensureHistoryLoaded(this.history);
|
|
623
|
-
this.history = this.history.filter(entry => {
|
|
624
|
-
const matches = this.editorHelper.matchesEditor(arg1, entry);
|
|
625
|
-
if (matches) {
|
|
626
|
-
this.editorHelper.clearOnEditorDispose(arg1, this.editorHistoryListeners);
|
|
627
|
-
removed = true;
|
|
628
|
-
}
|
|
629
|
-
return !matches;
|
|
630
|
-
});
|
|
631
|
-
return removed;
|
|
632
|
-
}
|
|
633
|
-
replaceInHistory(editor, ...replacements) {
|
|
634
|
-
this.ensureHistoryLoaded(this.history);
|
|
635
|
-
let replaced = false;
|
|
636
|
-
const newHistory = [];
|
|
637
|
-
for (const entry of this.history) {
|
|
638
|
-
if (this.editorHelper.matchesEditor(editor, entry)) {
|
|
639
|
-
this.editorHelper.clearOnEditorDispose(editor, this.editorHistoryListeners);
|
|
640
|
-
if (!replaced) {
|
|
641
|
-
newHistory.push(...replacements);
|
|
642
|
-
replaced = true;
|
|
643
|
-
}
|
|
644
|
-
}
|
|
645
|
-
else if (!( replacements.some(replacement => this.editorHelper.matchesEditor(replacement, entry)))) {
|
|
646
|
-
newHistory.push(entry);
|
|
647
|
-
}
|
|
648
|
-
}
|
|
649
|
-
if (!replaced) {
|
|
650
|
-
newHistory.push(...replacements);
|
|
651
|
-
}
|
|
652
|
-
this.history = newHistory;
|
|
653
|
-
}
|
|
654
|
-
clearRecentlyOpened() {
|
|
655
|
-
this.history = [];
|
|
656
|
-
for (const [, disposable] of this.editorHistoryListeners) {
|
|
657
|
-
dispose(disposable);
|
|
658
|
-
}
|
|
659
|
-
this.editorHistoryListeners.clear();
|
|
660
|
-
}
|
|
661
|
-
getHistory() {
|
|
662
|
-
this.ensureHistoryLoaded(this.history);
|
|
663
|
-
return this.history;
|
|
664
|
-
}
|
|
665
|
-
ensureHistoryLoaded(history) {
|
|
666
|
-
if (!this.history) {
|
|
667
|
-
this.history = [];
|
|
668
|
-
if (this.editorGroupService.isReady) {
|
|
669
|
-
this.loadHistory();
|
|
670
|
-
}
|
|
671
|
-
else {
|
|
672
|
-
(async () => {
|
|
673
|
-
await this.editorGroupService.whenReady;
|
|
674
|
-
this.loadHistory();
|
|
675
|
-
})();
|
|
676
|
-
}
|
|
677
|
-
}
|
|
678
|
-
}
|
|
679
|
-
loadHistory() {
|
|
680
|
-
this.history = [];
|
|
681
|
-
const storedEditorHistory = this.loadHistoryFromStorage();
|
|
682
|
-
const openedEditorsLru = [...this.editorService.getEditors(0 )].reverse();
|
|
683
|
-
const handledEditors = ( new Set());
|
|
684
|
-
for (const { editor } of openedEditorsLru) {
|
|
685
|
-
if (!this.includeInHistory(editor)) {
|
|
686
|
-
continue;
|
|
687
|
-
}
|
|
688
|
-
this.addToHistory(editor);
|
|
689
|
-
if (editor.resource) {
|
|
690
|
-
handledEditors.add(`${( editor.resource.toString())}/${editor.editorId}`);
|
|
691
|
-
}
|
|
692
|
-
}
|
|
693
|
-
for (const editor of storedEditorHistory) {
|
|
694
|
-
if (!( handledEditors.has(`${( editor.resource.toString())}/${editor.options?.override}`))) {
|
|
695
|
-
this.addToHistory(editor, false );
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
loadHistoryFromStorage() {
|
|
700
|
-
const entries = [];
|
|
701
|
-
const entriesRaw = this.storageService.get(HistoryService_1.HISTORY_STORAGE_KEY, 1 );
|
|
702
|
-
if (entriesRaw) {
|
|
703
|
-
try {
|
|
704
|
-
const entriesParsed = JSON.parse(entriesRaw);
|
|
705
|
-
for (const entryParsed of entriesParsed) {
|
|
706
|
-
if (!entryParsed.editor || !entryParsed.editor.resource) {
|
|
707
|
-
continue;
|
|
708
|
-
}
|
|
709
|
-
try {
|
|
710
|
-
entries.push({
|
|
711
|
-
...entryParsed.editor,
|
|
712
|
-
resource: typeof entryParsed.editor.resource === 'string' ?
|
|
713
|
-
(
|
|
714
|
-
URI.parse(entryParsed.editor.resource)) :
|
|
715
|
-
( URI.from(entryParsed.editor.resource))
|
|
716
|
-
});
|
|
717
|
-
}
|
|
718
|
-
catch (error) {
|
|
719
|
-
onUnexpectedError(error);
|
|
720
|
-
}
|
|
721
|
-
}
|
|
722
|
-
}
|
|
723
|
-
catch (error) {
|
|
724
|
-
onUnexpectedError(error);
|
|
725
|
-
}
|
|
726
|
-
}
|
|
727
|
-
return entries;
|
|
728
|
-
}
|
|
729
|
-
saveState() {
|
|
730
|
-
if (!this.history) {
|
|
731
|
-
return;
|
|
732
|
-
}
|
|
733
|
-
const entries = [];
|
|
734
|
-
for (const editor of this.history) {
|
|
735
|
-
if (isEditorInput(editor) || !isResourceEditorInput(editor)) {
|
|
736
|
-
continue;
|
|
737
|
-
}
|
|
738
|
-
entries.push({
|
|
739
|
-
editor: {
|
|
740
|
-
...editor,
|
|
741
|
-
resource: ( editor.resource.toString())
|
|
742
|
-
}
|
|
743
|
-
});
|
|
744
|
-
}
|
|
745
|
-
this.storageService.store(HistoryService_1.HISTORY_STORAGE_KEY, JSON.stringify(entries), 1 , 1 );
|
|
746
|
-
}
|
|
747
|
-
getLastActiveWorkspaceRoot(schemeFilter, authorityFilter) {
|
|
748
|
-
const folders = this.contextService.getWorkspace().folders;
|
|
749
|
-
if (folders.length === 0) {
|
|
750
|
-
return undefined;
|
|
751
|
-
}
|
|
752
|
-
if (folders.length === 1) {
|
|
753
|
-
const resource = folders[0].uri;
|
|
754
|
-
if ((!schemeFilter || resource.scheme === schemeFilter) && (!authorityFilter || resource.authority === authorityFilter)) {
|
|
755
|
-
return resource;
|
|
756
|
-
}
|
|
757
|
-
return undefined;
|
|
758
|
-
}
|
|
759
|
-
for (const input of this.getHistory()) {
|
|
760
|
-
if (isEditorInput(input)) {
|
|
761
|
-
continue;
|
|
762
|
-
}
|
|
763
|
-
if (schemeFilter && input.resource.scheme !== schemeFilter) {
|
|
764
|
-
continue;
|
|
765
|
-
}
|
|
766
|
-
if (authorityFilter && input.resource.authority !== authorityFilter) {
|
|
767
|
-
continue;
|
|
768
|
-
}
|
|
769
|
-
const resourceWorkspace = this.contextService.getWorkspaceFolder(input.resource);
|
|
770
|
-
if (resourceWorkspace) {
|
|
771
|
-
return resourceWorkspace.uri;
|
|
772
|
-
}
|
|
773
|
-
}
|
|
774
|
-
for (const folder of folders) {
|
|
775
|
-
const resource = folder.uri;
|
|
776
|
-
if ((!schemeFilter || resource.scheme === schemeFilter) && (!authorityFilter || resource.authority === authorityFilter)) {
|
|
777
|
-
return resource;
|
|
778
|
-
}
|
|
779
|
-
}
|
|
780
|
-
return undefined;
|
|
781
|
-
}
|
|
782
|
-
getLastActiveFile(filterByScheme, filterByAuthority) {
|
|
783
|
-
for (const input of this.getHistory()) {
|
|
784
|
-
let resource;
|
|
785
|
-
if (isEditorInput(input)) {
|
|
786
|
-
resource = EditorResourceAccessor.getOriginalUri(input, { filterByScheme });
|
|
787
|
-
}
|
|
788
|
-
else {
|
|
789
|
-
resource = input.resource;
|
|
790
|
-
}
|
|
791
|
-
if (resource && resource.scheme === filterByScheme && (!filterByAuthority || resource.authority === filterByAuthority)) {
|
|
792
|
-
return resource;
|
|
793
|
-
}
|
|
794
|
-
}
|
|
795
|
-
return undefined;
|
|
796
|
-
}
|
|
797
|
-
dispose() {
|
|
798
|
-
super.dispose();
|
|
799
|
-
for (const [, stack] of this.editorGroupScopedNavigationStacks) {
|
|
800
|
-
stack.disposable.dispose();
|
|
801
|
-
}
|
|
802
|
-
for (const [, editors] of this.editorScopedNavigationStacks) {
|
|
803
|
-
for (const [, stack] of editors) {
|
|
804
|
-
stack.disposable.dispose();
|
|
805
|
-
}
|
|
806
|
-
}
|
|
807
|
-
}
|
|
808
|
-
};
|
|
809
|
-
HistoryService = HistoryService_1 = ( __decorate([
|
|
810
|
-
( __param(0, IEditorService)),
|
|
811
|
-
( __param(1, IEditorGroupsService)),
|
|
812
|
-
( __param(2, IWorkspaceContextService)),
|
|
813
|
-
( __param(3, IStorageService)),
|
|
814
|
-
( __param(4, IConfigurationService)),
|
|
815
|
-
( __param(5, IFileService)),
|
|
816
|
-
( __param(6, IWorkspacesService)),
|
|
817
|
-
( __param(7, IInstantiationService)),
|
|
818
|
-
( __param(8, IWorkbenchLayoutService)),
|
|
819
|
-
( __param(9, IContextKeyService))
|
|
820
|
-
], HistoryService));
|
|
821
|
-
( registerSingleton(IHistoryService, HistoryService, 0 ));
|
|
822
|
-
class EditorSelectionState {
|
|
823
|
-
constructor(editorIdentifier, selection, reason) {
|
|
824
|
-
this.editorIdentifier = editorIdentifier;
|
|
825
|
-
this.selection = selection;
|
|
826
|
-
this.reason = reason;
|
|
827
|
-
}
|
|
828
|
-
justifiesNewNavigationEntry(other) {
|
|
829
|
-
if (this.editorIdentifier.groupId !== other.editorIdentifier.groupId) {
|
|
830
|
-
return true;
|
|
831
|
-
}
|
|
832
|
-
if (!this.editorIdentifier.editor.matches(other.editorIdentifier.editor)) {
|
|
833
|
-
return true;
|
|
834
|
-
}
|
|
835
|
-
if (!this.selection || !other.selection) {
|
|
836
|
-
return true;
|
|
837
|
-
}
|
|
838
|
-
const result = this.selection.compare(other.selection);
|
|
839
|
-
if (result === 2 && ((other.reason === 4 || other.reason === 5) )) {
|
|
840
|
-
return true;
|
|
841
|
-
}
|
|
842
|
-
return result === 3 ;
|
|
843
|
-
}
|
|
844
|
-
}
|
|
845
|
-
let EditorNavigationStacks = class EditorNavigationStacks extends Disposable {
|
|
846
|
-
constructor(scope, instantiationService) {
|
|
847
|
-
super();
|
|
848
|
-
this.scope = scope;
|
|
849
|
-
this.instantiationService = instantiationService;
|
|
850
|
-
this.selectionsStack = this._register(this.instantiationService.createInstance(EditorNavigationStack, 0 , this.scope));
|
|
851
|
-
this.editsStack = this._register(this.instantiationService.createInstance(EditorNavigationStack, 1 , this.scope));
|
|
852
|
-
this.navigationsStack = this._register(this.instantiationService.createInstance(EditorNavigationStack, 2 , this.scope));
|
|
853
|
-
this.stacks = [
|
|
854
|
-
this.selectionsStack,
|
|
855
|
-
this.editsStack,
|
|
856
|
-
this.navigationsStack
|
|
857
|
-
];
|
|
858
|
-
this.onDidChange = Event.any(this.selectionsStack.onDidChange, this.editsStack.onDidChange, this.navigationsStack.onDidChange);
|
|
859
|
-
}
|
|
860
|
-
canGoForward(filter) {
|
|
861
|
-
return this.getStack(filter).canGoForward();
|
|
862
|
-
}
|
|
863
|
-
goForward(filter) {
|
|
864
|
-
return this.getStack(filter).goForward();
|
|
865
|
-
}
|
|
866
|
-
canGoBack(filter) {
|
|
867
|
-
return this.getStack(filter).canGoBack();
|
|
868
|
-
}
|
|
869
|
-
goBack(filter) {
|
|
870
|
-
return this.getStack(filter).goBack();
|
|
871
|
-
}
|
|
872
|
-
goPrevious(filter) {
|
|
873
|
-
return this.getStack(filter).goPrevious();
|
|
874
|
-
}
|
|
875
|
-
canGoLast(filter) {
|
|
876
|
-
return this.getStack(filter).canGoLast();
|
|
877
|
-
}
|
|
878
|
-
goLast(filter) {
|
|
879
|
-
return this.getStack(filter).goLast();
|
|
880
|
-
}
|
|
881
|
-
getStack(filter = 0 ) {
|
|
882
|
-
switch (filter) {
|
|
883
|
-
case 0 : return this.selectionsStack;
|
|
884
|
-
case 1 : return this.editsStack;
|
|
885
|
-
case 2 : return this.navigationsStack;
|
|
886
|
-
}
|
|
887
|
-
}
|
|
888
|
-
handleActiveEditorChange(editorPane) {
|
|
889
|
-
this.selectionsStack.notifyNavigation(editorPane);
|
|
890
|
-
}
|
|
891
|
-
handleActiveEditorSelectionChange(editorPane, event) {
|
|
892
|
-
const previous = this.selectionsStack.current;
|
|
893
|
-
this.selectionsStack.notifyNavigation(editorPane, event);
|
|
894
|
-
if (event.reason === 3 ) {
|
|
895
|
-
this.editsStack.notifyNavigation(editorPane, event);
|
|
896
|
-
}
|
|
897
|
-
else if (((event.reason === 4 || event.reason === 5) ) &&
|
|
898
|
-
!this.selectionsStack.isNavigating()) {
|
|
899
|
-
if (event.reason === 5 && !this.navigationsStack.isNavigating()) {
|
|
900
|
-
if (previous) {
|
|
901
|
-
this.navigationsStack.addOrReplace(previous.groupId, previous.editor, previous.selection);
|
|
902
|
-
}
|
|
903
|
-
}
|
|
904
|
-
this.navigationsStack.notifyNavigation(editorPane, event);
|
|
905
|
-
}
|
|
906
|
-
}
|
|
907
|
-
clear() {
|
|
908
|
-
for (const stack of this.stacks) {
|
|
909
|
-
stack.clear();
|
|
910
|
-
}
|
|
911
|
-
}
|
|
912
|
-
remove(arg1) {
|
|
913
|
-
for (const stack of this.stacks) {
|
|
914
|
-
stack.remove(arg1);
|
|
915
|
-
}
|
|
916
|
-
}
|
|
917
|
-
move(event) {
|
|
918
|
-
for (const stack of this.stacks) {
|
|
919
|
-
stack.move(event);
|
|
920
|
-
}
|
|
921
|
-
}
|
|
922
|
-
};
|
|
923
|
-
EditorNavigationStacks = ( __decorate([
|
|
924
|
-
( __param(1, IInstantiationService))
|
|
925
|
-
], EditorNavigationStacks));
|
|
926
|
-
class NoOpEditorNavigationStacks {
|
|
927
|
-
constructor() {
|
|
928
|
-
this.onDidChange = Event.None;
|
|
929
|
-
}
|
|
930
|
-
canGoForward() { return false; }
|
|
931
|
-
async goForward() { }
|
|
932
|
-
canGoBack() { return false; }
|
|
933
|
-
async goBack() { }
|
|
934
|
-
async goPrevious() { }
|
|
935
|
-
canGoLast() { return false; }
|
|
936
|
-
async goLast() { }
|
|
937
|
-
handleActiveEditorChange() { }
|
|
938
|
-
handleActiveEditorSelectionChange() { }
|
|
939
|
-
clear() { }
|
|
940
|
-
remove() { }
|
|
941
|
-
move() { }
|
|
942
|
-
dispose() { }
|
|
943
|
-
}
|
|
944
|
-
let EditorNavigationStack = class EditorNavigationStack extends Disposable {
|
|
945
|
-
static { EditorNavigationStack_1 = this; }
|
|
946
|
-
static { this.MAX_STACK_SIZE = 50; }
|
|
947
|
-
get current() {
|
|
948
|
-
return this.stack[this.index];
|
|
949
|
-
}
|
|
950
|
-
set current(entry) {
|
|
951
|
-
if (entry) {
|
|
952
|
-
this.stack[this.index] = entry;
|
|
953
|
-
}
|
|
954
|
-
}
|
|
955
|
-
constructor(filter, scope, instantiationService, editorService, editorGroupService, logService) {
|
|
956
|
-
super();
|
|
957
|
-
this.filter = filter;
|
|
958
|
-
this.scope = scope;
|
|
959
|
-
this.instantiationService = instantiationService;
|
|
960
|
-
this.editorService = editorService;
|
|
961
|
-
this.editorGroupService = editorGroupService;
|
|
962
|
-
this.logService = logService;
|
|
963
|
-
this._onDidChange = this._register(( new Emitter()));
|
|
964
|
-
this.onDidChange = this._onDidChange.event;
|
|
965
|
-
this.mapEditorToDisposable = ( new Map());
|
|
966
|
-
this.mapGroupToDisposable = ( new Map());
|
|
967
|
-
this.editorHelper = this.instantiationService.createInstance(EditorHelper);
|
|
968
|
-
this.stack = [];
|
|
969
|
-
this.index = -1;
|
|
970
|
-
this.previousIndex = -1;
|
|
971
|
-
this.navigating = false;
|
|
972
|
-
this.currentSelectionState = undefined;
|
|
973
|
-
this.registerListeners();
|
|
974
|
-
}
|
|
975
|
-
registerListeners() {
|
|
976
|
-
this._register(this.onDidChange(() => this.traceStack()));
|
|
977
|
-
this._register(this.logService.onDidChangeLogLevel(() => this.traceStack()));
|
|
978
|
-
}
|
|
979
|
-
traceStack() {
|
|
980
|
-
if (this.logService.getLevel() !== LogLevel.Trace) {
|
|
981
|
-
return;
|
|
982
|
-
}
|
|
983
|
-
const entryLabels = [];
|
|
984
|
-
for (const entry of this.stack) {
|
|
985
|
-
if (typeof entry.selection?.log === 'function') {
|
|
986
|
-
entryLabels.push(`- group: ${entry.groupId}, editor: ${entry.editor.resource?.toString()}, selection: ${entry.selection.log()}`);
|
|
987
|
-
}
|
|
988
|
-
else {
|
|
989
|
-
entryLabels.push(`- group: ${entry.groupId}, editor: ${entry.editor.resource?.toString()}, selection: <none>`);
|
|
990
|
-
}
|
|
991
|
-
}
|
|
992
|
-
if (entryLabels.length === 0) {
|
|
993
|
-
this.trace(`index: ${this.index}, navigating: ${this.isNavigating()}: <empty>`);
|
|
994
|
-
}
|
|
995
|
-
else {
|
|
996
|
-
this.trace(`index: ${this.index}, navigating: ${this.isNavigating()}
|
|
997
|
-
${entryLabels.join('\n')}
|
|
998
|
-
`);
|
|
999
|
-
}
|
|
1000
|
-
}
|
|
1001
|
-
trace(msg, editor = null, event) {
|
|
1002
|
-
if (this.logService.getLevel() !== LogLevel.Trace) {
|
|
1003
|
-
return;
|
|
1004
|
-
}
|
|
1005
|
-
let filterLabel;
|
|
1006
|
-
switch (this.filter) {
|
|
1007
|
-
case 0 :
|
|
1008
|
-
filterLabel = 'global';
|
|
1009
|
-
break;
|
|
1010
|
-
case 1 :
|
|
1011
|
-
filterLabel = 'edits';
|
|
1012
|
-
break;
|
|
1013
|
-
case 2 :
|
|
1014
|
-
filterLabel = 'navigation';
|
|
1015
|
-
break;
|
|
1016
|
-
}
|
|
1017
|
-
let scopeLabel;
|
|
1018
|
-
switch (this.scope) {
|
|
1019
|
-
case 0 :
|
|
1020
|
-
scopeLabel = 'default';
|
|
1021
|
-
break;
|
|
1022
|
-
case 1 :
|
|
1023
|
-
scopeLabel = 'editorGroup';
|
|
1024
|
-
break;
|
|
1025
|
-
case 2 :
|
|
1026
|
-
scopeLabel = 'editor';
|
|
1027
|
-
break;
|
|
1028
|
-
}
|
|
1029
|
-
if (editor !== null) {
|
|
1030
|
-
this.logService.trace(`[History stack ${filterLabel}-${scopeLabel}]: ${msg} (editor: ${editor?.resource?.toString()}, event: ${this.traceEvent(event)})`);
|
|
1031
|
-
}
|
|
1032
|
-
else {
|
|
1033
|
-
this.logService.trace(`[History stack ${filterLabel}-${scopeLabel}]: ${msg}`);
|
|
1034
|
-
}
|
|
1035
|
-
}
|
|
1036
|
-
traceEvent(event) {
|
|
1037
|
-
if (!event) {
|
|
1038
|
-
return '<none>';
|
|
1039
|
-
}
|
|
1040
|
-
switch (event.reason) {
|
|
1041
|
-
case 3 : return 'edit';
|
|
1042
|
-
case 4 : return 'navigation';
|
|
1043
|
-
case 5 : return 'jump';
|
|
1044
|
-
case 1 : return 'programmatic';
|
|
1045
|
-
case 2 : return 'user';
|
|
1046
|
-
}
|
|
1047
|
-
}
|
|
1048
|
-
registerGroupListeners(groupId) {
|
|
1049
|
-
if (!( this.mapGroupToDisposable.has(groupId))) {
|
|
1050
|
-
const group = this.editorGroupService.getGroup(groupId);
|
|
1051
|
-
if (group) {
|
|
1052
|
-
this.mapGroupToDisposable.set(groupId, group.onWillMoveEditor(e => this.onWillMoveEditor(e)));
|
|
1053
|
-
}
|
|
1054
|
-
}
|
|
1055
|
-
}
|
|
1056
|
-
onWillMoveEditor(e) {
|
|
1057
|
-
this.trace('onWillMoveEditor()', e.editor);
|
|
1058
|
-
if (this.scope === 1 ) {
|
|
1059
|
-
return;
|
|
1060
|
-
}
|
|
1061
|
-
for (const entry of this.stack) {
|
|
1062
|
-
if (entry.groupId !== e.groupId) {
|
|
1063
|
-
continue;
|
|
1064
|
-
}
|
|
1065
|
-
if (!this.editorHelper.matchesEditor(e.editor, entry.editor)) {
|
|
1066
|
-
continue;
|
|
1067
|
-
}
|
|
1068
|
-
entry.groupId = e.target;
|
|
1069
|
-
}
|
|
1070
|
-
}
|
|
1071
|
-
notifyNavigation(editorPane, event) {
|
|
1072
|
-
this.trace('notifyNavigation()', editorPane?.input, event);
|
|
1073
|
-
const isSelectionAwareEditorPane = isEditorPaneWithSelection(editorPane);
|
|
1074
|
-
const hasValidEditor = editorPane?.group && editorPane.input && !editorPane.input.isDisposed();
|
|
1075
|
-
if (this.navigating) {
|
|
1076
|
-
this.trace(`notifyNavigation() ignoring (navigating)`, editorPane?.input, event);
|
|
1077
|
-
if (isSelectionAwareEditorPane && hasValidEditor) {
|
|
1078
|
-
this.trace('notifyNavigation() updating current selection state', editorPane?.input, event);
|
|
1079
|
-
this.currentSelectionState = ( new EditorSelectionState(
|
|
1080
|
-
{ groupId: editorPane.group.id, editor: editorPane.input },
|
|
1081
|
-
editorPane.getSelection(),
|
|
1082
|
-
event?.reason
|
|
1083
|
-
));
|
|
1084
|
-
}
|
|
1085
|
-
else {
|
|
1086
|
-
this.trace('notifyNavigation() dropping current selection state', editorPane?.input, event);
|
|
1087
|
-
this.currentSelectionState = undefined;
|
|
1088
|
-
}
|
|
1089
|
-
}
|
|
1090
|
-
else {
|
|
1091
|
-
this.trace(`notifyNavigation() not ignoring`, editorPane?.input, event);
|
|
1092
|
-
if (isSelectionAwareEditorPane && hasValidEditor) {
|
|
1093
|
-
this.onSelectionAwareEditorNavigation(editorPane.group.id, editorPane.input, editorPane.getSelection(), event);
|
|
1094
|
-
}
|
|
1095
|
-
else {
|
|
1096
|
-
this.currentSelectionState = undefined;
|
|
1097
|
-
if (hasValidEditor) {
|
|
1098
|
-
this.onNonSelectionAwareEditorNavigation(editorPane.group.id, editorPane.input);
|
|
1099
|
-
}
|
|
1100
|
-
}
|
|
1101
|
-
}
|
|
1102
|
-
}
|
|
1103
|
-
onSelectionAwareEditorNavigation(groupId, editor, selection, event) {
|
|
1104
|
-
if (this.current?.groupId === groupId && !selection && this.editorHelper.matchesEditor(this.current.editor, editor)) {
|
|
1105
|
-
return;
|
|
1106
|
-
}
|
|
1107
|
-
this.trace('onSelectionAwareEditorNavigation()', editor, event);
|
|
1108
|
-
const stateCandidate = ( new EditorSelectionState({ groupId, editor }, selection, event?.reason));
|
|
1109
|
-
if (!this.currentSelectionState || this.currentSelectionState.justifiesNewNavigationEntry(stateCandidate)) {
|
|
1110
|
-
this.doAdd(groupId, editor, stateCandidate.selection);
|
|
1111
|
-
}
|
|
1112
|
-
else {
|
|
1113
|
-
this.doReplace(groupId, editor, stateCandidate.selection);
|
|
1114
|
-
}
|
|
1115
|
-
this.currentSelectionState = stateCandidate;
|
|
1116
|
-
}
|
|
1117
|
-
onNonSelectionAwareEditorNavigation(groupId, editor) {
|
|
1118
|
-
if (this.current?.groupId === groupId && this.editorHelper.matchesEditor(this.current.editor, editor)) {
|
|
1119
|
-
return;
|
|
1120
|
-
}
|
|
1121
|
-
this.trace('onNonSelectionAwareEditorNavigation()', editor);
|
|
1122
|
-
this.doAdd(groupId, editor);
|
|
1123
|
-
}
|
|
1124
|
-
doAdd(groupId, editor, selection) {
|
|
1125
|
-
if (!this.navigating) {
|
|
1126
|
-
this.addOrReplace(groupId, editor, selection);
|
|
1127
|
-
}
|
|
1128
|
-
}
|
|
1129
|
-
doReplace(groupId, editor, selection) {
|
|
1130
|
-
if (!this.navigating) {
|
|
1131
|
-
this.addOrReplace(groupId, editor, selection, true );
|
|
1132
|
-
}
|
|
1133
|
-
}
|
|
1134
|
-
addOrReplace(groupId, editorCandidate, selection, forceReplace) {
|
|
1135
|
-
this.registerGroupListeners(groupId);
|
|
1136
|
-
let replace = false;
|
|
1137
|
-
if (this.current) {
|
|
1138
|
-
if (forceReplace) {
|
|
1139
|
-
replace = true;
|
|
1140
|
-
}
|
|
1141
|
-
else if (this.shouldReplaceStackEntry(this.current, { groupId, editor: editorCandidate, selection })) {
|
|
1142
|
-
replace = true;
|
|
1143
|
-
}
|
|
1144
|
-
}
|
|
1145
|
-
const editor = this.editorHelper.preferResourceEditorInput(editorCandidate);
|
|
1146
|
-
if (!editor) {
|
|
1147
|
-
return;
|
|
1148
|
-
}
|
|
1149
|
-
if (replace) {
|
|
1150
|
-
this.trace('replace()', editor);
|
|
1151
|
-
}
|
|
1152
|
-
else {
|
|
1153
|
-
this.trace('add()', editor);
|
|
1154
|
-
}
|
|
1155
|
-
const newStackEntry = { groupId, editor, selection };
|
|
1156
|
-
const removedEntries = [];
|
|
1157
|
-
if (replace) {
|
|
1158
|
-
if (this.current) {
|
|
1159
|
-
removedEntries.push(this.current);
|
|
1160
|
-
}
|
|
1161
|
-
this.current = newStackEntry;
|
|
1162
|
-
}
|
|
1163
|
-
else {
|
|
1164
|
-
if (this.stack.length > this.index + 1) {
|
|
1165
|
-
for (let i = this.index + 1; i < this.stack.length; i++) {
|
|
1166
|
-
removedEntries.push(this.stack[i]);
|
|
1167
|
-
}
|
|
1168
|
-
this.stack = this.stack.slice(0, this.index + 1);
|
|
1169
|
-
}
|
|
1170
|
-
this.stack.splice(this.index + 1, 0, newStackEntry);
|
|
1171
|
-
if (this.stack.length > EditorNavigationStack_1.MAX_STACK_SIZE) {
|
|
1172
|
-
removedEntries.push(this.stack.shift());
|
|
1173
|
-
if (this.previousIndex >= 0) {
|
|
1174
|
-
this.previousIndex--;
|
|
1175
|
-
}
|
|
1176
|
-
}
|
|
1177
|
-
else {
|
|
1178
|
-
this.setIndex(this.index + 1, true );
|
|
1179
|
-
}
|
|
1180
|
-
}
|
|
1181
|
-
for (const removedEntry of removedEntries) {
|
|
1182
|
-
this.editorHelper.clearOnEditorDispose(removedEntry.editor, this.mapEditorToDisposable);
|
|
1183
|
-
}
|
|
1184
|
-
if (isEditorInput(editor)) {
|
|
1185
|
-
this.editorHelper.onEditorDispose(editor, () => this.remove(editor), this.mapEditorToDisposable);
|
|
1186
|
-
}
|
|
1187
|
-
this._onDidChange.fire();
|
|
1188
|
-
}
|
|
1189
|
-
shouldReplaceStackEntry(entry, candidate) {
|
|
1190
|
-
if (entry.groupId !== candidate.groupId) {
|
|
1191
|
-
return false;
|
|
1192
|
-
}
|
|
1193
|
-
if (!this.editorHelper.matchesEditor(entry.editor, candidate.editor)) {
|
|
1194
|
-
return false;
|
|
1195
|
-
}
|
|
1196
|
-
if (!entry.selection) {
|
|
1197
|
-
return true;
|
|
1198
|
-
}
|
|
1199
|
-
if (!candidate.selection) {
|
|
1200
|
-
return false;
|
|
1201
|
-
}
|
|
1202
|
-
return entry.selection.compare(candidate.selection) === 1 ;
|
|
1203
|
-
}
|
|
1204
|
-
move(event) {
|
|
1205
|
-
if (event.isOperation(2 )) {
|
|
1206
|
-
for (const entry of this.stack) {
|
|
1207
|
-
if (this.editorHelper.matchesEditor(event, entry.editor)) {
|
|
1208
|
-
entry.editor = { resource: event.target.resource };
|
|
1209
|
-
}
|
|
1210
|
-
}
|
|
1211
|
-
}
|
|
1212
|
-
}
|
|
1213
|
-
remove(arg1) {
|
|
1214
|
-
this.stack = this.stack.filter(entry => {
|
|
1215
|
-
const matches = typeof arg1 === 'number' ? entry.groupId === arg1 : this.editorHelper.matchesEditor(arg1, entry.editor);
|
|
1216
|
-
if (matches) {
|
|
1217
|
-
this.editorHelper.clearOnEditorDispose(entry.editor, this.mapEditorToDisposable);
|
|
1218
|
-
}
|
|
1219
|
-
return !matches;
|
|
1220
|
-
});
|
|
1221
|
-
this.flatten();
|
|
1222
|
-
this.index = this.stack.length - 1;
|
|
1223
|
-
this.previousIndex = -1;
|
|
1224
|
-
if (typeof arg1 === 'number') {
|
|
1225
|
-
this.mapGroupToDisposable.get(arg1)?.dispose();
|
|
1226
|
-
this.mapGroupToDisposable.delete(arg1);
|
|
1227
|
-
}
|
|
1228
|
-
this._onDidChange.fire();
|
|
1229
|
-
}
|
|
1230
|
-
flatten() {
|
|
1231
|
-
const flattenedStack = [];
|
|
1232
|
-
let previousEntry = undefined;
|
|
1233
|
-
for (const entry of this.stack) {
|
|
1234
|
-
if (previousEntry && this.shouldReplaceStackEntry(entry, previousEntry)) {
|
|
1235
|
-
continue;
|
|
1236
|
-
}
|
|
1237
|
-
previousEntry = entry;
|
|
1238
|
-
flattenedStack.push(entry);
|
|
1239
|
-
}
|
|
1240
|
-
this.stack = flattenedStack;
|
|
1241
|
-
}
|
|
1242
|
-
clear() {
|
|
1243
|
-
this.index = -1;
|
|
1244
|
-
this.previousIndex = -1;
|
|
1245
|
-
this.stack.splice(0);
|
|
1246
|
-
for (const [, disposable] of this.mapEditorToDisposable) {
|
|
1247
|
-
dispose(disposable);
|
|
1248
|
-
}
|
|
1249
|
-
this.mapEditorToDisposable.clear();
|
|
1250
|
-
for (const [, disposable] of this.mapGroupToDisposable) {
|
|
1251
|
-
dispose(disposable);
|
|
1252
|
-
}
|
|
1253
|
-
this.mapGroupToDisposable.clear();
|
|
1254
|
-
}
|
|
1255
|
-
dispose() {
|
|
1256
|
-
super.dispose();
|
|
1257
|
-
this.clear();
|
|
1258
|
-
}
|
|
1259
|
-
canGoForward() {
|
|
1260
|
-
return this.stack.length > this.index + 1;
|
|
1261
|
-
}
|
|
1262
|
-
async goForward() {
|
|
1263
|
-
const navigated = await this.maybeGoCurrent();
|
|
1264
|
-
if (navigated) {
|
|
1265
|
-
return;
|
|
1266
|
-
}
|
|
1267
|
-
if (!this.canGoForward()) {
|
|
1268
|
-
return;
|
|
1269
|
-
}
|
|
1270
|
-
this.setIndex(this.index + 1);
|
|
1271
|
-
return this.navigate();
|
|
1272
|
-
}
|
|
1273
|
-
canGoBack() {
|
|
1274
|
-
return this.index > 0;
|
|
1275
|
-
}
|
|
1276
|
-
async goBack() {
|
|
1277
|
-
const navigated = await this.maybeGoCurrent();
|
|
1278
|
-
if (navigated) {
|
|
1279
|
-
return;
|
|
1280
|
-
}
|
|
1281
|
-
if (!this.canGoBack()) {
|
|
1282
|
-
return;
|
|
1283
|
-
}
|
|
1284
|
-
this.setIndex(this.index - 1);
|
|
1285
|
-
return this.navigate();
|
|
1286
|
-
}
|
|
1287
|
-
async goPrevious() {
|
|
1288
|
-
const navigated = await this.maybeGoCurrent();
|
|
1289
|
-
if (navigated) {
|
|
1290
|
-
return;
|
|
1291
|
-
}
|
|
1292
|
-
if (this.previousIndex === -1) {
|
|
1293
|
-
return this.goBack();
|
|
1294
|
-
}
|
|
1295
|
-
this.setIndex(this.previousIndex);
|
|
1296
|
-
return this.navigate();
|
|
1297
|
-
}
|
|
1298
|
-
canGoLast() {
|
|
1299
|
-
return this.stack.length > 0;
|
|
1300
|
-
}
|
|
1301
|
-
async goLast() {
|
|
1302
|
-
if (!this.canGoLast()) {
|
|
1303
|
-
return;
|
|
1304
|
-
}
|
|
1305
|
-
this.setIndex(this.stack.length - 1);
|
|
1306
|
-
return this.navigate();
|
|
1307
|
-
}
|
|
1308
|
-
async maybeGoCurrent() {
|
|
1309
|
-
if (this.filter === 0 ) {
|
|
1310
|
-
return false;
|
|
1311
|
-
}
|
|
1312
|
-
if (this.isCurrentSelectionActive()) {
|
|
1313
|
-
return false;
|
|
1314
|
-
}
|
|
1315
|
-
await this.navigate();
|
|
1316
|
-
return true;
|
|
1317
|
-
}
|
|
1318
|
-
isCurrentSelectionActive() {
|
|
1319
|
-
if (!this.current?.selection) {
|
|
1320
|
-
return false;
|
|
1321
|
-
}
|
|
1322
|
-
const pane = this.editorService.activeEditorPane;
|
|
1323
|
-
if (!isEditorPaneWithSelection(pane)) {
|
|
1324
|
-
return false;
|
|
1325
|
-
}
|
|
1326
|
-
if (pane.group?.id !== this.current.groupId) {
|
|
1327
|
-
return false;
|
|
1328
|
-
}
|
|
1329
|
-
if (!pane.input || !this.editorHelper.matchesEditor(pane.input, this.current.editor)) {
|
|
1330
|
-
return false;
|
|
1331
|
-
}
|
|
1332
|
-
const paneSelection = pane.getSelection();
|
|
1333
|
-
if (!paneSelection) {
|
|
1334
|
-
return false;
|
|
1335
|
-
}
|
|
1336
|
-
return paneSelection.compare(this.current.selection) === 1 ;
|
|
1337
|
-
}
|
|
1338
|
-
setIndex(newIndex, skipEvent) {
|
|
1339
|
-
this.previousIndex = this.index;
|
|
1340
|
-
this.index = newIndex;
|
|
1341
|
-
if (!skipEvent) {
|
|
1342
|
-
this._onDidChange.fire();
|
|
1343
|
-
}
|
|
1344
|
-
}
|
|
1345
|
-
async navigate() {
|
|
1346
|
-
this.navigating = true;
|
|
1347
|
-
try {
|
|
1348
|
-
if (this.current) {
|
|
1349
|
-
await this.doNavigate(this.current);
|
|
1350
|
-
}
|
|
1351
|
-
}
|
|
1352
|
-
finally {
|
|
1353
|
-
this.navigating = false;
|
|
1354
|
-
}
|
|
1355
|
-
}
|
|
1356
|
-
doNavigate(location) {
|
|
1357
|
-
let options = Object.create(null);
|
|
1358
|
-
if (location.selection) {
|
|
1359
|
-
options = location.selection.restore(options);
|
|
1360
|
-
}
|
|
1361
|
-
if (isEditorInput(location.editor)) {
|
|
1362
|
-
return this.editorService.openEditor(location.editor, options, location.groupId);
|
|
1363
|
-
}
|
|
1364
|
-
return this.editorService.openEditor({
|
|
1365
|
-
...location.editor,
|
|
1366
|
-
options: {
|
|
1367
|
-
...location.editor.options,
|
|
1368
|
-
...options
|
|
1369
|
-
}
|
|
1370
|
-
}, location.groupId);
|
|
1371
|
-
}
|
|
1372
|
-
isNavigating() {
|
|
1373
|
-
return this.navigating;
|
|
1374
|
-
}
|
|
1375
|
-
};
|
|
1376
|
-
EditorNavigationStack = EditorNavigationStack_1 = ( __decorate([
|
|
1377
|
-
( __param(2, IInstantiationService)),
|
|
1378
|
-
( __param(3, IEditorService)),
|
|
1379
|
-
( __param(4, IEditorGroupsService)),
|
|
1380
|
-
( __param(5, ILogService))
|
|
1381
|
-
], EditorNavigationStack));
|
|
1382
|
-
let EditorHelper = class EditorHelper {
|
|
1383
|
-
constructor(uriIdentityService, lifecycleService, fileService, pathService) {
|
|
1384
|
-
this.uriIdentityService = uriIdentityService;
|
|
1385
|
-
this.lifecycleService = lifecycleService;
|
|
1386
|
-
this.fileService = fileService;
|
|
1387
|
-
this.pathService = pathService;
|
|
1388
|
-
}
|
|
1389
|
-
preferResourceEditorInput(editor) {
|
|
1390
|
-
const resource = EditorResourceAccessor.getOriginalUri(editor);
|
|
1391
|
-
const hasValidResourceEditorInputScheme = resource?.scheme === Schemas.file ||
|
|
1392
|
-
resource?.scheme === Schemas.vscodeRemote ||
|
|
1393
|
-
resource?.scheme === Schemas.vscodeUserData ||
|
|
1394
|
-
resource?.scheme === this.pathService.defaultUriScheme;
|
|
1395
|
-
if (hasValidResourceEditorInputScheme) {
|
|
1396
|
-
if (isEditorInput(editor)) {
|
|
1397
|
-
const untypedInput = editor.toUntyped();
|
|
1398
|
-
if (isResourceEditorInput(untypedInput)) {
|
|
1399
|
-
return untypedInput;
|
|
1400
|
-
}
|
|
1401
|
-
}
|
|
1402
|
-
return editor;
|
|
1403
|
-
}
|
|
1404
|
-
else {
|
|
1405
|
-
return isEditorInput(editor) ? editor : undefined;
|
|
1406
|
-
}
|
|
1407
|
-
}
|
|
1408
|
-
matchesEditor(arg1, inputB) {
|
|
1409
|
-
if (arg1 instanceof FileChangesEvent || arg1 instanceof FileOperationEvent) {
|
|
1410
|
-
if (isEditorInput(inputB)) {
|
|
1411
|
-
return false;
|
|
1412
|
-
}
|
|
1413
|
-
if (arg1 instanceof FileChangesEvent) {
|
|
1414
|
-
return arg1.contains(inputB.resource, 2 );
|
|
1415
|
-
}
|
|
1416
|
-
return this.matchesFile(inputB.resource, arg1);
|
|
1417
|
-
}
|
|
1418
|
-
if (isEditorInput(arg1)) {
|
|
1419
|
-
if (isEditorInput(inputB)) {
|
|
1420
|
-
return arg1.matches(inputB);
|
|
1421
|
-
}
|
|
1422
|
-
return this.matchesFile(inputB.resource, arg1);
|
|
1423
|
-
}
|
|
1424
|
-
if (isEditorInput(inputB)) {
|
|
1425
|
-
return this.matchesFile(arg1.resource, inputB);
|
|
1426
|
-
}
|
|
1427
|
-
return arg1 && inputB && this.uriIdentityService.extUri.isEqual(arg1.resource, inputB.resource);
|
|
1428
|
-
}
|
|
1429
|
-
matchesFile(resource, arg2) {
|
|
1430
|
-
if (arg2 instanceof FileChangesEvent) {
|
|
1431
|
-
return arg2.contains(resource, 2 );
|
|
1432
|
-
}
|
|
1433
|
-
if (arg2 instanceof FileOperationEvent) {
|
|
1434
|
-
return this.uriIdentityService.extUri.isEqualOrParent(resource, arg2.resource);
|
|
1435
|
-
}
|
|
1436
|
-
if (isEditorInput(arg2)) {
|
|
1437
|
-
const inputResource = arg2.resource;
|
|
1438
|
-
if (!inputResource) {
|
|
1439
|
-
return false;
|
|
1440
|
-
}
|
|
1441
|
-
if (this.lifecycleService.phase >= 3 && !this.fileService.hasProvider(inputResource)) {
|
|
1442
|
-
return false;
|
|
1443
|
-
}
|
|
1444
|
-
return this.uriIdentityService.extUri.isEqual(inputResource, resource);
|
|
1445
|
-
}
|
|
1446
|
-
return this.uriIdentityService.extUri.isEqual(arg2?.resource, resource);
|
|
1447
|
-
}
|
|
1448
|
-
matchesEditorIdentifier(identifier, editorPane) {
|
|
1449
|
-
if (!editorPane?.group) {
|
|
1450
|
-
return false;
|
|
1451
|
-
}
|
|
1452
|
-
if (identifier.groupId !== editorPane.group.id) {
|
|
1453
|
-
return false;
|
|
1454
|
-
}
|
|
1455
|
-
return editorPane.input ? identifier.editor.matches(editorPane.input) : false;
|
|
1456
|
-
}
|
|
1457
|
-
onEditorDispose(editor, listener, mapEditorToDispose) {
|
|
1458
|
-
const toDispose = Event.once(editor.onWillDispose)(() => listener());
|
|
1459
|
-
let disposables = mapEditorToDispose.get(editor);
|
|
1460
|
-
if (!disposables) {
|
|
1461
|
-
disposables = ( new DisposableStore());
|
|
1462
|
-
mapEditorToDispose.set(editor, disposables);
|
|
1463
|
-
}
|
|
1464
|
-
disposables.add(toDispose);
|
|
1465
|
-
}
|
|
1466
|
-
clearOnEditorDispose(editor, mapEditorToDispose) {
|
|
1467
|
-
if (!isEditorInput(editor)) {
|
|
1468
|
-
return;
|
|
1469
|
-
}
|
|
1470
|
-
const disposables = mapEditorToDispose.get(editor);
|
|
1471
|
-
if (disposables) {
|
|
1472
|
-
dispose(disposables);
|
|
1473
|
-
mapEditorToDispose.delete(editor);
|
|
1474
|
-
}
|
|
1475
|
-
}
|
|
1476
|
-
};
|
|
1477
|
-
EditorHelper = ( __decorate([
|
|
1478
|
-
( __param(0, IUriIdentityService)),
|
|
1479
|
-
( __param(1, ILifecycleService)),
|
|
1480
|
-
( __param(2, IFileService)),
|
|
1481
|
-
( __param(3, IPathService))
|
|
1482
|
-
], EditorHelper));
|
|
1483
|
-
|
|
1484
|
-
export { EditorNavigationStack, HistoryService };
|