@codingame/monaco-vscode-views-service-override 2.0.3 → 2.1.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 (65) hide show
  1. package/index.d.ts +1 -1
  2. package/index.js +1 -1
  3. package/package.json +11 -11
  4. package/tools/editor.js +14 -0
  5. package/views.js +12 -5
  6. package/vscode/src/vs/base/common/codicons.d.ts +5 -0
  7. package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +2 -2
  8. package/vscode/src/vs/workbench/browser/actions/listCommands.js +160 -4
  9. package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js +14 -19
  10. package/vscode/src/vs/workbench/browser/parts/auxiliarybar/media/auxiliaryBarPart.css.js +1 -1
  11. package/vscode/src/vs/workbench/browser/parts/editor/auxiliaryEditorPart.js +59 -21
  12. package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +77 -45
  13. package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +23 -1
  14. package/vscode/src/vs/workbench/browser/parts/editor/editorPart.js +77 -45
  15. package/vscode/src/vs/workbench/browser/parts/editor/editorParts.js +131 -5
  16. package/vscode/src/vs/workbench/browser/parts/media/paneCompositePart.css.js +1 -1
  17. package/vscode/src/vs/workbench/browser/parts/paneCompositeBar.js +1 -1
  18. package/vscode/src/vs/workbench/browser/parts/paneCompositePart.js +2 -2
  19. package/vscode/src/vs/workbench/browser/parts/sidebar/media/sidebarpart.css.js +1 -1
  20. package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.d.ts +1 -3
  21. package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.js +8 -16
  22. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +13 -13
  23. package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileEditor.js +8 -3
  24. package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileEditorTracker.js +1 -1
  25. package/vscode/src/vs/workbench/contrib/files/browser/explorerService.js +4 -0
  26. package/vscode/src/vs/workbench/contrib/files/browser/fileActions.contribution.js +2 -2
  27. package/vscode/src/vs/workbench/contrib/files/browser/fileCommands.js +3 -4
  28. package/vscode/src/vs/workbench/contrib/files/browser/files.contribution.js +1 -1
  29. package/vscode/src/vs/workbench/contrib/files/browser/workspaceWatcher.js +1 -1
  30. package/vscode/src/vs/workbench/contrib/files/common/dirtyFilesIndicator.js +1 -1
  31. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.js +17 -16
  32. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.js +4 -4
  33. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.js +1 -1
  34. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +13 -13
  35. package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +2 -2
  36. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +1 -1
  37. package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.js +2 -1
  38. package/vscode/src/vs/workbench/services/activity/browser/activityService.js +1 -0
  39. package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +18 -4
  40. package/vscode/src/vs/workbench/services/history/browser/historyService.js +2 -2
  41. package/vscode/src/vs/workbench/services/progress/browser/progressService.js +15 -4
  42. package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorHandler.js +2 -2
  43. package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +6 -2
  44. package/vscode/src/vs/base/browser/ui/breadcrumbs/breadcrumbsWidget.css.js +0 -6
  45. package/vscode/src/vs/base/browser/ui/breadcrumbs/breadcrumbsWidget.js +0 -290
  46. package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsControl.js +0 -801
  47. package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsModel.js +0 -142
  48. package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsPicker.js +0 -412
  49. package/vscode/src/vs/workbench/browser/parts/editor/editorGroupView.js +0 -1315
  50. package/vscode/src/vs/workbench/browser/parts/editor/editorGroupWatermark.js +0 -186
  51. package/vscode/src/vs/workbench/browser/parts/editor/editorPanes.js +0 -346
  52. package/vscode/src/vs/workbench/browser/parts/editor/editorTitleControl.js +0 -154
  53. package/vscode/src/vs/workbench/browser/parts/editor/media/breadcrumbscontrol.css.js +0 -6
  54. package/vscode/src/vs/workbench/browser/parts/editor/media/editorgroupview.css.js +0 -6
  55. package/vscode/src/vs/workbench/browser/parts/editor/media/editortitlecontrol.css.js +0 -6
  56. package/vscode/src/vs/workbench/browser/parts/editor/media/multieditortabscontrol.css.js +0 -6
  57. package/vscode/src/vs/workbench/browser/parts/editor/media/singleeditortabscontrol.css.js +0 -6
  58. package/vscode/src/vs/workbench/browser/parts/editor/multiEditorTabsControl.js +0 -1623
  59. package/vscode/src/vs/workbench/browser/parts/editor/multiRowEditorTabsControl.js +0 -152
  60. package/vscode/src/vs/workbench/browser/parts/editor/noEditorTabsControl.js +0 -54
  61. package/vscode/src/vs/workbench/browser/parts/editor/singleEditorTabsControl.js +0 -259
  62. package/vscode/src/vs/workbench/common/editor/filteredEditorGroupModel.js +0 -109
  63. package/vscode/src/vs/workbench/services/hover/browser/hoverService.js +0 -195
  64. package/vscode/src/vs/workbench/services/hover/browser/hoverWidget.js +0 -528
  65. package/vscode/src/vs/workbench/services/hover/browser/media/hover.css.js +0 -6
package/index.d.ts CHANGED
@@ -3,7 +3,6 @@ export { SidebarPart } from './vscode/src/vs/workbench/browser/parts/sidebar/sid
3
3
  export { ActivityService } from 'vscode/vscode/vs/workbench/services/activity/browser/activityService';
