@codingame/monaco-vscode-view-common-service-override 5.3.0 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/package.json +3 -3
  2. package/viewCommon.js +1 -1
  3. package/vscode/src/vs/base/browser/ui/centered/centeredViewLayout.js +2 -1
  4. package/vscode/src/vs/base/browser/ui/grid/grid.js +34 -24
  5. package/vscode/src/vs/base/browser/ui/grid/gridview.js +35 -34
  6. package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +9 -60
  7. package/vscode/src/vs/workbench/browser/actions/listCommands.js +119 -79
  8. package/vscode/src/vs/workbench/browser/actions/navigationActions.js +76 -64
  9. package/vscode/src/vs/workbench/browser/media/style.css.js +1 -1
  10. package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js +51 -71
  11. package/vscode/src/vs/workbench/browser/parts/activitybar/media/activityaction.css.js +1 -1
  12. package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.js +21 -18
  13. package/vscode/src/vs/workbench/browser/parts/compositeBar.js +6 -6
  14. package/vscode/src/vs/workbench/browser/parts/compositePart.js +11 -8
  15. package/vscode/src/vs/workbench/browser/parts/editor/auxiliaryEditorPart.js +8 -7
  16. package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +112 -107
  17. package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +2 -2
  18. package/vscode/src/vs/workbench/browser/parts/editor/editorDropTarget.js +36 -30
  19. package/vscode/src/vs/workbench/browser/parts/editor/editorPart.js +75 -69
  20. package/vscode/src/vs/workbench/browser/parts/editor/editorParts.js +143 -25
  21. package/vscode/src/vs/workbench/browser/parts/paneCompositeBar.js +20 -16
  22. package/vscode/src/vs/workbench/browser/parts/paneCompositePart.js +13 -11
  23. package/vscode/src/vs/workbench/browser/parts/paneCompositePartService.js +5 -4
  24. package/vscode/src/vs/workbench/browser/parts/panel/panelPart.js +8 -5
  25. package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarActions.js +9 -6
  26. package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.js +51 -37
  27. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +28 -25
  28. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +23 -13
  29. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +5 -5
  30. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditor.contribution.js +3 -2
  31. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.js +2 -1
  32. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.js +34 -23
  33. package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +3 -2
  34. package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +7 -1
  35. package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +3 -2
  36. package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpener.contribution.js +1 -0
  37. package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js +17 -15
  38. package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.js +2 -1
  39. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.js +2 -1
  40. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.js +4 -3
  41. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/conflictActions.js +7 -7
  42. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +2 -2
  43. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.js +2 -1
  44. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +9 -8
  45. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js +2 -2
  46. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +11 -6
  47. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/scrollSynchronizer.js +24 -23
  48. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +3 -2
  49. package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.js +5 -4
  50. package/vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.js +2 -1
  51. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +26 -23
  52. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +23 -13
  53. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +5 -5
  54. package/vscode/src/vs/workbench/contrib/webview/browser/resourceLoading.js +2 -2
  55. package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +7 -6
  56. package/vscode/src/vs/workbench/contrib/webview/browser/webviewService.js +8 -6
  57. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +10 -8
  58. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +3 -2
  59. package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.js +4 -3
  60. package/vscode/src/vs/workbench/services/activity/browser/activityService.js +1 -0
  61. package/vscode/src/vs/workbench/services/editor/browser/editorPaneService.js +1 -0
  62. package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +21 -19
  63. package/vscode/src/vs/workbench/services/history/browser/historyService.js +73 -63
  64. package/vscode/src/vs/workbench/services/progress/browser/progressService.js +19 -15
  65. package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.js +1 -0
  66. package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +23 -18
  67. package/vscode/src/vs/workbench/services/views/common/viewContainerModel.js +20 -14
  68. package/vscode/src/vs/base/browser/deviceAccess.js +0 -61
  69. package/vscode/src/vs/platform/languagePacks/common/localizedStrings.js +0 -13
  70. package/vscode/src/vs/workbench/browser/window.js +0 -330
  71. package/vscode/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.js +0 -371
  72. package/vscode/src/vs/workbench/services/driver/browser/driver.js +0 -188
@@ -1,13 +1,15 @@
1
1
  import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
2
  import { localizeWithPath } from 'vscode/vscode/vs/nls';
3
3
  import { URI } from 'vscode/vscode/vs/base/common/uri';
4
- import { isEditorPaneWithSelection, isEditorInput, EditorResourceAccessor, EditorCloseContext, SideBySideEditor, isSideBySideEditorInput, isResourceEditorInput } from 'vscode/vscode/vs/workbench/common/editor';
4
+ import { GroupModelChangeKind, isEditorPaneWithSelection, isEditorInput, EditorResourceAccessor, EditorsOrder, EditorCloseContext, SideBySideEditor, isSideBySideEditorInput, isResourceEditorInput, EditorPaneSelectionCompareResult, EditorPaneSelectionChangeReason } from 'vscode/vscode/vs/workbench/common/editor';
5
5
  import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
