@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.
Files changed (142) hide show
  1. package/index.d.ts +3 -1
  2. package/index.js +110 -1
  3. package/package.json +64 -10
  4. package/service-override/tools/editorAssets.d.ts +1 -0
  5. package/service-override/tools/editorAssets.js +5 -0
  6. package/vscode/src/vs/platform/actions/browser/actionViewItemService.d.ts +21 -0
  7. package/vscode/src/vs/platform/actions/browser/actionViewItemService.js +2 -0
  8. package/vscode/src/vs/platform/webview/common/mimeTypes.d.ts +2 -0
  9. package/vscode/src/vs/platform/webview/common/mimeTypes.js +1 -0
  10. package/vscode/src/vs/platform/webview/common/webviewPortMapping.d.ts +18 -0
  11. package/vscode/src/vs/platform/webview/common/webviewPortMapping.js +1 -0
  12. package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.d.ts +7 -0
  13. package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +116 -115
  14. package/vscode/src/vs/workbench/browser/actions/listCommands.d.ts +1 -0
  15. package/vscode/src/vs/workbench/browser/actions/listCommands.js +120 -125
  16. package/vscode/src/vs/workbench/browser/actions/navigationActions.d.ts +1 -0
  17. package/vscode/src/vs/workbench/browser/actions/navigationActions.js +81 -74
  18. package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.d.ts +1 -0
  19. package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +216 -250
  20. package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.d.ts +21 -0
  21. package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +26 -25
  22. package/vscode/src/vs/workbench/browser/parts/paneCompositePartService.d.ts +32 -0
  23. package/vscode/src/vs/workbench/browser/parts/paneCompositePartService.js +10 -8
  24. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.d.ts +1 -0
  25. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +58 -64
  26. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.d.ts +50 -0
  27. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +48 -38
  28. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.d.ts +54 -0
  29. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +19 -40
  30. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/media/callHierarchy.css.js +1 -1
  31. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditor.contribution.d.ts +1 -0
  32. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditor.contribution.js +7 -5
  33. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.d.ts +58 -0
  34. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.js +6 -4
  35. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.d.ts +45 -0
  36. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.js +6 -4
  37. package/vscode/src/vs/workbench/contrib/customEditor/browser/media/customEditor.css.js +1 -1
  38. package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.d.ts +18 -0
  39. package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +16 -16
  40. package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.d.ts +65 -0
  41. package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +15 -10
  42. package/vscode/src/vs/workbench/contrib/customEditor/common/customEditorModelManager.d.ts +12 -0
  43. package/vscode/src/vs/workbench/contrib/customEditor/common/customEditorModelManager.js +1 -0
  44. package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.d.ts +15 -0
  45. package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +27 -25
  46. package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpener.contribution.d.ts +1 -0
  47. package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpener.contribution.js +4 -2
  48. package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.d.ts +1 -0
  49. package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js +6 -386
  50. package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.d.ts +15 -0
  51. package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.js +385 -0
  52. package/vscode/src/vs/workbench/contrib/languageStatus/browser/media/languageStatus.css.js +1 -1
  53. package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.d.ts +13 -0
  54. package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.js +20 -20
  55. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.d.ts +105 -0
  56. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.js +50 -62
  57. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.d.ts +18 -0
  58. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.js +16 -15
  59. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.d.ts +1 -0
  60. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.js +15 -13
  61. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorSerializer.d.ts +27 -0
  62. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorSerializer.js +2 -1
  63. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/colors.d.ts +13 -0
  64. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/colors.js +14 -13
  65. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editorGutter.d.ts +31 -0
  66. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editorGutter.js +2 -1
  67. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.d.ts +9 -0
  68. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +15 -14
  69. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.d.ts +45 -0
  70. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.js +3 -2
  71. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.d.ts +43 -0
  72. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +37 -39
  73. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.d.ts +11 -0
  74. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js +22 -21
  75. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/lineAlignment.d.ts +7 -0
  76. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/lineAlignment.js +3 -2
  77. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/media/mergeEditor.css.js +1 -1
  78. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.d.ts +117 -0
  79. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +57 -53
  80. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/scrollSynchronizer.d.ts +22 -0
  81. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/scrollSynchronizer.js +27 -25
  82. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.d.ts +41 -0
  83. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +15 -13
  84. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewZones.d.ts +29 -0
  85. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewZones.js +4 -3
  86. package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.d.ts +11 -0
  87. package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.js +28 -28
  88. package/vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.d.ts +1 -0
  89. package/vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.js +7 -5
  90. package/vscode/src/vs/workbench/contrib/sash/browser/sash.d.ts +15 -0
  91. package/vscode/src/vs/workbench/contrib/sash/browser/sash.js +2 -1
  92. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/media/typeHierarchy.css.js +1 -1
  93. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.d.ts +1 -0
  94. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +54 -56
  95. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.d.ts +50 -0
  96. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +48 -38
  97. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.d.ts +52 -0
  98. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +19 -30
  99. package/vscode/src/vs/workbench/contrib/webview/browser/overlayWebview.d.ts +101 -0
  100. package/vscode/src/vs/workbench/contrib/webview/browser/overlayWebview.js +3 -2
  101. package/vscode/src/vs/workbench/contrib/webview/browser/resourceLoading.d.ts +38 -0
  102. package/vscode/src/vs/workbench/contrib/webview/browser/resourceLoading.js +7 -6
  103. package/vscode/src/vs/workbench/contrib/webview/browser/themeing.d.ts +23 -0
  104. package/vscode/src/vs/workbench/contrib/webview/browser/themeing.js +7 -6
  105. package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.d.ts +139 -0
  106. package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +58 -56
  107. package/vscode/src/vs/workbench/contrib/webview/browser/webviewFindWidget.d.ts +33 -0
  108. package/vscode/src/vs/workbench/contrib/webview/browser/webviewFindWidget.js +4 -3
  109. package/vscode/src/vs/workbench/contrib/webview/browser/webviewService.d.ts +21 -0
  110. package/vscode/src/vs/workbench/contrib/webview/browser/webviewService.js +2 -1
  111. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.d.ts +33 -0
  112. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +28 -28
  113. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditorInputSerializer.d.ts +50 -0
  114. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditorInputSerializer.js +3 -2
  115. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.d.ts +1 -0
  116. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +15 -13
  117. package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.d.ts +64 -0
  118. package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.js +10 -8
  119. package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewService.d.ts +30 -0
  120. package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewService.js +1 -0
  121. package/vscode/src/vs/workbench/services/editor/browser/editorPaneService.d.ts +6 -0
  122. package/vscode/src/vs/workbench/services/editor/browser/editorPaneService.js +3 -1
  123. package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.d.ts +60 -0
  124. package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +64 -63
  125. package/vscode/src/vs/workbench/services/history/browser/historyService.d.ts +184 -0
  126. package/vscode/src/vs/workbench/services/history/browser/historyService.js +154 -148
  127. package/vscode/src/vs/workbench/services/progress/browser/media/progressService.css.js +1 -1
  128. package/vscode/src/vs/workbench/services/progress/browser/progressService.d.ts +36 -0
  129. package/vscode/src/vs/workbench/services/progress/browser/progressService.js +59 -54
  130. package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorHandler.d.ts +34 -0
  131. package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorHandler.js +4 -3
  132. package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.d.ts +71 -0
  133. package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.js +4 -2
  134. package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.d.ts +122 -0
  135. package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +86 -90
  136. package/vscode/src/vs/workbench/services/views/common/viewContainerModel.d.ts +80 -0
  137. package/vscode/src/vs/workbench/services/views/common/viewContainerModel.js +58 -64
  138. package/override/vs/workbench/browser/parts/editor/textEditor.js +0 -5
  139. package/override/vs/workbench/browser/parts/editor/textEditor.weak.js +0 -11
  140. package/tools/editorAssets.js +0 -4
  141. package/tools/url.js +0 -10
  142. package/viewCommon.js +0 -109