4
4
  export { ActivitybarPart } from './vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js';
5
5
  export { IReference } from 'vscode/vscode/vs/base/common/lifecycle';
6
- export { HoverService } from 'vscode/vscode/vs/workbench/services/hover/browser/hoverService';
7
6
  export { PanelPart } from './vscode/src/vs/workbench/browser/parts/panel/panelPart.js';
8
7
  export { GroupOrientation } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService';
9
8
  export { EditorInputFactoryObject, RegisteredEditorInfo, RegisteredEditorOptions, RegisteredEditorPriority } from 'vscode/vscode/vs/workbench/services/editor/common/editorResolverService';
@@ -11,6 +10,7 @@ export { IResolvedTextEditorModel } from 'vscode/vscode/vs/editor/common/service
11
10
  export { ConfirmResult } from 'vscode/vscode/vs/platform/dialogs/common/dialogs';
12
11
  export { AbstractResourceEditorInput } from 'vscode/vscode/vs/workbench/common/editor/resourceEditorInput';
13
12
  export { AbstractTextResourceEditorInput } from 'vscode/vscode/vs/workbench/common/editor/textResourceEditorInput';
13
+ export { HoverService } from 'vscode/vscode/vs/editor/browser/services/hoverService';
14
14
  export { EditorInput, IEditorCloseHandler } from 'vscode/vscode/vs/workbench/common/editor/editorInput';
15
15
  export { EditorInputCapabilities, IEditorSerializer } from 'vscode/vscode/vs/workbench/common/editor';
16
16
  export { EditorPane } from './vscode/src/vs/workbench/browser/parts/editor/editorPane.js';
package/index.js CHANGED
@@ -11,6 +11,6 @@ export { AbstractTextResourceEditorInput } from 'vscode/vscode/vs/workbench/comm
11
11
  export { ActivityService } from './vscode/src/vs/workbench/services/activity/browser/activityService.js';
12
12
  export { EditorInput } from 'vscode/vscode/vs/workbench/common/editor/editorInput';
13
13
  export { EditorPane } from 'vscode/vscode/vs/workbench/browser/parts/editor/editorPane';
14
- export { HoverService } from './vscode/src/vs/workbench/services/hover/browser/hoverService.js';
14
+ export { HoverService } from 'vscode/vscode/vs/editor/browser/services/hoverService';
15
15
  export { PanelPart } from './vscode/src/vs/workbench/browser/parts/panel/panelPart.js';
16
16
  export { SidebarPart } from './vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-views-service-override",
3
- "version": "2.0.3",
3
+ "version": "2.1.0",
4
4
  "keywords": [],
5
5
  "author": {
6
6
  "name": "CodinGame",
@@ -18,16 +18,16 @@
18
18
  "module": "index.js",
19
19
  "types": "index.d.ts",
20
20
  "dependencies": {
21
- "vscode": "npm:@codingame/monaco-vscode-api@2.0.3",
21
+ "vscode": "npm:@codingame/monaco-vscode-api@2.1.0",
22
22
  "vscode-marked": "npm:marked@=3.0.2",
23
- "@codingame/monaco-vscode-bulk-edit-service-override": "2.0.3",
24
- "@codingame/monaco-vscode-layout-service-override": "2.0.3",
25
- "@codingame/monaco-vscode-quickaccess-service-override": "2.0.3",
26
- "@codingame/monaco-vscode-keybindings-service-override": "2.0.3",
27
- "@codingame/monaco-vscode-files-service-override": "2.0.3",
28
- "@codingame/monaco-vscode-extensions-service-override": "2.0.3",
29
- "@codingame/monaco-vscode-environment-service-override": "2.0.3",
30
- "@codingame/monaco-vscode-host-service-override": "2.0.3",
31
- "@codingame/monaco-vscode-base-service-override": "2.0.3"
23
+ "@codingame/monaco-vscode-bulk-edit-service-override": "2.1.0",
24
+ "@codingame/monaco-vscode-layout-service-override": "2.1.0",
25
+ "@codingame/monaco-vscode-quickaccess-service-override": "2.1.0",
26
+ "@codingame/monaco-vscode-keybindings-service-override": "2.1.0",
27
+ "@codingame/monaco-vscode-files-service-override": "2.1.0",
28
+ "@codingame/monaco-vscode-extensions-service-override": "2.1.0",
29
+ "@codingame/monaco-vscode-environment-service-override": "2.1.0",
30
+ "@codingame/monaco-vscode-host-service-override": "2.1.0",
31
+ "@codingame/monaco-vscode-base-service-override": "2.1.0"
32
32
  }
33
33
  }
package/tools/editor.js CHANGED
@@ -22,6 +22,7 @@ import { IHostService } from 'vscode/vscode/vs/workbench/services/host/browser/h
22
22
  import { Event, Emitter } from 'vscode/vscode/vs/base/common/event';
23
23
  import { TextResourceEditorInput } from 'vscode/vscode/vs/workbench/common/editor/textResourceEditorInput';
24
24
  import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
25
+ import { mainWindow } from 'vscode/vscode/vs/base/browser/window';
25
26
  import { unsupported } from '../tools.js';
