@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,13 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
3
4
|
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 { GroupModelChangeKind, isEditorPaneWithSelection, isEditorInput, EditorResourceAccessor, EditorsOrder, EditorCloseContext, SideBySideEditor, isSideBySideEditorInput, isResourceEditorInput, EditorPaneSelectionCompareResult, EditorPaneSelectionChangeReason } from 'vscode/vscode/vs/workbench/common/editor';
|
|
5
6
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
7
|
+
import { GoScope, GoFilter } from 'vscode/vscode/vs/workbench/services/history/common/history';
|
|
6
8
|
import { IHistoryService } from 'vscode/vscode/vs/workbench/services/history/common/history.service';
|
|
7
|
-
import { FILES_EXCLUDE_CONFIG, FileChangesEvent, FileOperationEvent } from 'vscode/vscode/vs/platform/files/common/files';
|
|
9
|
+
import { FILES_EXCLUDE_CONFIG, FileChangesEvent, FileOperation, FileOperationEvent, FileChangeType } from 'vscode/vscode/vs/platform/files/common/files';
|
|
8
10
|
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
|
|
9
11
|
import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace.service';
|
|
10
12
|
import { Disposable, DisposableStore, dispose } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
13
|
+
import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
11
14
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
12
15
|
import { Emitter, Event } from 'vscode/vscode/vs/base/common/event';
|
|
13
16
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
@@ -18,14 +21,15 @@ import { IWorkbenchLayoutService } from 'vscode/vscode/vs/workbench/services/lay
|
|
|
18
21
|
import { RawContextKey } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
19
22
|
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
20
23
|
import { coalesce, remove } from 'vscode/vscode/vs/base/common/arrays';
|
|
21
|
-
import { registerSingleton } from 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
24
|
+
import { registerSingleton, InstantiationType } from 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
22
25
|
import { WindowIdleValue, addDisposableListener, EventType, EventHelper } from 'vscode/vscode/vs/base/browser/dom';
|
|
23
26
|
import { IWorkspacesService } from 'vscode/vscode/vs/platform/workspaces/common/workspaces.service';
|
|
24
27
|
import { Schemas } from 'vscode/vscode/vs/base/common/network';
|
|
25
28
|
import { onUnexpectedError } from 'vscode/vscode/vs/base/common/errors';
|
|
26
|
-
import { ResourceGlobMatcher } from 'vscode/vscode/vs/workbench/common/resources';
|
|
29
|
+
import { ResourceGlobMatcher } from '@codingame/monaco-vscode-a4683c2b-a0d2-5112-96ba-eedc605346d2-common/vscode/vs/workbench/common/resources';
|
|
27
30
|
import { IPathService } from 'vscode/vscode/vs/workbench/services/path/common/pathService.service';
|
|
28
31
|
import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
|
|
32
|
+
import { LifecyclePhase } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
29
33
|
import { ILifecycleService } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle.service';
|
|
30
34
|
import { LogLevel } from 'vscode/vscode/vs/platform/log/common/log';
|
|
31
35
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
@@ -49,42 +53,42 @@ let HistoryService = class HistoryService extends Disposable {
|
|
|
49
53
|
this.layoutService = layoutService;
|
|
50
54
|
this.contextKeyService = contextKeyService;
|
|
51
55
|
this.logService = logService;
|
|
52
|
-
this.activeEditorListeners = this._register((
|
|
56
|
+
this.activeEditorListeners = this._register(( new DisposableStore()));
|
|
53
57
|
this.lastActiveEditor = undefined;
|
|
54
58
|
this.editorHelper = this.instantiationService.createInstance(EditorHelper);
|
|
55
|
-
this.canNavigateBackContextKey = ((
|
|
56
|
-
this.canNavigateForwardContextKey = ((
|
|
57
|
-
this.canNavigateBackInNavigationsContextKey = ((
|
|
58
|
-
|
|
59
|
+
this.canNavigateBackContextKey = (( new RawContextKey('canNavigateBack', false, ( localize(11578, "Whether it is possible to navigate back in editor history"))))).bindTo(this.contextKeyService);
|
|
60
|
+
this.canNavigateForwardContextKey = (( new RawContextKey('canNavigateForward', false, ( localize(11579, "Whether it is possible to navigate forward in editor history"))))).bindTo(this.contextKeyService);
|
|
61
|
+
this.canNavigateBackInNavigationsContextKey = (( new RawContextKey('canNavigateBackInNavigationLocations', false, ( localize(
|
|
62
|
+
11580,
|
|
59
63
|
"Whether it is possible to navigate back in editor navigation locations history"
|
|
60
|
-
)))))
|
|
61
|
-
this.canNavigateForwardInNavigationsContextKey = ((
|
|
62
|
-
|
|
64
|
+
))))).bindTo(this.contextKeyService);
|
|
65
|
+
this.canNavigateForwardInNavigationsContextKey = (( new RawContextKey('canNavigateForwardInNavigationLocations', false, ( localize(
|
|
66
|
+
11581,
|
|
63
67
|
"Whether it is possible to navigate forward in editor navigation locations history"
|
|
64
|
-
)))))
|
|
65
|
-
this.canNavigateToLastNavigationLocationContextKey = ((
|
|
66
|
-
|
|
68
|
+
))))).bindTo(this.contextKeyService);
|
|
69
|
+
this.canNavigateToLastNavigationLocationContextKey = (( new RawContextKey('canNavigateToLastNavigationLocation', false, ( localize(
|
|
70
|
+
11582,
|
|
67
71
|
"Whether it is possible to navigate to the last editor navigation location"
|
|
68
|
-
)))))
|
|
69
|
-
this.canNavigateBackInEditsContextKey = ((
|
|
70
|
-
|
|
72
|
+
))))).bindTo(this.contextKeyService);
|
|
73
|
+
this.canNavigateBackInEditsContextKey = (( new RawContextKey('canNavigateBackInEditLocations', false, ( localize(
|
|
74
|
+
11583,
|
|
71
75
|
"Whether it is possible to navigate back in editor edit locations history"
|
|
72
|
-
)))))
|
|
73
|
-
this.canNavigateForwardInEditsContextKey = ((
|
|
74
|
-
|
|
76
|
+
))))).bindTo(this.contextKeyService);
|
|
77
|
+
this.canNavigateForwardInEditsContextKey = (( new RawContextKey('canNavigateForwardInEditLocations', false, ( localize(
|
|
78
|
+
11584,
|
|
75
79
|
"Whether it is possible to navigate forward in editor edit locations history"
|
|
76
|
-
)))))
|
|
77
|
-
this.canNavigateToLastEditLocationContextKey = ((
|
|
78
|
-
|
|
80
|
+
))))).bindTo(this.contextKeyService);
|
|
81
|
+
this.canNavigateToLastEditLocationContextKey = (( new RawContextKey('canNavigateToLastEditLocation', false, ( localize(
|
|
82
|
+
11585,
|
|
79
83
|
"Whether it is possible to navigate to the last editor edit location"
|
|
80
|
-
)))))
|
|
81
|
-
this.canReopenClosedEditorContextKey = ((
|
|
82
|
-
this._onDidChangeEditorNavigationStack = this._register((
|
|
84
|
+
))))).bindTo(this.contextKeyService);
|
|
85
|
+
this.canReopenClosedEditorContextKey = (( new RawContextKey('canReopenClosedEditor', false, ( localize(11586, "Whether it is possible to reopen the last closed editor"))))).bindTo(this.contextKeyService);
|
|
86
|
+
this._onDidChangeEditorNavigationStack = this._register(( new Emitter()));
|
|
83
87
|
this.onDidChangeEditorNavigationStack = this._onDidChangeEditorNavigationStack.event;
|
|
84
88
|
this.defaultScopedEditorNavigationStack = undefined;
|
|
85
|
-
this.editorGroupScopedNavigationStacks = (
|
|
86
|
-
this.editorScopedNavigationStacks = (
|
|
87
|
-
this.editorNavigationScope =
|
|
89
|
+
this.editorGroupScopedNavigationStacks = ( new Map());
|
|
90
|
+
this.editorScopedNavigationStacks = ( new Map());
|
|
91
|
+
this.editorNavigationScope = GoScope.DEFAULT;
|
|
88
92
|
this.recentlyUsedEditorsStack = undefined;
|
|
89
93
|
this.recentlyUsedEditorsStackIndex = 0;
|
|
90
94
|
this.recentlyUsedEditorsInGroupStack = undefined;
|
|
@@ -94,12 +98,12 @@ let HistoryService = class HistoryService extends Disposable {
|
|
|
94
98
|
this.recentlyClosedEditors = [];
|
|
95
99
|
this.ignoreEditorCloseEvent = false;
|
|
96
100
|
this.history = undefined;
|
|
97
|
-
this.editorHistoryListeners = (
|
|
98
|
-
this.resourceExcludeMatcher = this._register((
|
|
101
|
+
this.editorHistoryListeners = ( new Map());
|
|
102
|
+
this.resourceExcludeMatcher = this._register(( new WindowIdleValue(mainWindow, () => {
|
|
99
103
|
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)));
|
|
100
104
|
this._register(matcher.onExpressionChange(() => this.removeExcludedFromHistory()));
|
|
101
105
|
return matcher;
|
|
102
|
-
})))
|
|
106
|
+
})));
|
|
103
107
|
this.registerListeners();
|
|
104
108
|
if (this.editorService.activeEditorPane) {
|
|
105
109
|
this.onDidActiveEditorChange();
|
|
@@ -124,12 +128,12 @@ let HistoryService = class HistoryService extends Disposable {
|
|
|
124
128
|
this.handleEditorCloseEventInReopen(e);
|
|
125
129
|
}
|
|
126
130
|
registerMouseNavigationListener() {
|
|
127
|
-
const mouseBackForwardSupportListener = this._register((
|
|
131
|
+
const mouseBackForwardSupportListener = this._register(( new DisposableStore()));
|
|
128
132
|
const handleMouseBackForwardSupport = () => {
|
|
129
133
|
mouseBackForwardSupportListener.clear();
|
|
130
134
|
if (this.configurationService.getValue(HistoryService_1.MOUSE_NAVIGATION_SETTING)) {
|
|
131
135
|
this._register(Event.runAndSubscribe(this.layoutService.onDidAddContainer, ({ container, disposables }) => {
|
|
132
|
-
const eventDisposables = disposables.add((
|
|
136
|
+
const eventDisposables = disposables.add(( new DisposableStore()));
|
|
133
137
|
eventDisposables.add(addDisposableListener(container, EventType.MOUSE_DOWN, e => this.onMouseDownOrUp(e, true)));
|
|
134
138
|
eventDisposables.add(addDisposableListener(container, EventType.MOUSE_UP, e => this.onMouseDownOrUp(e, false)));
|
|
135
139
|
mouseBackForwardSupportListener.add(eventDisposables);
|
|
@@ -176,7 +180,7 @@ let HistoryService = class HistoryService extends Disposable {
|
|
|
176
180
|
else {
|
|
177
181
|
this.logService.trace(`[History]: ignoring transient editor change until becoming non-transient (editor: ${activeEditorPane.input?.resource?.toString()}})`);
|
|
178
182
|
const transientListener = activeEditorGroup.onDidModelChange(e => {
|
|
179
|
-
if (e.kind ===
|
|
183
|
+
if (e.kind === GroupModelChangeKind.EDITOR_TRANSIENT && e.editor === activeEditorPane.input && !activeEditorPane.group.isTransient(activeEditorPane.input)) {
|
|
180
184
|
transientListener.dispose();
|
|
181
185
|
this.handleActiveEditorChange(activeEditorGroup, activeEditorPane);
|
|
182
186
|
}
|
|
@@ -202,10 +206,10 @@ let HistoryService = class HistoryService extends Disposable {
|
|
|
202
206
|
}
|
|
203
207
|
}
|
|
204
208
|
else {
|
|
205
|
-
if (event.isOperation(
|
|
209
|
+
if (event.isOperation(FileOperation.DELETE)) {
|
|
206
210
|
this.remove(event);
|
|
207
211
|
}
|
|
208
|
-
else if (event.isOperation(
|
|
212
|
+
else if (event.isOperation(FileOperation.MOVE) && event.target.isFile) {
|
|
209
213
|
this.move(event);
|
|
210
214
|
}
|
|
211
215
|
}
|
|
@@ -249,14 +253,14 @@ let HistoryService = class HistoryService extends Disposable {
|
|
|
249
253
|
updateContextKeys() {
|
|
250
254
|
this.contextKeyService.bufferChangeEvents(() => {
|
|
251
255
|
const activeStack = this.getStack();
|
|
252
|
-
this.canNavigateBackContextKey.set(activeStack.canGoBack(
|
|
253
|
-
this.canNavigateForwardContextKey.set(activeStack.canGoForward(
|
|
254
|
-
this.canNavigateBackInNavigationsContextKey.set(activeStack.canGoBack(
|
|
255
|
-
this.canNavigateForwardInNavigationsContextKey.set(activeStack.canGoForward(
|
|
256
|
-
this.canNavigateToLastNavigationLocationContextKey.set(activeStack.canGoLast(
|
|
257
|
-
this.canNavigateBackInEditsContextKey.set(activeStack.canGoBack(
|
|
258
|
-
this.canNavigateForwardInEditsContextKey.set(activeStack.canGoForward(
|
|
259
|
-
this.canNavigateToLastEditLocationContextKey.set(activeStack.canGoLast(
|
|
256
|
+
this.canNavigateBackContextKey.set(activeStack.canGoBack(GoFilter.NONE));
|
|
257
|
+
this.canNavigateForwardContextKey.set(activeStack.canGoForward(GoFilter.NONE));
|
|
258
|
+
this.canNavigateBackInNavigationsContextKey.set(activeStack.canGoBack(GoFilter.NAVIGATION));
|
|
259
|
+
this.canNavigateForwardInNavigationsContextKey.set(activeStack.canGoForward(GoFilter.NAVIGATION));
|
|
260
|
+
this.canNavigateToLastNavigationLocationContextKey.set(activeStack.canGoLast(GoFilter.NAVIGATION));
|
|
261
|
+
this.canNavigateBackInEditsContextKey.set(activeStack.canGoBack(GoFilter.EDITS));
|
|
262
|
+
this.canNavigateForwardInEditsContextKey.set(activeStack.canGoForward(GoFilter.EDITS));
|
|
263
|
+
this.canNavigateToLastEditLocationContextKey.set(activeStack.canGoLast(GoFilter.EDITS));
|
|
260
264
|
this.canReopenClosedEditorContextKey.set(this.recentlyClosedEditors.length > 0);
|
|
261
265
|
});
|
|
262
266
|
}
|
|
@@ -265,13 +269,13 @@ let HistoryService = class HistoryService extends Disposable {
|
|
|
265
269
|
this.disposeEditorNavigationStacks();
|
|
266
270
|
const configuredScope = this.configurationService.getValue(HistoryService_1.NAVIGATION_SCOPE_SETTING);
|
|
267
271
|
if (configuredScope === 'editorGroup') {
|
|
268
|
-
this.editorNavigationScope =
|
|
272
|
+
this.editorNavigationScope = GoScope.EDITOR_GROUP;
|
|
269
273
|
}
|
|
270
274
|
else if (configuredScope === 'editor') {
|
|
271
|
-
this.editorNavigationScope =
|
|
275
|
+
this.editorNavigationScope = GoScope.EDITOR;
|
|
272
276
|
}
|
|
273
277
|
else {
|
|
274
|
-
this.editorNavigationScope =
|
|
278
|
+
this.editorNavigationScope = GoScope.DEFAULT;
|
|
275
279
|
}
|
|
276
280
|
};
|
|
277
281
|
this._register(this.configurationService.onDidChangeConfiguration(event => {
|
|
@@ -283,39 +287,37 @@ let HistoryService = class HistoryService extends Disposable {
|
|
|
283
287
|
}
|
|
284
288
|
getStack(group = this.editorGroupService.activeGroup, editor = group.activeEditor) {
|
|
285
289
|
switch (this.editorNavigationScope) {
|
|
286
|
-
case
|
|
290
|
+
case GoScope.EDITOR: {
|
|
287
291
|
if (!editor) {
|
|
288
|
-
return (
|
|
289
|
-
(new NoOpEditorNavigationStacks())
|
|
290
|
-
);
|
|
292
|
+
return ( new NoOpEditorNavigationStacks());
|
|
291
293
|
}
|
|
292
294
|
let stacksForGroup = this.editorScopedNavigationStacks.get(group.id);
|
|
293
295
|
if (!stacksForGroup) {
|
|
294
|
-
stacksForGroup = (
|
|
296
|
+
stacksForGroup = ( new Map());
|
|
295
297
|
this.editorScopedNavigationStacks.set(group.id, stacksForGroup);
|
|
296
298
|
}
|
|
297
299
|
let stack = stacksForGroup.get(editor)?.stack;
|
|
298
300
|
if (!stack) {
|
|
299
|
-
const disposable = (
|
|
300
|
-
stack = disposable.add(this.instantiationService.createInstance(EditorNavigationStacks,
|
|
301
|
+
const disposable = ( new DisposableStore());
|
|
302
|
+
stack = disposable.add(this.instantiationService.createInstance(EditorNavigationStacks, GoScope.EDITOR));
|
|
301
303
|
disposable.add(stack.onDidChange(() => this._onDidChangeEditorNavigationStack.fire()));
|
|
302
304
|
stacksForGroup.set(editor, { stack, disposable });
|
|
303
305
|
}
|
|
304
306
|
return stack;
|
|
305
307
|
}
|
|
306
|
-
case
|
|
308
|
+
case GoScope.EDITOR_GROUP: {
|
|
307
309
|
let stack = this.editorGroupScopedNavigationStacks.get(group.id)?.stack;
|
|
308
310
|
if (!stack) {
|
|
309
|
-
const disposable = (
|
|
310
|
-
stack = disposable.add(this.instantiationService.createInstance(EditorNavigationStacks,
|
|
311
|
+
const disposable = ( new DisposableStore());
|
|
312
|
+
stack = disposable.add(this.instantiationService.createInstance(EditorNavigationStacks, GoScope.EDITOR_GROUP));
|
|
311
313
|
disposable.add(stack.onDidChange(() => this._onDidChangeEditorNavigationStack.fire()));
|
|
312
314
|
this.editorGroupScopedNavigationStacks.set(group.id, { stack, disposable });
|
|
313
315
|
}
|
|
314
316
|
return stack;
|
|
315
317
|
}
|
|
316
|
-
case
|
|
318
|
+
case GoScope.DEFAULT: {
|
|
317
319
|
if (!this.defaultScopedEditorNavigationStack) {
|
|
318
|
-
this.defaultScopedEditorNavigationStack = this._register(this.instantiationService.createInstance(EditorNavigationStacks,
|
|
320
|
+
this.defaultScopedEditorNavigationStack = this._register(this.instantiationService.createInstance(EditorNavigationStacks, GoScope.DEFAULT));
|
|
319
321
|
this._register(this.defaultScopedEditorNavigationStack.onDidChange(() => this._onDidChangeEditorNavigationStack.fire()));
|
|
320
322
|
}
|
|
321
323
|
return this.defaultScopedEditorNavigationStack;
|
|
@@ -433,11 +435,11 @@ let HistoryService = class HistoryService extends Disposable {
|
|
|
433
435
|
let index;
|
|
434
436
|
const group = typeof groupId === 'number' ? this.editorGroupService.getGroup(groupId) : undefined;
|
|
435
437
|
if (!group) {
|
|
436
|
-
editors = this.recentlyUsedEditorsStack || this.editorService.getEditors(
|
|
438
|
+
editors = this.recentlyUsedEditorsStack || this.editorService.getEditors(EditorsOrder.MOST_RECENTLY_ACTIVE);
|
|
437
439
|
index = this.recentlyUsedEditorsStackIndex;
|
|
438
440
|
}
|
|
439
441
|
else {
|
|
440
|
-
editors = this.recentlyUsedEditorsInGroupStack || (
|
|
442
|
+
editors = this.recentlyUsedEditorsInGroupStack || ( group.getEditors(EditorsOrder.MOST_RECENTLY_ACTIVE).map(editor => ({ groupId: group.id, editor })));
|
|
441
443
|
index = this.recentlyUsedEditorsInGroupStackIndex;
|
|
442
444
|
}
|
|
443
445
|
let newIndex = indexModifier(index);
|
|
@@ -546,9 +548,9 @@ let HistoryService = class HistoryService extends Disposable {
|
|
|
546
548
|
if (recentlyClosedEditor.resource && this.editorHelper.matchesFile(recentlyClosedEditor.resource, arg1)) {
|
|
547
549
|
return false;
|
|
548
550
|
}
|
|
549
|
-
if ((
|
|
551
|
+
if (( recentlyClosedEditor.associatedResources.some(
|
|
550
552
|
associatedResource => this.editorHelper.matchesFile(associatedResource, arg1)
|
|
551
|
-
)))
|
|
553
|
+
))) {
|
|
552
554
|
return false;
|
|
553
555
|
}
|
|
554
556
|
return true;
|
|
@@ -624,7 +626,7 @@ let HistoryService = class HistoryService extends Disposable {
|
|
|
624
626
|
});
|
|
625
627
|
}
|
|
626
628
|
moveInHistory(event) {
|
|
627
|
-
if (event.isOperation(
|
|
629
|
+
if (event.isOperation(FileOperation.MOVE)) {
|
|
628
630
|
const removed = this.removeFromHistory(event);
|
|
629
631
|
if (removed) {
|
|
630
632
|
this.addToHistory({ resource: event.target.resource });
|
|
@@ -656,7 +658,7 @@ let HistoryService = class HistoryService extends Disposable {
|
|
|
656
658
|
replaced = true;
|
|
657
659
|
}
|
|
658
660
|
}
|
|
659
|
-
else if (!(
|
|
661
|
+
else if (!( replacements.some(replacement => this.editorHelper.matchesEditor(replacement, entry)))) {
|
|
660
662
|
newHistory.push(entry);
|
|
661
663
|
}
|
|
662
664
|
}
|
|
@@ -693,29 +695,33 @@ let HistoryService = class HistoryService extends Disposable {
|
|
|
693
695
|
loadHistory() {
|
|
694
696
|
this.history = [];
|
|
695
697
|
const storedEditorHistory = this.loadHistoryFromStorage();
|
|
696
|
-
const openedEditorsLru = [...this.editorService.getEditors(
|
|
697
|
-
const handledEditors = (
|
|
698
|
+
const openedEditorsLru = [...this.editorService.getEditors(EditorsOrder.MOST_RECENTLY_ACTIVE)].reverse();
|
|
699
|
+
const handledEditors = ( new Set());
|
|
698
700
|
for (const { editor } of openedEditorsLru) {
|
|
699
701
|
if (!this.includeInHistory(editor)) {
|
|
700
702
|
continue;
|
|
701
703
|
}
|
|
702
|
-
this.addToHistory(editor);
|
|
703
704
|
if (editor.resource) {
|
|
704
|
-
|
|
705
|
+
const historyEntryId = `${( editor.resource.toString())}/${editor.editorId}`;
|
|
706
|
+
if (( handledEditors.has(historyEntryId))) {
|
|
707
|
+
continue;
|
|
708
|
+
}
|
|
709
|
+
handledEditors.add(historyEntryId);
|
|
705
710
|
}
|
|
711
|
+
this.addToHistory(editor);
|
|
706
712
|
}
|
|
707
713
|
for (const editor of storedEditorHistory) {
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
))) &&
|
|
714
|
+
const historyEntryId = `${( editor.resource.toString())}/${editor.options?.override}`;
|
|
715
|
+
if (!( handledEditors.has(historyEntryId)) &&
|
|
711
716
|
this.includeInHistory(editor)) {
|
|
717
|
+
handledEditors.add(historyEntryId);
|
|
712
718
|
this.addToHistory(editor, false );
|
|
713
719
|
}
|
|
714
720
|
}
|
|
715
721
|
}
|
|
716
722
|
loadHistoryFromStorage() {
|
|
717
723
|
const entries = [];
|
|
718
|
-
const entriesRaw = this.storageService.get(HistoryService_1.HISTORY_STORAGE_KEY,
|
|
724
|
+
const entriesRaw = this.storageService.get(HistoryService_1.HISTORY_STORAGE_KEY, StorageScope.WORKSPACE);
|
|
719
725
|
if (entriesRaw) {
|
|
720
726
|
try {
|
|
721
727
|
const entriesParsed = JSON.parse(entriesRaw);
|
|
@@ -728,8 +734,8 @@ let HistoryService = class HistoryService extends Disposable {
|
|
|
728
734
|
...entryParsed.editor,
|
|
729
735
|
resource: typeof entryParsed.editor.resource === 'string' ?
|
|
730
736
|
(
|
|
731
|
-
|
|
732
|
-
(
|
|
737
|
+
URI.parse(entryParsed.editor.resource)) :
|
|
738
|
+
( URI.from(entryParsed.editor.resource))
|
|
733
739
|
});
|
|
734
740
|
}
|
|
735
741
|
catch (error) {
|
|
@@ -755,11 +761,11 @@ let HistoryService = class HistoryService extends Disposable {
|
|
|
755
761
|
entries.push({
|
|
756
762
|
editor: {
|
|
757
763
|
...editor,
|
|
758
|
-
resource: (
|
|
764
|
+
resource: ( editor.resource.toString())
|
|
759
765
|
}
|
|
760
766
|
});
|
|
761
767
|
}
|
|
762
|
-
this.storageService.store(HistoryService_1.HISTORY_STORAGE_KEY, JSON.stringify(entries),
|
|
768
|
+
this.storageService.store(HistoryService_1.HISTORY_STORAGE_KEY, JSON.stringify(entries), StorageScope.WORKSPACE, StorageTarget.MACHINE);
|
|
763
769
|
}
|
|
764
770
|
getLastActiveWorkspaceRoot(schemeFilter, authorityFilter) {
|
|
765
771
|
const folders = this.contextService.getWorkspace().folders;
|
|
@@ -826,20 +832,20 @@ let HistoryService = class HistoryService extends Disposable {
|
|
|
826
832
|
}
|
|
827
833
|
}
|
|
828
834
|
};
|
|
829
|
-
HistoryService = HistoryService_1 = (
|
|
830
|
-
(
|
|
831
|
-
(
|
|
832
|
-
(
|
|
833
|
-
(
|
|
834
|
-
(
|
|
835
|
-
(
|
|
836
|
-
(
|
|
837
|
-
(
|
|
838
|
-
(
|
|
839
|
-
(
|
|
840
|
-
(
|
|
841
|
-
], HistoryService))
|
|
842
|
-
(
|
|
835
|
+
HistoryService = HistoryService_1 = ( __decorate([
|
|
836
|
+
( __param(0, IEditorService)),
|
|
837
|
+
( __param(1, IEditorGroupsService)),
|
|
838
|
+
( __param(2, IWorkspaceContextService)),
|
|
839
|
+
( __param(3, IStorageService)),
|
|
840
|
+
( __param(4, IConfigurationService)),
|
|
841
|
+
( __param(5, IFileService)),
|
|
842
|
+
( __param(6, IWorkspacesService)),
|
|
843
|
+
( __param(7, IInstantiationService)),
|
|
844
|
+
( __param(8, IWorkbenchLayoutService)),
|
|
845
|
+
( __param(9, IContextKeyService)),
|
|
846
|
+
( __param(10, ILogService))
|
|
847
|
+
], HistoryService));
|
|
848
|
+
( registerSingleton(IHistoryService, HistoryService, InstantiationType.Eager));
|
|
843
849
|
class EditorSelectionState {
|
|
844
850
|
constructor(editorIdentifier, selection, reason) {
|
|
845
851
|
this.editorIdentifier = editorIdentifier;
|
|
@@ -857,10 +863,10 @@ class EditorSelectionState {
|
|
|
857
863
|
return true;
|
|
858
864
|
}
|
|
859
865
|
const result = this.selection.compare(other.selection);
|
|
860
|
-
if (result ===
|
|
866
|
+
if (result === EditorPaneSelectionCompareResult.SIMILAR && (other.reason === EditorPaneSelectionChangeReason.NAVIGATION || other.reason === EditorPaneSelectionChangeReason.JUMP)) {
|
|
861
867
|
return true;
|
|
862
868
|
}
|
|
863
|
-
return result ===
|
|
869
|
+
return result === EditorPaneSelectionCompareResult.DIFFERENT;
|
|
864
870
|
}
|
|
865
871
|
}
|
|
866
872
|
let EditorNavigationStacks = class EditorNavigationStacks extends Disposable {
|
|
@@ -868,9 +874,9 @@ let EditorNavigationStacks = class EditorNavigationStacks extends Disposable {
|
|
|
868
874
|
super();
|
|
869
875
|
this.scope = scope;
|
|
870
876
|
this.instantiationService = instantiationService;
|
|
871
|
-
this.selectionsStack = this._register(this.instantiationService.createInstance(EditorNavigationStack,
|
|
872
|
-
this.editsStack = this._register(this.instantiationService.createInstance(EditorNavigationStack,
|
|
873
|
-
this.navigationsStack = this._register(this.instantiationService.createInstance(EditorNavigationStack,
|
|
877
|
+
this.selectionsStack = this._register(this.instantiationService.createInstance(EditorNavigationStack, GoFilter.NONE, this.scope));
|
|
878
|
+
this.editsStack = this._register(this.instantiationService.createInstance(EditorNavigationStack, GoFilter.EDITS, this.scope));
|
|
879
|
+
this.navigationsStack = this._register(this.instantiationService.createInstance(EditorNavigationStack, GoFilter.NAVIGATION, this.scope));
|
|
874
880
|
this.stacks = [
|
|
875
881
|
this.selectionsStack,
|
|
876
882
|
this.editsStack,
|
|
@@ -899,11 +905,11 @@ let EditorNavigationStacks = class EditorNavigationStacks extends Disposable {
|
|
|
899
905
|
goLast(filter) {
|
|
900
906
|
return this.getStack(filter).goLast();
|
|
901
907
|
}
|
|
902
|
-
getStack(filter =
|
|
908
|
+
getStack(filter = GoFilter.NONE) {
|
|
903
909
|
switch (filter) {
|
|
904
|
-
case
|
|
905
|
-
case
|
|
906
|
-
case
|
|
910
|
+
case GoFilter.NONE: return this.selectionsStack;
|
|
911
|
+
case GoFilter.EDITS: return this.editsStack;
|
|
912
|
+
case GoFilter.NAVIGATION: return this.navigationsStack;
|
|
907
913
|
}
|
|
908
914
|
}
|
|
909
915
|
handleActiveEditorChange(editorPane) {
|
|
@@ -912,12 +918,12 @@ let EditorNavigationStacks = class EditorNavigationStacks extends Disposable {
|
|
|
912
918
|
handleActiveEditorSelectionChange(editorPane, event) {
|
|
913
919
|
const previous = this.selectionsStack.current;
|
|
914
920
|
this.selectionsStack.notifyNavigation(editorPane, event);
|
|
915
|
-
if (event.reason ===
|
|
921
|
+
if (event.reason === EditorPaneSelectionChangeReason.EDIT) {
|
|
916
922
|
this.editsStack.notifyNavigation(editorPane, event);
|
|
917
923
|
}
|
|
918
|
-
else if ((
|
|
924
|
+
else if ((event.reason === EditorPaneSelectionChangeReason.NAVIGATION || event.reason === EditorPaneSelectionChangeReason.JUMP) &&
|
|
919
925
|
!this.selectionsStack.isNavigating()) {
|
|
920
|
-
if (event.reason ===
|
|
926
|
+
if (event.reason === EditorPaneSelectionChangeReason.JUMP && !this.navigationsStack.isNavigating()) {
|
|
921
927
|
if (previous) {
|
|
922
928
|
this.navigationsStack.addOrReplace(previous.groupId, previous.editor, previous.selection);
|
|
923
929
|
}
|
|
@@ -941,9 +947,9 @@ let EditorNavigationStacks = class EditorNavigationStacks extends Disposable {
|
|
|
941
947
|
}
|
|
942
948
|
}
|
|
943
949
|
};
|
|
944
|
-
EditorNavigationStacks = (
|
|
945
|
-
(
|
|
946
|
-
], EditorNavigationStacks))
|
|
950
|
+
EditorNavigationStacks = ( __decorate([
|
|
951
|
+
( __param(1, IInstantiationService))
|
|
952
|
+
], EditorNavigationStacks));
|
|
947
953
|
class NoOpEditorNavigationStacks {
|
|
948
954
|
constructor() {
|
|
949
955
|
this.onDidChange = Event.None;
|
|
@@ -981,10 +987,10 @@ let EditorNavigationStack = class EditorNavigationStack extends Disposable {
|
|
|
981
987
|
this.editorService = editorService;
|
|
982
988
|
this.editorGroupService = editorGroupService;
|
|
983
989
|
this.logService = logService;
|
|
984
|
-
this._onDidChange = this._register((
|
|
990
|
+
this._onDidChange = this._register(( new Emitter()));
|
|
985
991
|
this.onDidChange = this._onDidChange.event;
|
|
986
|
-
this.mapEditorToDisposable = (
|
|
987
|
-
this.mapGroupToDisposable = (
|
|
992
|
+
this.mapEditorToDisposable = ( new Map());
|
|
993
|
+
this.mapGroupToDisposable = ( new Map());
|
|
988
994
|
this.editorHelper = this.instantiationService.createInstance(EditorHelper);
|
|
989
995
|
this.stack = [];
|
|
990
996
|
this.index = -1;
|
|
@@ -1025,25 +1031,25 @@ ${entryLabels.join('\n')}
|
|
|
1025
1031
|
}
|
|
1026
1032
|
let filterLabel;
|
|
1027
1033
|
switch (this.filter) {
|
|
1028
|
-
case
|
|
1034
|
+
case GoFilter.NONE:
|
|
1029
1035
|
filterLabel = 'global';
|
|
1030
1036
|
break;
|
|
1031
|
-
case
|
|
1037
|
+
case GoFilter.EDITS:
|
|
1032
1038
|
filterLabel = 'edits';
|
|
1033
1039
|
break;
|
|
1034
|
-
case
|
|
1040
|
+
case GoFilter.NAVIGATION:
|
|
1035
1041
|
filterLabel = 'navigation';
|
|
1036
1042
|
break;
|
|
1037
1043
|
}
|
|
1038
1044
|
let scopeLabel;
|
|
1039
1045
|
switch (this.scope) {
|
|
1040
|
-
case
|
|
1046
|
+
case GoScope.DEFAULT:
|
|
1041
1047
|
scopeLabel = 'default';
|
|
1042
1048
|
break;
|
|
1043
|
-
case
|
|
1049
|
+
case GoScope.EDITOR_GROUP:
|
|
1044
1050
|
scopeLabel = 'editorGroup';
|
|
1045
1051
|
break;
|
|
1046
|
-
case
|
|
1052
|
+
case GoScope.EDITOR:
|
|
1047
1053
|
scopeLabel = 'editor';
|
|
1048
1054
|
break;
|
|
1049
1055
|
}
|
|
@@ -1059,15 +1065,15 @@ ${entryLabels.join('\n')}
|
|
|
1059
1065
|
return '<none>';
|
|
1060
1066
|
}
|
|
1061
1067
|
switch (event.reason) {
|
|
1062
|
-
case
|
|
1063
|
-
case
|
|
1064
|
-
case
|
|
1065
|
-
case
|
|
1066
|
-
case
|
|
1068
|
+
case EditorPaneSelectionChangeReason.EDIT: return 'edit';
|
|
1069
|
+
case EditorPaneSelectionChangeReason.NAVIGATION: return 'navigation';
|
|
1070
|
+
case EditorPaneSelectionChangeReason.JUMP: return 'jump';
|
|
1071
|
+
case EditorPaneSelectionChangeReason.PROGRAMMATIC: return 'programmatic';
|
|
1072
|
+
case EditorPaneSelectionChangeReason.USER: return 'user';
|
|
1067
1073
|
}
|
|
1068
1074
|
}
|
|
1069
1075
|
registerGroupListeners(groupId) {
|
|
1070
|
-
if (!(
|
|
1076
|
+
if (!( this.mapGroupToDisposable.has(groupId))) {
|
|
1071
1077
|
const group = this.editorGroupService.getGroup(groupId);
|
|
1072
1078
|
if (group) {
|
|
1073
1079
|
this.mapGroupToDisposable.set(groupId, group.onWillMoveEditor(e => this.onWillMoveEditor(e)));
|
|
@@ -1076,7 +1082,7 @@ ${entryLabels.join('\n')}
|
|
|
1076
1082
|
}
|
|
1077
1083
|
onWillMoveEditor(e) {
|
|
1078
1084
|
this.trace('onWillMoveEditor()', e.editor);
|
|
1079
|
-
if (this.scope ===
|
|
1085
|
+
if (this.scope === GoScope.EDITOR_GROUP) {
|
|
1080
1086
|
return;
|
|
1081
1087
|
}
|
|
1082
1088
|
for (const entry of this.stack) {
|
|
@@ -1097,11 +1103,11 @@ ${entryLabels.join('\n')}
|
|
|
1097
1103
|
this.trace(`notifyNavigation() ignoring (navigating)`, editorPane?.input, event);
|
|
1098
1104
|
if (isSelectionAwareEditorPane && hasValidEditor) {
|
|
1099
1105
|
this.trace('notifyNavigation() updating current selection state', editorPane?.input, event);
|
|
1100
|
-
this.currentSelectionState = (
|
|
1106
|
+
this.currentSelectionState = ( new EditorSelectionState(
|
|
1101
1107
|
{ groupId: editorPane.group.id, editor: editorPane.input },
|
|
1102
1108
|
editorPane.getSelection(),
|
|
1103
1109
|
event?.reason
|
|
1104
|
-
))
|
|
1110
|
+
));
|
|
1105
1111
|
}
|
|
1106
1112
|
else {
|
|
1107
1113
|
this.trace('notifyNavigation() dropping current selection state', editorPane?.input, event);
|
|
@@ -1126,7 +1132,7 @@ ${entryLabels.join('\n')}
|
|
|
1126
1132
|
return;
|
|
1127
1133
|
}
|
|
1128
1134
|
this.trace('onSelectionAwareEditorNavigation()', editor, event);
|
|
1129
|
-
const stateCandidate = (
|
|
1135
|
+
const stateCandidate = ( new EditorSelectionState({ groupId, editor }, selection, event?.reason));
|
|
1130
1136
|
if (!this.currentSelectionState || this.currentSelectionState.justifiesNewNavigationEntry(stateCandidate)) {
|
|
1131
1137
|
this.doAdd(groupId, editor, stateCandidate.selection);
|
|
1132
1138
|
}
|
|
@@ -1220,10 +1226,10 @@ ${entryLabels.join('\n')}
|
|
|
1220
1226
|
if (!candidate.selection) {
|
|
1221
1227
|
return false;
|
|
1222
1228
|
}
|
|
1223
|
-
return entry.selection.compare(candidate.selection) ===
|
|
1229
|
+
return entry.selection.compare(candidate.selection) === EditorPaneSelectionCompareResult.IDENTICAL;
|
|
1224
1230
|
}
|
|
1225
1231
|
move(event) {
|
|
1226
|
-
if (event.isOperation(
|
|
1232
|
+
if (event.isOperation(FileOperation.MOVE)) {
|
|
1227
1233
|
for (const entry of this.stack) {
|
|
1228
1234
|
if (this.editorHelper.matchesEditor(event, entry.editor)) {
|
|
1229
1235
|
entry.editor = { resource: event.target.resource };
|
|
@@ -1331,7 +1337,7 @@ ${entryLabels.join('\n')}
|
|
|
1331
1337
|
return this.navigate();
|
|
1332
1338
|
}
|
|
1333
1339
|
async maybeGoCurrent() {
|
|
1334
|
-
if (this.filter ===
|
|
1340
|
+
if (this.filter === GoFilter.NONE) {
|
|
1335
1341
|
return false;
|
|
1336
1342
|
}
|
|
1337
1343
|
if (this.isCurrentSelectionActive()) {
|
|
@@ -1358,7 +1364,7 @@ ${entryLabels.join('\n')}
|
|
|
1358
1364
|
if (!paneSelection) {
|
|
1359
1365
|
return false;
|
|
1360
1366
|
}
|
|
1361
|
-
return paneSelection.compare(this.current.selection) ===
|
|
1367
|
+
return paneSelection.compare(this.current.selection) === EditorPaneSelectionCompareResult.IDENTICAL;
|
|
1362
1368
|
}
|
|
1363
1369
|
setIndex(newIndex, skipEvent) {
|
|
1364
1370
|
this.previousIndex = this.index;
|
|
@@ -1398,12 +1404,12 @@ ${entryLabels.join('\n')}
|
|
|
1398
1404
|
return this.navigating;
|
|
1399
1405
|
}
|
|
1400
1406
|
};
|
|
1401
|
-
EditorNavigationStack = EditorNavigationStack_1 = (
|
|
1402
|
-
(
|
|
1403
|
-
(
|
|
1404
|
-
(
|
|
1405
|
-
(
|
|
1406
|
-
], EditorNavigationStack))
|
|
1407
|
+
EditorNavigationStack = EditorNavigationStack_1 = ( __decorate([
|
|
1408
|
+
( __param(2, IInstantiationService)),
|
|
1409
|
+
( __param(3, IEditorService)),
|
|
1410
|
+
( __param(4, IEditorGroupsService)),
|
|
1411
|
+
( __param(5, ILogService))
|
|
1412
|
+
], EditorNavigationStack));
|
|
1407
1413
|
let EditorHelper = class EditorHelper {
|
|
1408
1414
|
constructor(uriIdentityService, lifecycleService, fileService, pathService) {
|
|
1409
1415
|
this.uriIdentityService = uriIdentityService;
|
|
@@ -1436,7 +1442,7 @@ let EditorHelper = class EditorHelper {
|
|
|
1436
1442
|
return false;
|
|
1437
1443
|
}
|
|
1438
1444
|
if (arg1 instanceof FileChangesEvent) {
|
|
1439
|
-
return arg1.contains(inputB.resource,
|
|
1445
|
+
return arg1.contains(inputB.resource, FileChangeType.DELETED);
|
|
1440
1446
|
}
|
|
1441
1447
|
return this.matchesFile(inputB.resource, arg1);
|
|
1442
1448
|
}
|
|
@@ -1453,7 +1459,7 @@ let EditorHelper = class EditorHelper {
|
|
|
1453
1459
|
}
|
|
1454
1460
|
matchesFile(resource, arg2) {
|
|
1455
1461
|
if (arg2 instanceof FileChangesEvent) {
|
|
1456
|
-
return arg2.contains(resource,
|
|
1462
|
+
return arg2.contains(resource, FileChangeType.DELETED);
|
|
1457
1463
|
}
|
|
1458
1464
|
if (arg2 instanceof FileOperationEvent) {
|
|
1459
1465
|
return this.uriIdentityService.extUri.isEqualOrParent(resource, arg2.resource);
|
|
@@ -1463,7 +1469,7 @@ let EditorHelper = class EditorHelper {
|
|
|
1463
1469
|
if (!inputResource) {
|
|
1464
1470
|
return false;
|
|
1465
1471
|
}
|
|
1466
|
-
if (this.lifecycleService.phase >=
|
|
1472
|
+
if (this.lifecycleService.phase >= LifecyclePhase.Restored && !this.fileService.hasProvider(inputResource)) {
|
|
1467
1473
|
return false;
|
|
1468
1474
|
}
|
|
1469
1475
|
return this.uriIdentityService.extUri.isEqual(inputResource, resource);
|
|
@@ -1483,7 +1489,7 @@ let EditorHelper = class EditorHelper {
|
|
|
1483
1489
|
const toDispose = Event.once(editor.onWillDispose)(() => listener());
|
|
1484
1490
|
let disposables = mapEditorToDispose.get(editor);
|
|
1485
1491
|
if (!disposables) {
|
|
1486
|
-
disposables = (
|
|
1492
|
+
disposables = ( new DisposableStore());
|
|
1487
1493
|
mapEditorToDispose.set(editor, disposables);
|
|
1488
1494
|
}
|
|
1489
1495
|
disposables.add(toDispose);
|
|
@@ -1499,11 +1505,11 @@ let EditorHelper = class EditorHelper {
|
|
|
1499
1505
|
}
|
|
1500
1506
|
}
|
|
1501
1507
|
};
|
|
1502
|
-
EditorHelper = (
|
|
1503
|
-
(
|
|
1504
|
-
(
|
|
1505
|
-
(
|
|
1506
|
-
(
|
|
1507
|
-
], EditorHelper))
|
|
1508
|
+
EditorHelper = ( __decorate([
|
|
1509
|
+
( __param(0, IUriIdentityService)),
|
|
1510
|
+
( __param(1, ILifecycleService)),
|
|
1511
|
+
( __param(2, IFileService)),
|
|
1512
|
+
( __param(3, IPathService))
|
|
1513
|
+
], EditorHelper));
|
|
1508
1514
|
|
|
1509
1515
|
export { EditorNavigationStack, HistoryService };
|