@@ -1,13 +1,16 @@
1
- import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
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(( (new DisposableStore())));
56
+ this.activeEditorListeners = this._register(( new DisposableStore()));
53
57
  this.lastActiveEditor = undefined;
54
58
  this.editorHelper = this.instantiationService.createInstance(EditorHelper);
55
- this.canNavigateBackContextKey = (( (new RawContextKey('canNavigateBack', false, ( localize(4201, "Whether it is possible to navigate back in editor history")))))).bindTo(this.contextKeyService);
56
- this.canNavigateForwardContextKey = (( (new RawContextKey('canNavigateForward', false, ( localize(4202, "Whether it is possible to navigate forward in editor history")))))).bindTo(this.contextKeyService);
57
- this.canNavigateBackInNavigationsContextKey = (( (new RawContextKey('canNavigateBackInNavigationLocations', false, ( localize(
58
- 4203,
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
- )))))).bindTo(this.contextKeyService);
61
- this.canNavigateForwardInNavigationsContextKey = (( (new RawContextKey('canNavigateForwardInNavigationLocations', false, ( localize(
62
- 4204,
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
- )))))).bindTo(this.contextKeyService);
65
- this.canNavigateToLastNavigationLocationContextKey = (( (new RawContextKey('canNavigateToLastNavigationLocation', false, ( localize(
66
- 4205,
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
- )))))).bindTo(this.contextKeyService);
69
- this.canNavigateBackInEditsContextKey = (( (new RawContextKey('canNavigateBackInEditLocations', false, ( localize(
70
- 4206,
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
- )))))).bindTo(this.contextKeyService);
73
- this.canNavigateForwardInEditsContextKey = (( (new RawContextKey('canNavigateForwardInEditLocations', false, ( localize(
74
- 4207,
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
- )))))).bindTo(this.contextKeyService);
77
- this.canNavigateToLastEditLocationContextKey = (( (new RawContextKey('canNavigateToLastEditLocation', false, ( localize(
78
- 4208,
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
- )))))).bindTo(this.contextKeyService);
81
- this.canReopenClosedEditorContextKey = (( (new RawContextKey('canReopenClosedEditor', false, ( localize(4209, "Whether it is possible to reopen the last closed editor")))))).bindTo(this.contextKeyService);
82
- this._onDidChangeEditorNavigationStack = this._register(( (new Emitter())));
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 = ( (new Map()));
86
- this.editorScopedNavigationStacks = ( (new Map()));
87
- this.editorNavigationScope = 0 ;
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 = ( (new Map()));
98
- this.resourceExcludeMatcher = this._register(( (new WindowIdleValue(mainWindow, () => {
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(( (new DisposableStore())));
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(( (new DisposableStore())));
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 === 12 && e.editor === activeEditorPane.input && !activeEditorPane.group.isTransient(activeEditorPane.input)) {
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(1 )) {
209
+ if (event.isOperation(FileOperation.DELETE)) {
206
210
  this.remove(event);
207
211
  }
208
- else if (event.isOperation(2 ) && event.target.isFile) {
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(0 ));
253
- this.canNavigateForwardContextKey.set(activeStack.canGoForward(0 ));
254
- this.canNavigateBackInNavigationsContextKey.set(activeStack.canGoBack(2 ));
255
- this.canNavigateForwardInNavigationsContextKey.set(activeStack.canGoForward(2 ));
256
- this.canNavigateToLastNavigationLocationContextKey.set(activeStack.canGoLast(2 ));
257
- this.canNavigateBackInEditsContextKey.set(activeStack.canGoBack(1 ));
258
- this.canNavigateForwardInEditsContextKey.set(activeStack.canGoForward(1 ));
259
- this.canNavigateToLastEditLocationContextKey.set(activeStack.canGoLast(1 ));
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 = 1 ;
272
+ this.editorNavigationScope = GoScope.EDITOR_GROUP;
269
273
  }
270
274
  else if (configuredScope === 'editor') {
271
- this.editorNavigationScope = 2 ;
275
+ this.editorNavigationScope = GoScope.EDITOR;
272
276
  }
273
277
  else {
274
- this.editorNavigationScope = 0 ;
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 2 : {
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 = ( (new Map()));
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 = ( (new DisposableStore()));
300
- stack = disposable.add(this.instantiationService.createInstance(EditorNavigationStacks, 2 ));
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 1 : {
308
+ case GoScope.EDITOR_GROUP: {
307
309
  let stack = this.editorGroupScopedNavigationStacks.get(group.id)?.stack;
308
310
  if (!stack) {
309
- const disposable = ( (new DisposableStore()));
310
- stack = disposable.add(this.instantiationService.createInstance(EditorNavigationStacks, 1 ));
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 0 : {
318
+ case GoScope.DEFAULT: {
317
319
  if (!this.defaultScopedEditorNavigationStack) {
318
- this.defaultScopedEditorNavigationStack = this._register(this.instantiationService.createInstance(EditorNavigationStacks, 0 ));
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(0 );
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 || ( (group.getEditors(0 ).map(editor => ({ groupId: group.id, editor }))));
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 (( (recentlyClosedEditor.associatedResources.some(
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(2 )) {
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 (!( (replacements.some(replacement => this.editorHelper.matchesEditor(replacement, entry))))) {
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(0 )].reverse();
697
- const handledEditors = ( (new Set()));
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
- handledEditors.add(`${( (editor.resource.toString()))}/${editor.editorId}`);
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
- if (!( (handledEditors.has(
709
- `${( (editor.resource.toString()))}/${editor.options?.override}`
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, 1 );
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
- (URI.parse(entryParsed.editor.resource))) :
732
- ( (URI.from(entryParsed.editor.resource)))
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: ( (editor.resource.toString()))
764
+ resource: ( editor.resource.toString())
759
765
  }
760
766
  });
761
767
  }
762
- this.storageService.store(HistoryService_1.HISTORY_STORAGE_KEY, JSON.stringify(entries), 1 , 1 );
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 = ( (__decorate([
830
- ( (__param(0, IEditorService))),
831
- ( (__param(1, IEditorGroupsService))),
832
- ( (__param(2, IWorkspaceContextService))),
833
- ( (__param(3, IStorageService))),
834
- ( (__param(4, IConfigurationService))),
835
- ( (__param(5, IFileService))),
836
- ( (__param(6, IWorkspacesService))),
837
- ( (__param(7, IInstantiationService))),
838
- ( (__param(8, IWorkbenchLayoutService))),
839
- ( (__param(9, IContextKeyService))),
840
- ( (__param(10, ILogService)))
841
- ], HistoryService)));
842
- ( (registerSingleton(IHistoryService, HistoryService, 0 )));
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 === 2 && ((other.reason === 4 || other.reason === 5) )) {
866
+ if (result === EditorPaneSelectionCompareResult.SIMILAR && (other.reason === EditorPaneSelectionChangeReason.NAVIGATION || other.reason === EditorPaneSelectionChangeReason.JUMP)) {
861
867
  return true;
862
868
  }
863
- return result === 3 ;
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, 0 , this.scope));
872
- this.editsStack = this._register(this.instantiationService.createInstance(EditorNavigationStack, 1 , this.scope));
873
- this.navigationsStack = this._register(this.instantiationService.createInstance(EditorNavigationStack, 2 , this.scope));
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 = 0 ) {
908
+ getStack(filter = GoFilter.NONE) {
903
909
  switch (filter) {
904
- case 0 : return this.selectionsStack;
905
- case 1 : return this.editsStack;
906
- case 2 : return this.navigationsStack;
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 === 3 ) {
921
+ if (event.reason === EditorPaneSelectionChangeReason.EDIT) {
916
922
  this.editsStack.notifyNavigation(editorPane, event);
917
923
  }
918
- else if (((event.reason === 4 || event.reason === 5) ) &&
924
+ else if ((event.reason === EditorPaneSelectionChangeReason.NAVIGATION || event.reason === EditorPaneSelectionChangeReason.JUMP) &&
919
925
  !this.selectionsStack.isNavigating()) {
920
- if (event.reason === 5 && !this.navigationsStack.isNavigating()) {
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 = ( (__decorate([
945
- ( (__param(1, IInstantiationService)))
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(( (new Emitter())));
990
+ this._onDidChange = this._register(( new Emitter()));
985
991
  this.onDidChange = this._onDidChange.event;
986
- this.mapEditorToDisposable = ( (new Map()));
987
- this.mapGroupToDisposable = ( (new Map()));
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 0 :
1034
+ case GoFilter.NONE:
1029
1035
  filterLabel = 'global';
1030
1036
  break;
1031
- case 1 :
1037
+ case GoFilter.EDITS:
1032
1038
  filterLabel = 'edits';
1033
1039
  break;
1034
- case 2 :
1040
+ case GoFilter.NAVIGATION:
1035
1041
  filterLabel = 'navigation';
1036
1042
  break;
1037
1043
  }
1038
1044
  let scopeLabel;
1039
1045
  switch (this.scope) {
1040
- case 0 :
1046
+ case GoScope.DEFAULT:
1041
1047
  scopeLabel = 'default';
1042
1048
  break;
1043
- case 1 :
1049
+ case GoScope.EDITOR_GROUP:
1044
1050
  scopeLabel = 'editorGroup';
1045
1051
  break;
1046
- case 2 :
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 3 : return 'edit';
1063
- case 4 : return 'navigation';
1064
- case 5 : return 'jump';
1065
- case 1 : return 'programmatic';
1066
- case 2 : return 'user';
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 (!( (this.mapGroupToDisposable.has(groupId)))) {
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 === 1 ) {
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 = ( (new EditorSelectionState(
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 = ( (new EditorSelectionState({ groupId, editor }, selection, event?.reason)));
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) === 1 ;
1229
+ return entry.selection.compare(candidate.selection) === EditorPaneSelectionCompareResult.IDENTICAL;
1224
1230
  }
1225
1231
  move(event) {
1226
- if (event.isOperation(2 )) {
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 === 0 ) {
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) === 1 ;
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 = ( (__decorate([
1402
- ( (__param(2, IInstantiationService))),
1403
- ( (__param(3, IEditorService))),
1404
- ( (__param(4, IEditorGroupsService))),
1405
- ( (__param(5, ILogService)))
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, 2 );
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, 2 );
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 >= 3 && !this.fileService.hasProvider(inputResource)) {
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 = ( (new DisposableStore()));
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 = ( (__decorate([
1503
- ( (__param(0, IUriIdentityService))),
1504
- ( (__param(1, ILifecycleService))),
1505
- ( (__param(2, IFileService))),
1506
- ( (__param(3, IPathService)))
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 };