26
27
 
27
28
  var StandaloneEditorGroup_1;
@@ -164,6 +165,7 @@ let StandaloneEditorGroup = StandaloneEditorGroup_1 = class StandaloneEditorGrou
164
165
  this.editor = editor;
165
166
  this.scopedContextKeyService = scopedContextKeyService;
166
167
  this.active = false;
168
+ this.windowId = mainWindow.vscodeWindowId;
167
169
  this.onDidFocus = this.editor.onDidFocusEditorWidget;
168
170
  this.onDidOpenEditorFail = Event.None;
169
171
  this.whenRestored = Promise.resolve();
@@ -434,6 +436,18 @@ let MonacoDelegateEditorGroupsService = class MonacoDelegateEditorGroupsService
434
436
  codeEditorService.listCodeEditors().forEach(handleCodeEditor);
435
437
  });
436
438
  }
439
+ get isReady() {
440
+ return this.delegate.isReady;
441
+ }
442
+ get whenReady() {
443
+ return this.delegate.whenReady;
444
+ }
445
+ get whenRestored() {
446
+ return this.delegate.whenRestored;
447
+ }
448
+ get hasRestorableState() {
449
+ return this.delegate.hasRestorableState;
450
+ }
437
451
  get parts() { return this.delegate.parts; }
438
452
  createAuxiliaryEditorPart(options) {
439
453
  return this.delegate.createAuxiliaryEditorPart(options);
package/views.js CHANGED
@@ -1,9 +1,8 @@
1
1
  import { __decorate, __param } from './external/tslib/tslib.es6.js';
2
2
  import { StandaloneServices } from 'vscode/vscode/vs/editor/standalone/browser/standaloneServices';
3
3
  import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
4
- import { IViewDescriptorService, Extensions, IViewsService } from 'vscode/vscode/vs/workbench/common/views';
4
+ import { IViewDescriptorService, Extensions } from 'vscode/vscode/vs/workbench/common/views';
5
5
  export { ViewContainerLocation } from 'vscode/vscode/vs/workbench/common/views';
6
- import { ViewsService } from 'vscode/vscode/vs/workbench/browser/parts/views/viewsService';
7
6
  import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
8
7
  import { SidebarPart } from './vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.js';
9
8
  import { ViewDescriptorService } from './vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js';
@@ -12,8 +11,6 @@ import { ActivityService } from './vscode/src/vs/workbench/services/activity/bro
12
11
  import { IPaneCompositePartService } from 'vscode/vscode/vs/workbench/services/panecomposite/browser/panecomposite';
13
12
  export { ActivitybarPart } from './vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js';
14
13
  import { MutableDisposable, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
15
- import { IHoverService } from 'vscode/vscode/vs/workbench/services/hover/browser/hover';
16
- import { HoverService } from './vscode/src/vs/workbench/services/hover/browser/hoverService.js';
17
14
  import { ExplorerService } from './vscode/src/vs/workbench/contrib/files/browser/explorerService.js';
18
15
  import { IExplorerService } from 'vscode/vscode/vs/workbench/contrib/files/browser/files';
19
16
  import { PanelPart } from './vscode/src/vs/workbench/browser/parts/panel/panelPart.js';
@@ -100,6 +97,11 @@ import { IWorkingCopyBackupService } from 'vscode/vscode/vs/workbench/services/w
100
97
  import { PaneCompositePartService } from './vscode/src/vs/workbench/browser/parts/paneCompositePartService.js';
101
98
  import { EditorParts } from './vscode/src/vs/workbench/browser/parts/editor/editorParts.js';
102
99
  import { IAuxiliaryWindowService, BrowserAuxiliaryWindowService } from 'vscode/vscode/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService';
100
+ import { IViewsService } from 'vscode/vscode/vs/workbench/services/views/common/viewsService';
101
+ import { ViewsService } from 'vscode/vscode/vs/workbench/services/views/browser/viewsService';
102
+ import { HoverService } from 'vscode/vscode/vs/editor/browser/services/hoverService';
103
+ export { HoverService } from 'vscode/vscode/vs/editor/browser/services/hoverService';
104
+ import { IHoverService } from 'vscode/vscode/vs/platform/hover/browser/hover';
103
105
  import { MonacoEditorService, MonacoDelegateEditorGroupsService } from './tools/editor.js';
104
106
  import getServiceOverride$2 from '@codingame/monaco-vscode-bulk-edit-service-override';
105
107
  import getServiceOverride$1 from '@codingame/monaco-vscode-layout-service-override';
@@ -423,6 +425,11 @@ let MonacoEditorParts = class MonacoEditorParts extends MonacoDelegateEditorGrou
423
425
  return this.delegate.restoreGroup(...args);
424
426
  };
425
427
  }
428
+ getId() {
429
+ return 'standalone';
430
+ }
431
+ updateStyles() {
432
+ }
426
433
  registerPart(part) {
427
434
  return this.delegate.registerPart(part);
428
435
  }
@@ -794,4 +801,4 @@ function getServiceOverride(openEditorFallback, _webviewIframeAlternateDomains,
794
801
  };
795
802
  }
796
803
 