6
+ import { GoScope, GoFilter } from 'vscode/vscode/vs/workbench/services/history/common/history';
6
7
  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';
8
+ import { FILES_EXCLUDE_CONFIG, FileChangesEvent, FileOperation, FileOperationEvent, FileChangeType } from 'vscode/vscode/vs/platform/files/common/files';
8
9
  import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
9
10
  import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace.service';
10
11
  import { Disposable, DisposableStore, dispose } from 'vscode/vscode/vs/base/common/lifecycle';
12
+ import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
11
13
  import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
12
14
  import { Emitter, Event } from 'vscode/vscode/vs/base/common/event';
13
15
  import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
@@ -18,7 +20,7 @@ import { IWorkbenchLayoutService } from 'vscode/vscode/vs/workbench/services/lay
18
20
  import { RawContextKey } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
19
21
  import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
20
22
  import { coalesce, remove } from 'vscode/vscode/vs/base/common/arrays';
21
- import { registerSingleton } from 'vscode/vscode/vs/platform/instantiation/common/extensions';
23
+ import { registerSingleton, InstantiationType } from 'vscode/vscode/vs/platform/instantiation/common/extensions';
22
24
  import { WindowIdleValue, addDisposableListener, EventType, EventHelper } from 'vscode/vscode/vs/base/browser/dom';
23
25
  import { IWorkspacesService } from 'vscode/vscode/vs/platform/workspaces/common/workspaces.service';
24
26
  import { Schemas } from 'vscode/vscode/vs/base/common/network';
@@ -26,6 +28,7 @@ import { onUnexpectedError } from 'vscode/vscode/vs/base/common/errors';
26
28
  import { ResourceGlobMatcher } from 'vscode/vscode/vs/workbench/common/resources';
27
29
  import { IPathService } from 'vscode/vscode/vs/workbench/services/path/common/pathService.service';
28
30
  import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
31
+ import { LifecyclePhase } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
29
32
  import { ILifecycleService } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle.service';
30
33
  import { LogLevel } from 'vscode/vscode/vs/platform/log/common/log';
31
34
  import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