797
- export { ActivityService, HoverService, PanelPart, SidebarPart, SimpleEditorInput, SimpleEditorPane, attachPart, getServiceOverride as default, getPanelPosition, getSideBarPosition, isEditorPartVisible, isPartVisibile, onDidChangePanelPosition, onDidChangeSideBarPosition, onPartVisibilityChange, registerCustomView, registerEditor, registerEditorPane, registerEditorSerializer, renderActivitybarPar, renderAuxiliaryPart, renderEditorPart, renderPanelPart, renderPart, renderSidebarPart, renderStatusBarPart, setPartVisibility };
804
+ export { ActivityService, PanelPart, SidebarPart, SimpleEditorInput, SimpleEditorPane, attachPart, getServiceOverride as default, getPanelPosition, getSideBarPosition, isEditorPartVisible, isPartVisibile, onDidChangePanelPosition, onDidChangeSideBarPosition, onPartVisibilityChange, registerCustomView, registerEditor, registerEditorPane, registerEditorSerializer, renderActivitybarPar, renderAuxiliaryPart, renderEditorPart, renderPanelPart, renderPart, renderSidebarPart, renderStatusBarPart, setPartVisibility };
@@ -58,6 +58,7 @@ declare const Codicon: {
58
58
  readonly closeDirty: ThemeIcon;
59
59
  readonly debugBreakpoint: ThemeIcon;
60
60
  readonly debugBreakpointDisabled: ThemeIcon;
61
+ readonly debugBreakpointPending: ThemeIcon;
61
62
  readonly debugHint: ThemeIcon;
62
63
  readonly primitiveSquare: ThemeIcon;
63
64
  readonly edit: ThemeIcon;
@@ -551,6 +552,10 @@ declare const Codicon: {
551
552
  readonly sparkleFilled: ThemeIcon;
552
553
  readonly diffSingle: ThemeIcon;
553
554
  readonly diffMultiple: ThemeIcon;
555
+ readonly surroundWith: ThemeIcon;
556
+ readonly gitStash: ThemeIcon;
557
+ readonly gitStashApply: ThemeIcon;
558
+ readonly gitStashPop: ThemeIcon;
554
559
  readonly dialogError: ThemeIcon;
555
560
  readonly dialogWarning: ThemeIcon;
556
561
  readonly dialogInfo: ThemeIcon;
@@ -23,7 +23,7 @@ import { ExtensionsRegistry } from 'vscode/vscode/vs/workbench/services/extensio
23
23
  import { KeybindingsRegistry } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
24
24
  import { KeyChord } from 'vscode/vscode/vs/base/common/keyCodes';
25
25
  import { IListService, WorkbenchListFocusContextKey } from 'vscode/vscode/vs/platform/list/browser/listService';
26
- import { IHoverService } from 'vscode/vscode/vs/workbench/services/hover/browser/hover';
26
+ import { IHoverService } from 'vscode/vscode/vs/platform/hover/browser/hover';
27
27
  import { CancellationTokenSource } from 'vscode/vscode/vs/base/common/cancellation';
28
28
  import { AsyncDataTree } from 'vscode/vscode/vs/base/browser/ui/tree/asyncDataTree';
29
29
  import { ITreeViewsService } from 'vscode/vscode/vs/workbench/services/views/browser/treeViewsService';
@@ -381,7 +381,7 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
381
381
  if (!treeItem.tooltip) {
382
382
  return;
383
383
  }
384
- const element = treeViewsService.getRenderedTreeElement(treeItem);
384
+ const element = treeViewsService.getRenderedTreeElement(('handle' in treeItem) ? treeItem.handle : treeItem);
385
385
  if (!element) {
386
386
  return;
387
387
  }
@@ -1,6 +1,6 @@
1
1
  import { KeybindingsRegistry } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
2
2
  import { List } from 'vscode/vscode/vs/base/browser/ui/list/listWidget';
3
- import { WorkbenchListFocusContextKey, IListService, WorkbenchListSupportsMultiSelectContextKey, WorkbenchTreeElementCanCollapse, WorkbenchTreeElementHasParent, getSelectionKeyboardEvent, WorkbenchTreeElementCanExpand, WorkbenchTreeElementHasChild, WorkbenchListHasSelectionOrFocus, WorkbenchListSelectionNavigation, RawWorkbenchListFocusContextKey, WorkbenchListSupportsFind, WorkbenchTreeFindOpen, WorkbenchListScrollAtTopContextKey, WorkbenchListScrollAtBottomContextKey } from 'vscode/vscode/vs/platform/list/browser/listService';
3
+ import { WorkbenchListFocusContextKey, IListService, WorkbenchListSupportsMultiSelectContextKey, WorkbenchTreeElementCanCollapse, WorkbenchTreeElementHasParent, WorkbenchTreeStickyScrollFocused, getSelectionKeyboardEvent, WorkbenchTreeElementCanExpand, WorkbenchTreeElementHasChild, WorkbenchListHasSelectionOrFocus, WorkbenchListSelectionNavigation, RawWorkbenchListFocusContextKey, WorkbenchListSupportsFind, WorkbenchTreeFindOpen, WorkbenchListScrollAtTopContextKey, WorkbenchListScrollAtBottomContextKey } from 'vscode/vscode/vs/platform/list/browser/listService';
4
4
  import { PagedList } from 'vscode/vscode/vs/base/browser/ui/list/listPaging';
5
5
  import { range, equals } from 'vscode/vscode/vs/base/common/arrays';
6
6
  import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
@@ -9,8 +9,11 @@ import { AsyncDataTree } from 'vscode/vscode/vs/base/browser/ui/tree/asyncDataTr
9
9
  import { DataTree } from 'vscode/vscode/vs/base/browser/ui/tree/dataTree';
10
10
  import { CommandsRegistry } from 'vscode/vscode/vs/platform/commands/common/commands';
11
11
  import { Table } from 'vscode/vscode/vs/base/browser/ui/table/tableWidget';
12
- import { AbstractTree, TreeFindMode } from 'vscode/vscode/vs/base/browser/ui/tree/abstractTree';
12
+ import { AbstractTree, TreeFindMode, TreeFindMatchType } from 'vscode/vscode/vs/base/browser/ui/tree/abstractTree';
13
13
  import { isActiveElement } from 'vscode/vscode/vs/base/browser/dom';
14
+ import { registerAction2, Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
15
+ import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration';
16
+ import { localizeWithPath } from 'vscode/vscode/vs/nls';
14
17
 
15
18
  function ensureDOMFocus(widget) {
16
19
  const element = widget?.getHTMLElement();
@@ -76,6 +79,38 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
76
79
  });
77
80
  }
78
81
  });
82
+ KeybindingsRegistry.registerCommandAndKeybindingRule({
83
+ id: 'list.focusAnyDown',
84
+ weight: 200 ,
85
+ when: WorkbenchListFocusContextKey,
86
+ primary: 512 | 18 ,
87
+ mac: {
88
+ primary: 512 | 18 ,
89
+ secondary: [256 | 512 | 44 ]
90
+ },
91
+ handler: (accessor, arg2) => {
92
+ navigate(accessor.get(IListService).lastFocusedList, async (widget) => {
93
+ const fakeKeyboardEvent = ( new KeyboardEvent('keydown', { altKey: true }));
94
+ await widget.focusNext(typeof arg2 === 'number' ? arg2 : 1, false, fakeKeyboardEvent);
95
+ });
96
+ }
97
+ });
98
+ KeybindingsRegistry.registerCommandAndKeybindingRule({
99
+ id: 'list.focusAnyUp',
100
+ weight: 200 ,
101
+ when: WorkbenchListFocusContextKey,
102
+ primary: 512 | 16 ,
103
+ mac: {
104
+ primary: 512 | 16 ,
105
+ secondary: [256 | 512 | 46 ]
106
+ },
107
+ handler: (accessor, arg2) => {
108
+ navigate(accessor.get(IListService).lastFocusedList, async (widget) => {
109
+ const fakeKeyboardEvent = ( new KeyboardEvent('keydown', { altKey: true }));
110
+ await widget.focusPrevious(typeof arg2 === 'number' ? arg2 : 1, false, fakeKeyboardEvent);
111
+ });
112
+ }
113
+ });
79
114
  KeybindingsRegistry.registerCommandAndKeybindingRule({
80
115
  id: 'list.focusPageDown',
81
116
  weight: 200 ,
@@ -124,6 +159,30 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
124
159
  });
125
160
  }
126
161
  });
162
+ KeybindingsRegistry.registerCommandAndKeybindingRule({
163
+ id: 'list.focusAnyFirst',
164
+ weight: 200 ,
165
+ when: WorkbenchListFocusContextKey,
166
+ primary: 512 | 14 ,
167
+ handler: (accessor) => {
168
+ navigate(accessor.get(IListService).lastFocusedList, async (widget) => {
169
+ const fakeKeyboardEvent = ( new KeyboardEvent('keydown', { altKey: true }));
170
+ await widget.focusFirst(fakeKeyboardEvent);
171
+ });
172
+ }
173
+ });
174
+ KeybindingsRegistry.registerCommandAndKeybindingRule({
175
+ id: 'list.focusAnyLast',
176
+ weight: 200 ,
177
+ when: WorkbenchListFocusContextKey,
178
+ primary: 512 | 13 ,
179
+ handler: (accessor) => {
180
+ navigate(accessor.get(IListService).lastFocusedList, async (widget) => {
181
+ const fakeKeyboardEvent = ( new KeyboardEvent('keydown', { altKey: true }));
182
+ await widget.focusLast(fakeKeyboardEvent);
183
+ });
184
+ }
185
+ });
127
186
  function expandMultiSelection(focused, previousFocus) {
128
187
  if (focused instanceof List || focused instanceof PagedList || focused instanceof Table) {
129
188
  const list = focused;
@@ -154,6 +213,19 @@ function expandMultiSelection(focused, previousFocus) {
154
213
  }
155
214
  }
156
215
  }
216
+ function revealFocusedStickyScroll(tree, postRevealAction) {
217
+ const focus = tree.getStickyScrollFocus();
218
+ if (focus.length === 0) {
219
+ throw new Error(`StickyScroll has no focus`);
220
+ }
221
+ if (focus.length > 1) {
222
+ throw new Error(`StickyScroll can only have a single focused item`);
223
+ }
224
+ tree.reveal(focus[0]);
225
+ tree.getHTMLElement().focus();
226
+ tree.setFocus(focus);
227
+ postRevealAction?.(focus[0]);
228
+ }
157
229
  KeybindingsRegistry.registerCommandAndKeybindingRule({
158
230
  id: 'list.expandSelectionDown',
159
231
  weight: 200 ,
@@ -227,6 +299,23 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
227
299
  }
228
300
  }