@@ -95,7 +98,7 @@ let HistoryService = class HistoryService extends Disposable {
95
98
  this.defaultScopedEditorNavigationStack = undefined;
96
99
  this.editorGroupScopedNavigationStacks = ( (new Map()));
97
100
  this.editorScopedNavigationStacks = ( (new Map()));
98
- this.editorNavigationScope = 0 ;
101
+ this.editorNavigationScope = GoScope.DEFAULT;
99
102
  this.recentlyUsedEditorsStack = undefined;
100
103
  this.recentlyUsedEditorsStackIndex = 0;
101
104
  this.recentlyUsedEditorsInGroupStack = undefined;
@@ -185,7 +188,14 @@ let HistoryService = class HistoryService extends Disposable {
185
188
  this.handleActiveEditorChange(activeEditorGroup, activeEditorPane);
186
189
  }
187
190
  else {
188
- this.logService.trace(`[History]: ignoring transient editor change (editor: ${activeEditorPane.input?.resource?.toString()}})`);
191
+ this.logService.trace(`[History]: ignoring transient editor change until becoming non-transient (editor: ${activeEditorPane.input?.resource?.toString()}})`);
192
+ const transientListener = activeEditorGroup.onDidModelChange(e => {
193
+ if (e.kind === GroupModelChangeKind.EDITOR_TRANSIENT && e.editor === activeEditorPane.input && !activeEditorPane.group.isTransient(activeEditorPane.input)) {
194
+ transientListener.dispose();
195
+ this.handleActiveEditorChange(activeEditorGroup, activeEditorPane);
196
+ }
197
+ });
198
+ this.activeEditorListeners.add(transientListener);
189
199
  }
190
200
  if (isEditorPaneWithSelection(activeEditorPane)) {
191
201
  this.activeEditorListeners.add(activeEditorPane.onDidChangeSelection(e => {
@@ -206,10 +216,10 @@ let HistoryService = class HistoryService extends Disposable {
206
216
  }
207
217
  }
208
218
  else {
209
- if (event.isOperation(1 )) {
219
+ if (event.isOperation(FileOperation.DELETE)) {
210
220
  this.remove(event);
211
221
  }
212
- else if (event.isOperation(2 ) && event.target.isFile) {
222
+ else if (event.isOperation(FileOperation.MOVE) && event.target.isFile) {
213
223
  this.move(event);
214
224
  }
215
225
  }
@@ -253,14 +263,14 @@ let HistoryService = class HistoryService extends Disposable {
253
263
  updateContextKeys() {
254
264
  this.contextKeyService.bufferChangeEvents(() => {
255
265
  const activeStack = this.getStack();
256
- this.canNavigateBackContextKey.set(activeStack.canGoBack(0 ));
257
- this.canNavigateForwardContextKey.set(activeStack.canGoForward(0 ));
258
- this.canNavigateBackInNavigationsContextKey.set(activeStack.canGoBack(2 ));
259
- this.canNavigateForwardInNavigationsContextKey.set(activeStack.canGoForward(2 ));
260
- this.canNavigateToLastNavigationLocationContextKey.set(activeStack.canGoLast(2 ));
261
- this.canNavigateBackInEditsContextKey.set(activeStack.canGoBack(1 ));
262
- this.canNavigateForwardInEditsContextKey.set(activeStack.canGoForward(1 ));
263
- this.canNavigateToLastEditLocationContextKey.set(activeStack.canGoLast(1 ));
266
+ this.canNavigateBackContextKey.set(activeStack.canGoBack(GoFilter.NONE));
267
+ this.canNavigateForwardContextKey.set(activeStack.canGoForward(GoFilter.NONE));
268
+ this.canNavigateBackInNavigationsContextKey.set(activeStack.canGoBack(GoFilter.NAVIGATION));
269
+ this.canNavigateForwardInNavigationsContextKey.set(activeStack.canGoForward(GoFilter.NAVIGATION));
270
+ this.canNavigateToLastNavigationLocationContextKey.set(activeStack.canGoLast(GoFilter.NAVIGATION));
271
+ this.canNavigateBackInEditsContextKey.set(activeStack.canGoBack(GoFilter.EDITS));
272
+ this.canNavigateForwardInEditsContextKey.set(activeStack.canGoForward(GoFilter.EDITS));
273
+ this.canNavigateToLastEditLocationContextKey.set(activeStack.canGoLast(GoFilter.EDITS));
264
274
  this.canReopenClosedEditorContextKey.set(this.recentlyClosedEditors.length > 0);
265
275
  });
266
276
  }
@@ -269,13 +279,13 @@ let HistoryService = class HistoryService extends Disposable {
269
279
  this.disposeEditorNavigationStacks();
270
280
  const configuredScope = this.configurationService.getValue(HistoryService_1.NAVIGATION_SCOPE_SETTING);
271
281
  if (configuredScope === 'editorGroup') {
272
- this.editorNavigationScope = 1 ;
282
+ this.editorNavigationScope = GoScope.EDITOR_GROUP;
273
283
  }
274
284
  else if (configuredScope === 'editor') {
275
- this.editorNavigationScope = 2 ;
285
+ this.editorNavigationScope = GoScope.EDITOR;
276
286
  }
277
287
  else {
278
- this.editorNavigationScope = 0 ;
288
+ this.editorNavigationScope = GoScope.DEFAULT;
279
289
  }
280
290
  };
281
291
  this._register(this.configurationService.onDidChangeConfiguration(event => {
@@ -287,7 +297,7 @@ let HistoryService = class HistoryService extends Disposable {
287
297
  }
288
298
  getStack(group = this.editorGroupService.activeGroup, editor = group.activeEditor) {
289
299
  switch (this.editorNavigationScope) {
290
- case 2 : {
300
+ case GoScope.EDITOR: {
291
301
  if (!editor) {
292
302
  return (
293
303
  (new NoOpEditorNavigationStacks())
@@ -301,25 +311,25 @@ let HistoryService = class HistoryService extends Disposable {
301
311
  let stack = stacksForGroup.get(editor)?.stack;
302
312
  if (!stack) {
303
313
  const disposable = ( (new DisposableStore()));
304
- stack = disposable.add(this.instantiationService.createInstance(EditorNavigationStacks, 2 ));
314
+ stack = disposable.add(this.instantiationService.createInstance(EditorNavigationStacks, GoScope.EDITOR));
305
315
  disposable.add(stack.onDidChange(() => this._onDidChangeEditorNavigationStack.fire()));
306
316
  stacksForGroup.set(editor, { stack, disposable });
307
317
  }
308
318
  return stack;
309
319
  }
310
- case 1 : {
320
+ case GoScope.EDITOR_GROUP: {
311
321
  let stack = this.editorGroupScopedNavigationStacks.get(group.id)?.stack;
312
322
  if (!stack) {
313
323
  const disposable = ( (new DisposableStore()));
314
- stack = disposable.add(this.instantiationService.createInstance(EditorNavigationStacks, 1 ));
324
+ stack = disposable.add(this.instantiationService.createInstance(EditorNavigationStacks, GoScope.EDITOR_GROUP));
315
325
  disposable.add(stack.onDidChange(() => this._onDidChangeEditorNavigationStack.fire()));
316
326
  this.editorGroupScopedNavigationStacks.set(group.id, { stack, disposable });
317
327
  }
318
328
  return stack;
319
329
  }
320
- case 0 : {
330
+ case GoScope.DEFAULT: {
321
331
  if (!this.defaultScopedEditorNavigationStack) {
322
- this.defaultScopedEditorNavigationStack = this._register(this.instantiationService.createInstance(EditorNavigationStacks, 0 ));
332
+ this.defaultScopedEditorNavigationStack = this._register(this.instantiationService.createInstance(EditorNavigationStacks, GoScope.DEFAULT));
323
333
  this._register(this.defaultScopedEditorNavigationStack.onDidChange(() => this._onDidChangeEditorNavigationStack.fire()));
324
334
  }
325
335
  return this.defaultScopedEditorNavigationStack;
@@ -437,11 +447,11 @@ let HistoryService = class HistoryService extends Disposable {
437
447
  let index;
438
448
  const group = typeof groupId === 'number' ? this.editorGroupService.getGroup(groupId) : undefined;
439
449
  if (!group) {
440
- editors = this.recentlyUsedEditorsStack || this.editorService.getEditors(0 );
450
+ editors = this.recentlyUsedEditorsStack || this.editorService.getEditors(EditorsOrder.MOST_RECENTLY_ACTIVE);
441
451
  index = this.recentlyUsedEditorsStackIndex;
442
452
  }
443
453
  else {
444
- editors = this.recentlyUsedEditorsInGroupStack || ( (group.getEditors(0 ).map(editor => ({ groupId: group.id, editor }))));
454
+ editors = this.recentlyUsedEditorsInGroupStack || ( (group.getEditors(EditorsOrder.MOST_RECENTLY_ACTIVE).map(editor => ({ groupId: group.id, editor }))));
445
455
  index = this.recentlyUsedEditorsInGroupStackIndex;
446
456
  }
447
457
  let newIndex = indexModifier(index);
@@ -598,7 +608,7 @@ let HistoryService = class HistoryService extends Disposable {
598
608
  const sideInputs = editor.primary.matches(editor.secondary) ? [editor.primary] : [editor.primary, editor.secondary];
599
609
  for (const sideInput of sideInputs) {
600
610
  const candidateResourceInput = this.editorHelper.preferResourceEditorInput(sideInput);
601
- if (isResourceEditorInput(candidateResourceInput)) {
611
+ if (isResourceEditorInput(candidateResourceInput) && this.includeInHistory(candidateResourceInput)) {
602
612
  resourceInputs.push(candidateResourceInput);
603
613
  }
604
614
  }
@@ -628,7 +638,7 @@ let HistoryService = class HistoryService extends Disposable {
628
638
  });
629
639
  }
630
640
  moveInHistory(event) {
631
- if (event.isOperation(2 )) {
641
+ if (event.isOperation(FileOperation.MOVE)) {
632
642
  const removed = this.removeFromHistory(event);
633
643
  if (removed) {
634
644
  this.addToHistory({ resource: event.target.resource });
@@ -697,7 +707,7 @@ let HistoryService = class HistoryService extends Disposable {
697
707
  loadHistory() {
698
708
  this.history = [];
699
709
  const storedEditorHistory = this.loadHistoryFromStorage();
700
- const openedEditorsLru = [...this.editorService.getEditors(0 )].reverse();
710
+ const openedEditorsLru = [...this.editorService.getEditors(EditorsOrder.MOST_RECENTLY_ACTIVE)].reverse();
701
711
  const handledEditors = ( (new Set()));
702
712
  for (const { editor } of openedEditorsLru) {
703
713
  if (!this.includeInHistory(editor)) {
@@ -719,7 +729,7 @@ let HistoryService = class HistoryService extends Disposable {
719
729
  }
720
730
  loadHistoryFromStorage() {
721
731
  const entries = [];
722
- const entriesRaw = this.storageService.get(HistoryService_1.HISTORY_STORAGE_KEY, 1 );
732
+ const entriesRaw = this.storageService.get(HistoryService_1.HISTORY_STORAGE_KEY, StorageScope.WORKSPACE);
723
733
  if (entriesRaw) {
724
734
  try {
725
735
  const entriesParsed = JSON.parse(entriesRaw);
@@ -763,7 +773,7 @@ let HistoryService = class HistoryService extends Disposable {
763
773
  }
764
774
  });
765
775
  }
766
- this.storageService.store(HistoryService_1.HISTORY_STORAGE_KEY, JSON.stringify(entries), 1 , 1 );
776
+ this.storageService.store(HistoryService_1.HISTORY_STORAGE_KEY, JSON.stringify(entries), StorageScope.WORKSPACE, StorageTarget.MACHINE);
767
777
  }
768
778
  getLastActiveWorkspaceRoot(schemeFilter, authorityFilter) {
769
779
  const folders = this.contextService.getWorkspace().folders;
@@ -843,7 +853,7 @@ HistoryService = HistoryService_1 = ( (__decorate([
843
853
  ( (__param(9, IContextKeyService))),
844
854
  ( (__param(10, ILogService)))
845
855
  ], HistoryService)));
846
- ( (registerSingleton(IHistoryService, HistoryService, 0 )));
856
+ ( (registerSingleton(IHistoryService, HistoryService, InstantiationType.Eager)));
847
857
  class EditorSelectionState {
848
858
  constructor(editorIdentifier, selection, reason) {
849
859
  this.editorIdentifier = editorIdentifier;
@@ -861,10 +871,10 @@ class EditorSelectionState {
861
871
  return true;
862
872
  }
863
873
  const result = this.selection.compare(other.selection);
864
- if (result === 2 && ((other.reason === 4 || other.reason === 5) )) {
874
+ if (result === EditorPaneSelectionCompareResult.SIMILAR && (other.reason === EditorPaneSelectionChangeReason.NAVIGATION || other.reason === EditorPaneSelectionChangeReason.JUMP)) {
865
875
  return true;
866
876
  }
867
- return result === 3 ;
877
+ return result === EditorPaneSelectionCompareResult.DIFFERENT;
868
878
  }
869
879
  }
870
880
  let EditorNavigationStacks = class EditorNavigationStacks extends Disposable {
@@ -872,9 +882,9 @@ let EditorNavigationStacks = class EditorNavigationStacks extends Disposable {
872
882
  super();
873
883
  this.scope = scope;
874
884
  this.instantiationService = instantiationService;
875
- this.selectionsStack = this._register(this.instantiationService.createInstance(EditorNavigationStack, 0 , this.scope));
876
- this.editsStack = this._register(this.instantiationService.createInstance(EditorNavigationStack, 1 , this.scope));
877
- this.navigationsStack = this._register(this.instantiationService.createInstance(EditorNavigationStack, 2 , this.scope));
885
+ this.selectionsStack = this._register(this.instantiationService.createInstance(EditorNavigationStack, GoFilter.NONE, this.scope));
886
+ this.editsStack = this._register(this.instantiationService.createInstance(EditorNavigationStack, GoFilter.EDITS, this.scope));
887
+ this.navigationsStack = this._register(this.instantiationService.createInstance(EditorNavigationStack, GoFilter.NAVIGATION, this.scope));
878
888
  this.stacks = [
879
889
  this.selectionsStack,
880
890
  this.editsStack,
@@ -903,11 +913,11 @@ let EditorNavigationStacks = class EditorNavigationStacks extends Disposable {
903
913
  goLast(filter) {
904
914
  return this.getStack(filter).goLast();
905
915
  }
906
- getStack(filter = 0 ) {
916
+ getStack(filter = GoFilter.NONE) {
907
917
  switch (filter) {
908
- case 0 : return this.selectionsStack;
909
- case 1 : return this.editsStack;
910
- case 2 : return this.navigationsStack;
918
+ case GoFilter.NONE: return this.selectionsStack;
919
+ case GoFilter.EDITS: return this.editsStack;
920
+ case GoFilter.NAVIGATION: return this.navigationsStack;
911
921
  }
912
922
  }
913
923
  handleActiveEditorChange(editorPane) {
@@ -916,12 +926,12 @@ let EditorNavigationStacks = class EditorNavigationStacks extends Disposable {
916
926
  handleActiveEditorSelectionChange(editorPane, event) {
917
927
  const previous = this.selectionsStack.current;
918
928
  this.selectionsStack.notifyNavigation(editorPane, event);
919
- if (event.reason === 3 ) {
929
+ if (event.reason === EditorPaneSelectionChangeReason.EDIT) {
920
930
  this.editsStack.notifyNavigation(editorPane, event);
921
931
  }
922
- else if (((event.reason === 4 || event.reason === 5) ) &&
932
+ else if ((event.reason === EditorPaneSelectionChangeReason.NAVIGATION || event.reason === EditorPaneSelectionChangeReason.JUMP) &&
923
933
  !this.selectionsStack.isNavigating()) {
924
- if (event.reason === 5 && !this.navigationsStack.isNavigating()) {
934
+ if (event.reason === EditorPaneSelectionChangeReason.JUMP && !this.navigationsStack.isNavigating()) {
925
935
  if (previous) {
926
936
  this.navigationsStack.addOrReplace(previous.groupId, previous.editor, previous.selection);
927
937
  }
@@ -1029,25 +1039,25 @@ ${entryLabels.join('\n')}
1029
1039
  }
1030
1040
  let filterLabel;
1031
1041
  switch (this.filter) {
1032
- case 0 :
1042
+ case GoFilter.NONE:
1033
1043
  filterLabel = 'global';
1034
1044
  break;
1035
- case 1 :
1045
+ case GoFilter.EDITS:
1036
1046
  filterLabel = 'edits';
1037
1047
  break;
1038
- case 2 :
1048
+ case GoFilter.NAVIGATION:
1039
1049
  filterLabel = 'navigation';
1040
1050
  break;
1041
1051
  }
1042
1052
  let scopeLabel;
1043
1053
  switch (this.scope) {
1044
- case 0 :
1054
+ case GoScope.DEFAULT:
1045
1055
  scopeLabel = 'default';
1046
1056
  break;
1047
- case 1 :
1057
+ case GoScope.EDITOR_GROUP:
1048
1058
  scopeLabel = 'editorGroup';
1049
1059
  break;
1050
- case 2 :
1060
+ case GoScope.EDITOR:
1051
1061
  scopeLabel = 'editor';
1052
1062
  break;
1053
1063
  }
@@ -1063,11 +1073,11 @@ ${entryLabels.join('\n')}
1063
1073
  return '<none>';
1064
1074
  }
1065
1075
  switch (event.reason) {
1066
- case 3 : return 'edit';
1067
- case 4 : return 'navigation';
1068
- case 5 : return 'jump';
1069
- case 1 : return 'programmatic';
1070
- case 2 : return 'user';
1076
+ case EditorPaneSelectionChangeReason.EDIT: return 'edit';
1077
+ case EditorPaneSelectionChangeReason.NAVIGATION: return 'navigation';
1078
+ case EditorPaneSelectionChangeReason.JUMP: return 'jump';
1079
+ case EditorPaneSelectionChangeReason.PROGRAMMATIC: return 'programmatic';
1080
+ case EditorPaneSelectionChangeReason.USER: return 'user';
1071
1081
  }
1072
1082
  }
1073
1083
  registerGroupListeners(groupId) {
@@ -1080,7 +1090,7 @@ ${entryLabels.join('\n')}
1080
1090
  }
1081
1091
  onWillMoveEditor(e) {
1082
1092
  this.trace('onWillMoveEditor()', e.editor);
1083
- if (this.scope === 1 ) {
1093
+ if (this.scope === GoScope.EDITOR_GROUP) {
1084
1094
  return;
1085
1095
  }
1086
1096
  for (const entry of this.stack) {
@@ -1224,10 +1234,10 @@ ${entryLabels.join('\n')}
1224
1234
  if (!candidate.selection) {
1225
1235
  return false;
1226
1236
  }
1227
- return entry.selection.compare(candidate.selection) === 1 ;
1237
+ return entry.selection.compare(candidate.selection) === EditorPaneSelectionCompareResult.IDENTICAL;
1228
1238
  }
1229
1239
  move(event) {
1230
- if (event.isOperation(2 )) {
1240
+ if (event.isOperation(FileOperation.MOVE)) {
1231
1241
  for (const entry of this.stack) {
1232
1242
  if (this.editorHelper.matchesEditor(event, entry.editor)) {
1233
1243
  entry.editor = { resource: event.target.resource };
@@ -1335,7 +1345,7 @@ ${entryLabels.join('\n')}
1335
1345
  return this.navigate();
1336
1346
  }
1337
1347
  async maybeGoCurrent() {
1338
- if (this.filter === 0 ) {
1348
+ if (this.filter === GoFilter.NONE) {
1339
1349
  return false;
1340
1350
  }
1341
1351
  if (this.isCurrentSelectionActive()) {
@@ -1362,7 +1372,7 @@ ${entryLabels.join('\n')}
1362
1372
  if (!paneSelection) {
1363
1373
  return false;
1364
1374
  }
1365
- return paneSelection.compare(this.current.selection) === 1 ;
1375
+ return paneSelection.compare(this.current.selection) === EditorPaneSelectionCompareResult.IDENTICAL;
1366
1376
  }
1367
1377
  setIndex(newIndex, skipEvent) {
1368
1378
  this.previousIndex = this.index;
@@ -1440,7 +1450,7 @@ let EditorHelper = class EditorHelper {
1440
1450
  return false;
1441
1451
  }
1442
1452
  if (arg1 instanceof FileChangesEvent) {
1443
- return arg1.contains(inputB.resource, 2 );
1453
+ return arg1.contains(inputB.resource, FileChangeType.DELETED);
1444
1454
  }
1445
1455
  return this.matchesFile(inputB.resource, arg1);
1446
1456
  }
@@ -1457,7 +1467,7 @@ let EditorHelper = class EditorHelper {
1457
1467
  }
1458
1468
  matchesFile(resource, arg2) {
1459
1469
  if (arg2 instanceof FileChangesEvent) {
1460
- return arg2.contains(resource, 2 );
1470
+ return arg2.contains(resource, FileChangeType.DELETED);
1461
1471
  }
1462
1472
  if (arg2 instanceof FileOperationEvent) {
1463
1473
  return this.uriIdentityService.extUri.isEqualOrParent(resource, arg2.resource);
@@ -1467,7 +1477,7 @@ let EditorHelper = class EditorHelper {
1467
1477
  if (!inputResource) {
1468
1478
  return false;
1469
1479
  }
1470
- if (this.lifecycleService.phase >= 3 && !this.fileService.hasProvider(inputResource)) {
1480
+ if (this.lifecycleService.phase >= LifecyclePhase.Restored && !this.fileService.hasProvider(inputResource)) {
1471
1481
  return false;
1472
1482
  }
1473
1483
  return this.uriIdentityService.extUri.isEqual(inputResource, resource);
@@ -2,8 +2,9 @@ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
2
  import './media/progressService.css.js';
3
3
  import { localizeWithPath } from 'vscode/vscode/vs/nls';
4
4
  import { Disposable, toDisposable, DisposableStore, dispose } from 'vscode/vscode/vs/base/common/lifecycle';
5
- import { Progress } from 'vscode/vscode/vs/platform/progress/common/progress';
5
+ import { ProgressLocation, Progress } from 'vscode/vscode/vs/platform/progress/common/progress';
6
6
  import 'vscode/vscode/vs/platform/instantiation/common/instantiation';
7
+ import { StatusbarAlignment } from 'vscode/vscode/vs/workbench/services/statusbar/browser/statusbar';
7
8
  import { IStatusbarService } from 'vscode/vscode/vs/workbench/services/statusbar/browser/statusbar.service';
8
9
  import { timeout, DeferredPromise, RunOnceScheduler } from 'vscode/vscode/vs/base/common/async';
9
10
  import { ProgressBadge } from 'vscode/vscode/vs/workbench/services/activity/common/activity';
@@ -12,16 +13,19 @@ import { NotificationPriority, NotificationsFilter, isNotificationSource } from
12
13
  import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification.service';
13
14
  import { Action } from 'vscode/vscode/vs/base/common/actions';
14
15
  import { Emitter, Event } from 'vscode/vscode/vs/base/common/event';
16
+ import 'vscode/vscode/vs/platform/instantiation/common/extensions';
15
17
  import { ILayoutService } from 'vscode/vscode/vs/platform/layout/browser/layoutService.service';
16
18
  import { Dialog } from 'vscode/vscode/vs/base/browser/ui/dialog/dialog';
17
19
  import { IKeybindingService } from 'vscode/vscode/vs/platform/keybinding/common/keybinding.service';
18
20
  import { EventHelper } from 'vscode/vscode/vs/base/browser/dom';
19
21
  import { parseLinkedText } from 'vscode/vscode/vs/base/common/linkedText';
22
+ import { ViewContainerLocation } from 'vscode/vscode/vs/workbench/common/views';
20
23
  import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views.service';
21
24
  import { IViewsService } from 'vscode/vscode/vs/workbench/services/views/common/viewsService.service';
22
25
  import { IPaneCompositePartService } from 'vscode/vscode/vs/workbench/services/panecomposite/browser/panecomposite.service';
23
26
  import { stripIcons } from 'vscode/vscode/vs/base/common/iconLabels';
24
27
  import { defaultButtonStyles, defaultCheckboxStyles, defaultInputBoxStyles, defaultDialogStyles } from 'vscode/vscode/vs/platform/theme/browser/defaultStyles';
28
+ import { ResultKind } from 'vscode/vscode/vs/platform/keybinding/common/keybindingResolver';
25
29
  import Severity$1 from 'vscode/vscode/vs/base/common/severity';
26
30
 
27
31
  const _moduleId = "vs/workbench/services/progress/browser/progressService";
@@ -58,7 +62,7 @@ let ProgressService = class ProgressService extends Disposable {
58
62
  return handleStringLocation(location);
59
63
  }
60
64
  switch (location) {
61
- case 15 : {
65
+ case ProgressLocation.Notification: {
62
66
  let priority = options.priority;
63
67
  if (priority !== NotificationPriority.URGENT) {
64
68
  if (this.notificationService.getFilter() === NotificationsFilter.ERROR) {
@@ -70,20 +74,20 @@ let ProgressService = class ProgressService extends Disposable {
70
74
  }
71
75
  return this.withNotificationProgress({ ...options, location, priority }, task, onDidCancel);
72
76
  }
73
- case 10 : {
77
+ case ProgressLocation.Window: {
74
78
  const type = options.type;
75
79
  if (options.command) {
76
80
  return this.withWindowProgress({ ...options, location, type }, task);
77
81
  }
78
- return this.withNotificationProgress({ delay: 150 , ...options, priority: NotificationPriority.SILENT, location: 15 , type }, task, onDidCancel);
82
+ return this.withNotificationProgress({ delay: 150 , ...options, priority: NotificationPriority.SILENT, location: ProgressLocation.Notification, type }, task, onDidCancel);
79
83
  }
80
- case 1 :
81
- return this.withPaneCompositeProgress('workbench.view.explorer', 0 , task, { ...options, location });
82
- case 3 :
84
+ case ProgressLocation.Explorer:
85
+ return this.withPaneCompositeProgress('workbench.view.explorer', ViewContainerLocation.Sidebar, task, { ...options, location });
86
+ case ProgressLocation.Scm:
83
87
  return handleStringLocation('workbench.scm');
84
- case 5 :
85
- return this.withPaneCompositeProgress('workbench.view.extensions', 0 , task, { ...options, location });
86
- case 20 :
88
+ case ProgressLocation.Extensions:
89
+ return this.withPaneCompositeProgress('workbench.view.extensions', ViewContainerLocation.Sidebar, task, { ...options, location });
90
+ case ProgressLocation.Dialog:
87
91
  return this.withDialogProgress(options, task, onDidCancel);
88
92
  default:
89
93
  throw ( (new Error(`Bad progress location: ${location}`)));
@@ -144,7 +148,7 @@ let ProgressService = class ProgressService extends Disposable {
144
148
  this.windowProgressStatusEntry.update(statusEntryProperties);
145
149
  }
146
150
  else {
147
- this.windowProgressStatusEntry = this.statusbarService.addEntry(statusEntryProperties, 'status.progress', 0 );
151
+ this.windowProgressStatusEntry = this.statusbarService.addEntry(statusEntryProperties, 'status.progress', StatusbarAlignment.LEFT);
148
152
  }
149
153
  }
150
154
  else {
@@ -186,7 +190,7 @@ let ProgressService = class ProgressService extends Disposable {
186
190
  const createWindowProgress = () => {
187
191
  const promise = ( (new DeferredPromise()));
188
192
  this.withWindowProgress({
189
- location: 10 ,
193
+ location: ProgressLocation.Window,
190
194
  title: options.title ? ( (parseLinkedText(options.title).toString())) : undefined,
191
195
  command: 'notifications.showList',
192
196
  type: options.type
@@ -320,7 +324,7 @@ let ProgressService = class ProgressService extends Disposable {
320
324
  withPaneCompositeProgress(paneCompositeId, viewContainerLocation, task, options) {
321
325
  const progressIndicator = this.paneCompositeService.getProgressIndicator(paneCompositeId, viewContainerLocation);
322
326
  const promise = progressIndicator ? this.withCompositeProgress(progressIndicator, task, options) : task({ report: () => { } });
323
- if (viewContainerLocation === 0 ) {
327
+ if (viewContainerLocation === ViewContainerLocation.Sidebar) {
324
328
  this.showOnActivityBar(paneCompositeId, options, promise);
325
329
  }
326
330
  return promise;
@@ -329,7 +333,7 @@ let ProgressService = class ProgressService extends Disposable {
329
333
  const progressIndicator = this.viewsService.getViewProgressIndicator(viewId);
330
334
  const promise = progressIndicator ? this.withCompositeProgress(progressIndicator, task, options) : task({ report: () => { } });
331
335
  const location = this.viewDescriptorService.getViewLocationById(viewId);
332
- if (location !== 0 ) {
336
+ if (location !== ViewContainerLocation.Sidebar) {
333
337
  return promise;
334
338
  }
335
339
  const viewletId = this.viewDescriptorService.getViewContainerByViewId(viewId)?.id;
@@ -424,7 +428,7 @@ let ProgressService = class ProgressService extends Disposable {
424
428
  disableDefaultAction: options.sticky,
425
429
  keyEventProcessor: (event) => {
426
430
  const resolved = this.keybindingService.softDispatch(event, this.layoutService.activeContainer);
427
- if (resolved.kind === 2 && resolved.commandId) {
431
+ if (resolved.kind === ResultKind.KbFound && resolved.commandId) {
428
432
  if (!allowableCommands.includes(resolved.commandId)) {
429
433
  EventHelper.stop(event, true);
430
434
  }
@@ -7,6 +7,7 @@ import { Emitter, Event } from 'vscode/vscode/vs/base/common/event';
7
7
  import { ResourceMap } from 'vscode/vscode/vs/base/common/map';
8
8
  import { Schemas } from 'vscode/vscode/vs/base/common/network';
9
9
  import { Disposable, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
10
+ import 'vscode/vscode/vs/platform/instantiation/common/extensions';
10
11
 
11
12
  var UntitledTextEditorService_1;
12
13
  let UntitledTextEditorService = class UntitledTextEditorService extends Disposable {