229
301
  });
302
+ KeybindingsRegistry.registerCommandAndKeybindingRule({
303
+ id: 'list.stickyScroll.collapse',
304
+ weight: 200 + 50,
305
+ when: WorkbenchTreeStickyScrollFocused,
306
+ primary: 15 ,
307
+ mac: {
308
+ primary: 15 ,
309
+ secondary: [2048 | 16 ]
310
+ },
311
+ handler: (accessor) => {
312
+ const widget = accessor.get(IListService).lastFocusedList;
313
+ if (!widget || !(widget instanceof ObjectTree || widget instanceof DataTree || widget instanceof AsyncDataTree)) {
314
+ return;
315
+ }
316
+ revealFocusedStickyScroll(widget, focus => widget.collapse(focus));
317
+ }
318
+ });
230
319
  KeybindingsRegistry.registerCommandAndKeybindingRule({
231
320
  id: 'list.collapseAll',
232
321
  weight: 200 ,
@@ -342,8 +431,8 @@ function selectElement(accessor, retainCurrentFocus) {
342
431
  const fakeKeyboardEvent = getSelectionKeyboardEvent('keydown', retainCurrentFocus);
343
432
  if (focused instanceof List || focused instanceof PagedList || focused instanceof Table) {
344
433
  const list = focused;
345
- list.setSelection(list.getFocus(), fakeKeyboardEvent);
346
434
  list.setAnchor(list.getFocus()[0]);
435
+ list.setSelection(list.getFocus(), fakeKeyboardEvent);
347
436
  }
348
437
  else if (focused instanceof ObjectTree || focused instanceof DataTree || focused instanceof AsyncDataTree) {
349
438
  const tree = focused;
@@ -360,8 +449,8 @@ function selectElement(accessor, retainCurrentFocus) {
360
449
  tree.toggleCollapsed(focus[0]);
361
450
  }
362
451
  }
363
- tree.setSelection(focus, fakeKeyboardEvent);
364
452
  tree.setAnchor(focus[0]);
453
+ tree.setSelection(focus, fakeKeyboardEvent);
365
454
  }
366
455
  }
367
456
  KeybindingsRegistry.registerCommandAndKeybindingRule({
@@ -377,6 +466,23 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
377
466
  selectElement(accessor, false);
378
467
  }
379
468
  });
469
+ KeybindingsRegistry.registerCommandAndKeybindingRule({
470
+ id: 'list.stickyScrollselect',
471
+ weight: 200 + 50,
472
+ when: WorkbenchTreeStickyScrollFocused,
473
+ primary: 3 ,
474
+ mac: {
475
+ primary: 3 ,
476
+ secondary: [2048 | 18 ]
477
+ },
478
+ handler: (accessor) => {
479
+ const widget = accessor.get(IListService).lastFocusedList;
480
+ if (!widget || !(widget instanceof ObjectTree || widget instanceof DataTree || widget instanceof AsyncDataTree)) {
481
+ return;
482
+ }
483
+ revealFocusedStickyScroll(widget, focus => widget.setSelection([focus]));
484
+ }
485
+ });
380
486
  KeybindingsRegistry.registerCommandAndKeybindingRule({
381
487
  id: 'list.selectAndPreserveFocus',
382
488
  weight: 200 ,
@@ -477,6 +583,19 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
477
583
  selectElement(accessor, true);
478
584
  }
479
585
  });
586
+ KeybindingsRegistry.registerCommandAndKeybindingRule({
587
+ id: 'list.stickyScrolltoggleExpand',
588
+ weight: 200 + 50,
589
+ when: WorkbenchTreeStickyScrollFocused,
590
+ primary: 10 ,
591
+ handler: (accessor) => {
592
+ const widget = accessor.get(IListService).lastFocusedList;
593
+ if (!widget || !(widget instanceof ObjectTree || widget instanceof DataTree || widget instanceof AsyncDataTree)) {
594
+ return;
595
+ }
596
+ revealFocusedStickyScroll(widget);
597
+ }
598
+ });
480
599
  KeybindingsRegistry.registerCommandAndKeybindingRule({
481
600
  id: 'list.clear',
482
601
  weight: 200 ,
@@ -523,6 +642,16 @@ CommandsRegistry.registerCommand({
523
642
  }
524
643
  }
525
644
  });
645
+ CommandsRegistry.registerCommand({
646
+ id: 'list.toggleFindMatchType',
647
+ handler: (accessor) => {
648
+ const widget = accessor.get(IListService).lastFocusedList;
649
+ if (widget instanceof AbstractTree || widget instanceof AsyncDataTree) {
650
+ const tree = widget;
651
+ tree.findMatchType = tree.findMatchType === TreeFindMatchType.Contiguous ? TreeFindMatchType.Fuzzy : TreeFindMatchType.Contiguous;
652
+ }
653
+ }
654
+ });
526
655
  CommandsRegistry.registerCommandAlias('list.toggleKeyboardNavigation', 'list.triggerTypeNavigation');
527
656
  CommandsRegistry.registerCommandAlias('list.toggleFilterOnType', 'list.toggleFindMode');
528
657
  KeybindingsRegistry.registerCommandAndKeybindingRule({
@@ -606,3 +735,30 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
606
735
  focused.scrollLeft += 10;
607
736
  }
608
737
  });
738
+ registerAction2(class ToggleStickyScroll extends Action2 {
739
+ constructor() {
740
+ super({
741
+ id: 'tree.toggleStickyScroll',
742
+ title: {
743
+ value: ( localizeWithPath(
744
+ 'vs/workbench/browser/actions/listCommands',
745
+ 'toggleTreeStickyScroll',
746
+ "Toggle Tree Sticky Scroll"
747
+ )),
748
+ mnemonicTitle: ( localizeWithPath(
749
+ 'vs/workbench/browser/actions/listCommands',
750
+ { key: 'mitoggleTreeStickyScroll', comment: ['&& denotes a mnemonic'] },
751
+ "&&Toggle Tree Sticky Scroll"
752
+ )),
753
+ original: 'Toggle Tree Sticky Scroll',
754
+ },
755
+ category: 'View',
756
+ f1: true
757
+ });
758
+ }
759
+ run(accessor) {
760
+ const configurationService = accessor.get(IConfigurationService);
761
+ const newValue = !configurationService.getValue('workbench.tree.enableStickyScroll');
762
+ configurationService.updateValue('workbench.tree.enableStickyScroll', newValue);
763
+ }
764
+ });
@@ -1,7 +1,7 @@
1
1
  import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
2
  import './media/activitybarpart.css.js';
3
3
  import './media/activityaction.css.js';
4
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
4
+ import { localizeWithPath, localize2WithPath } from 'vscode/vscode/vs/nls';
5
5
  import { Part } from 'vscode/vscode/vs/workbench/browser/part';
6
6
  import { IWorkbenchLayoutService } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService';
7
7
  import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
@@ -26,7 +26,6 @@ import { Categories } from 'vscode/vscode/vs/platform/action/common/actionCommon
26
26
  import { createAndFillInContextMenuActions } from 'vscode/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
27
27
  import { ViewContainerLocationToString, IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views';
28
28
  import { IPaneCompositePartService } from 'vscode/vscode/vs/workbench/services/panecomposite/browser/panecomposite';
29
- import { TitleBarStyleContext } from 'vscode/vscode/vs/workbench/common/contextkeys';
30
29
  import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions';
31
30
  import { IWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/common/environmentService';
32
31
 
@@ -319,13 +318,10 @@ registerAction2(class extends Action2 {
319
318
  },
320
319
  shortTitle: ( localizeWithPath('vs/workbench/browser/parts/activitybar/activitybarPart', 'side', "Side")),
321
320
  category: Categories.View,
322
- toggled: ( ContextKeyExpr.or(( ContextKeyExpr.equals(
321
+ toggled: ( ContextKeyExpr.equals(
323
322
  `config.${"workbench.activityBar.location" }`,
324
323
  "side"
325
- )), ( ContextKeyExpr.and(( ContextKeyExpr.equals(
326
- `config.${"workbench.activityBar.location" }`,
327
- "top"
328
- )), ( TitleBarStyleContext.isEqualTo('native')))))),
324
+ )),
329
325
  menu: [{
330
326
  id: MenuId.ActivityBarPositionMenu,
331
327
  order: 1
@@ -368,14 +364,13 @@ registerAction2(class extends Action2 {
368
364
  )),
369
365
  menu: [{
370
366
  id: MenuId.ActivityBarPositionMenu,
371
- when: ( TitleBarStyleContext.notEqualsTo('native')),
372
367
  order: 2
373
368
  }, {
374
369
  id: MenuId.CommandPalette,
375
- when: ( ContextKeyExpr.and(( ContextKeyExpr.notEquals(
370
+ when: ( ContextKeyExpr.notEquals(
376
371
  `config.${"workbench.activityBar.location" }`,
377
372
  "top"
378
- )), ( TitleBarStyleContext.notEqualsTo('native')))),
373
+ )),
379
374
  }]
380
375
  });
381
376
  }
@@ -488,11 +483,11 @@ registerAction2(class PreviousSideBarViewAction extends SwitchSideBarViewAction
488
483
  constructor() {
489
484
  super({
490
485
  id: 'workbench.action.previousSideBarView',
491
- title: { value: ( localizeWithPath(
486
+ title: ( localize2WithPath(
492
487
  'vs/workbench/browser/parts/activitybar/activitybarPart',
493
488
  'previousSideBarView',
494
- "Previous Primary Side Bar View"
495
- )), original: 'Previous Primary Side Bar View' },
489
+ 'Previous Primary Side Bar View'
490
+ )),
496
491
  category: Categories.View,
497
492
  f1: true
498
493
  }, -1);
@@ -502,11 +497,11 @@ registerAction2(class NextSideBarViewAction extends SwitchSideBarViewAction {
502
497
  constructor() {
503
498
  super({
504
499
  id: 'workbench.action.nextSideBarView',
505
- title: { value: ( localizeWithPath(
500
+ title: ( localize2WithPath(
506
501
  'vs/workbench/browser/parts/activitybar/activitybarPart',
507
502
  'nextSideBarView',
508
- "Next Primary Side Bar View"
509
- )), original: 'Next Primary Side Bar View' },
503
+ 'Next Primary Side Bar View'
504
+ )),
510
505
  category: Categories.View,
511
506
  f1: true
512
507
  }, 1);
@@ -516,11 +511,11 @@ registerAction2(class FocusActivityBarAction extends Action2 {
516
511
  constructor() {
517
512
  super({
518
513
  id: 'workbench.action.focusActivityBar',
519
- title: { value: ( localizeWithPath(
514
+ title: ( localize2WithPath(
520
515
  'vs/workbench/browser/parts/activitybar/activitybarPart',
521
516
  'focusActivityBar',
522
- "Focus Activity Bar"
523
- )), original: 'Focus Activity Bar' },
517
+ 'Focus Activity Bar'
518
+ )),
524
519
  category: Categories.View,
525
520
  f1: true
526
521
  });
@@ -1,6 +1,6 @@
1
1
  import n from '../../../../../../../../external/rollup-plugin-styles/dist/runtime/inject-css.js';
2
2
 
3
- var css = ".monaco-workbench.noauxiliarybar .part.auxiliarybar{display:none!important;visibility:hidden!important}.monaco-workbench .part.auxiliarybar>.content .monaco-editor,.monaco-workbench .part.auxiliarybar>.content .monaco-editor .margin,.monaco-workbench .part.auxiliarybar>.content .monaco-editor .monaco-editor-background{background-color:var(--vscode-sideBar-background)}.monaco-workbench .part.auxiliarybar>.title>.composite-bar-container{flex:1}.monaco-workbench .part.auxiliarybar>.title>.composite-bar-container>.composite-bar>.monaco-action-bar .action-item:focus .action-label,.monaco-workbench .part.auxiliarybar>.title>.composite-bar-container>.composite-bar>.monaco-action-bar .action-item:hover .action-label{color:var(--vscode-sideBarTitle-foreground)!important}.monaco-workbench .part.auxiliarybar>.title>.composite-bar-container>.composite-bar>.monaco-action-bar .action-item.checked .action-label,.monaco-workbench .part.auxiliarybar>.title>.composite-bar-container>.composite-bar>.monaco-action-bar .action-item:hover .action-label{outline:var(--vscode-contrastActiveBorder,unset) solid 1px!important}.monaco-workbench .part.auxiliarybar>.title>.composite-bar-container>.composite-bar>.monaco-action-bar .action-item:not(.checked):hover .action-label{outline:var(--vscode-contrastActiveBorder,unset) dashed 1px!important}.monaco-workbench .auxiliarybar.part.pane-composite-part>.composite.title.has-composite-bar>.title-actions{flex:inherit}.monaco-workbench .auxiliarybar.pane-composite-part>.title.has-composite-bar>.title-actions .monaco-action-bar .action-item{max-width:150px}";
3
+ var css = ".monaco-workbench.noauxiliarybar .part.auxiliarybar{display:none!important;visibility:hidden!important}.monaco-workbench .part.auxiliarybar>.content .monaco-editor,.monaco-workbench .part.auxiliarybar>.content .monaco-editor .margin,.monaco-workbench .part.auxiliarybar>.content .monaco-editor .monaco-editor-background{background-color:var(--vscode-sideBar-background)}.monaco-workbench .part.auxiliarybar>.title>.composite-bar-container{flex:1}.monaco-workbench .part.auxiliarybar>.title>.composite-bar-container>.composite-bar>.monaco-action-bar .action-item.checked.clicked:focus .active-item-indicator:before,.monaco-workbench .part.auxiliarybar>.title>.composite-bar-container>.composite-bar>.monaco-action-bar .action-item.checked:not(:focus) .active-item-indicator:before{border-top-color:var(--vscode-panelTitle-activeBorder)!important}.monaco-workbench .part.auxiliarybar>.title>.composite-bar-container>.composite-bar>.monaco-action-bar .action-item:focus .action-label,.monaco-workbench .part.auxiliarybar>.title>.composite-bar-container>.composite-bar>.monaco-action-bar .action-item:hover .action-label{color:var(--vscode-sideBarTitle-foreground)!important}.monaco-workbench .part.auxiliarybar>.title>.composite-bar-container>.composite-bar>.monaco-action-bar .action-item.checked .action-label,.monaco-workbench .part.auxiliarybar>.title>.composite-bar-container>.composite-bar>.monaco-action-bar .action-item:hover .action-label{outline:var(--vscode-contrastActiveBorder,unset) solid 1px!important}.monaco-workbench .part.auxiliarybar>.title>.composite-bar-container>.composite-bar>.monaco-action-bar .action-item:not(.checked):hover .action-label{outline:var(--vscode-contrastActiveBorder,unset) dashed 1px!important}.monaco-workbench .auxiliarybar.part.pane-composite-part>.composite.title.has-composite-bar>.title-actions{flex:inherit}.monaco-workbench .auxiliarybar.pane-composite-part>.title.has-composite-bar>.title-actions .monaco-action-bar .action-item{max-width:150px}";
4
4
  n(css,{});
5
5
 
6
6
  export { css, css as default };