@codingame/monaco-vscode-views-service-override 1.82.6 → 1.83.1

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 (39) hide show
  1. package/assets/index-no-csp.html +2 -1
  2. package/assets/index.html +3 -2
  3. package/package.json +4 -4
  4. package/views.js +1 -1
  5. package/vscode/src/vs/base/browser/ui/grid/gridview.js +31 -12
  6. package/vscode/src/vs/base/common/codicons.d.ts +1 -1
  7. package/vscode/src/vs/platform/actions/browser/toolbar.d.ts +7 -2
  8. package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +2 -1
  9. package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarActions.js +26 -28
  10. package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.d.ts +4 -2
  11. package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js +19 -8
  12. package/vscode/src/vs/workbench/browser/parts/activitybar/media/activityaction.css.js +1 -1
  13. package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsControl.js +44 -1
  14. package/vscode/src/vs/workbench/browser/parts/editor/editorDropTarget.js +18 -18
  15. package/vscode/src/vs/workbench/browser/parts/editor/editorGroupView.js +82 -91
  16. package/vscode/src/vs/workbench/browser/parts/editor/editorPart.js +15 -13
  17. package/vscode/src/vs/workbench/browser/parts/editor/{titleControl.js → editorTabsControl.js} +69 -87
  18. package/vscode/src/vs/workbench/browser/parts/editor/editorTitleControl.js +152 -0
  19. package/vscode/src/vs/workbench/browser/parts/editor/media/{titlecontrol.css.js → editortabscontrol.css.js} +1 -1
  20. package/vscode/src/vs/workbench/browser/parts/editor/media/editortitlecontrol.css.js +6 -0
  21. package/vscode/src/vs/workbench/browser/parts/editor/media/multieditortabscontrol.css.js +6 -0
  22. package/vscode/src/vs/workbench/browser/parts/editor/media/singleeditortabscontrol.css.js +6 -0
  23. package/vscode/src/vs/workbench/browser/parts/editor/{tabsTitleControl.js → multiEditorTabsControl.js} +265 -252
  24. package/vscode/src/vs/workbench/browser/parts/editor/multiRowEditorTabsControl.js +152 -0
  25. package/vscode/src/vs/workbench/browser/parts/editor/{noTabsTitleControl.js → singleEditorTabsControl.js} +39 -31
  26. package/vscode/src/vs/workbench/browser/parts/views/checkbox.js +1 -0
  27. package/vscode/src/vs/workbench/browser/parts/views/treeView.js +10 -13
  28. package/vscode/src/vs/workbench/common/editor/filteredEditorGroupModel.js +109 -0
  29. package/vscode/src/vs/workbench/contrib/customEditor/common/customEditorModelManager.js +2 -2
  30. package/vscode/src/vs/workbench/contrib/files/browser/editors/fileEditorInput.js +1 -1
  31. package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +3 -3
  32. package/vscode/src/vs/workbench/contrib/webview/browser/themeing.js +2 -2
  33. package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +1 -1
  34. package/vscode/src/vs/workbench/services/history/browser/historyService.js +11 -0
  35. package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfileIcons.js +7 -0
  36. package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +15 -8
  37. package/vscode/src/vs/workbench/services/views/common/viewContainerModel.js +9 -14
  38. package/vscode/src/vs/workbench/browser/parts/editor/media/notabstitlecontrol.css.js +0 -6
  39. package/vscode/src/vs/workbench/browser/parts/editor/media/tabstitlecontrol.css.js +0 -6
@@ -0,0 +1,152 @@
1
+ import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
+ import { Dimension } from 'monaco-editor/esm/vs/base/browser/dom.js';
3
+ import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
4
+ import { MultiEditorTabsControl } from './multiEditorTabsControl.js';
5
+ import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
6
+ import { StickyEditorGroupModel, UnstickyEditorGroupModel } from '../../../common/editor/filteredEditorGroupModel.js';
7
+
8
+ let MultiRowEditorControl = class MultiRowEditorControl extends Disposable {
9
+ constructor(parent, groupsView, groupView, model, instantiationService) {
10
+ super();
11
+ this.parent = parent;
12
+ this.groupsView = groupsView;
13
+ this.groupView = groupView;
14
+ this.model = model;
15
+ this.instantiationService = instantiationService;
16
+ const stickyModel = this._register(( new StickyEditorGroupModel(this.model)));
17
+ const unstickyModel = this._register(( new UnstickyEditorGroupModel(this.model)));
18
+ this.stickyEditorTabsControl = this._register(this.instantiationService.createInstance(MultiEditorTabsControl, this.parent, this.groupsView, this.groupView, stickyModel));
19
+ this.unstickyEditorTabsControl = this._register(this.instantiationService.createInstance(MultiEditorTabsControl, this.parent, this.groupsView, this.groupView, unstickyModel));
20
+ this.handlePinnedTabsSeparateRowToolbars();
21
+ }
22
+ handlePinnedTabsSeparateRowToolbars() {
23
+ if (this.groupView.count === 0) {
24
+ return;
25
+ }
26
+ if (this.groupView.count === this.groupView.stickyCount) {
27
+ this.parent.classList.toggle('two-tab-bars', false);
28
+ }
29
+ else {
30
+ this.parent.classList.toggle('two-tab-bars', true);
31
+ }
32
+ }
33
+ getEditorTabsController(editor) {
34
+ return this.model.isSticky(editor) ? this.stickyEditorTabsControl : this.unstickyEditorTabsControl;
35
+ }
36
+ openEditor(editor, options) {
37
+ const [editorTabController, otherTabController] = this.model.isSticky(editor) ? [this.stickyEditorTabsControl, this.unstickyEditorTabsControl] : [this.unstickyEditorTabsControl, this.stickyEditorTabsControl];
38
+ const didChange = editorTabController.openEditor(editor, options);
39
+ if (didChange) {
40
+ otherTabController.openEditors([]);
41
+ this.handleOpenedEditors();
42
+ }
43
+ return didChange;
44
+ }
45
+ openEditors(editors) {
46
+ const stickyEditors = editors.filter(e => this.model.isSticky(e));
47
+ const unstickyEditors = editors.filter(e => !this.model.isSticky(e));
48
+ const didChangeOpenEditorsSticky = this.stickyEditorTabsControl.openEditors(stickyEditors);
49
+ const didChangeOpenEditorsUnSticky = this.unstickyEditorTabsControl.openEditors(unstickyEditors);
50
+ const didChange = didChangeOpenEditorsSticky || didChangeOpenEditorsUnSticky;
51
+ if (didChange) {
52
+ this.handleOpenedEditors();
53
+ }
54
+ return didChange;
55
+ }
56
+ handleOpenedEditors() {
57
+ this.handlePinnedTabsSeparateRowToolbars();
58
+ }
59
+ beforeCloseEditor(editor) {
60
+ this.getEditorTabsController(editor).beforeCloseEditor(editor);
61
+ }
62
+ closeEditor(editor) {
63
+ this.stickyEditorTabsControl.closeEditor(editor);
64
+ this.unstickyEditorTabsControl.closeEditor(editor);
65
+ this.handleClosedEditors();
66
+ }
67
+ closeEditors(editors) {
68
+ const stickyEditors = editors.filter(e => this.model.isSticky(e));
69
+ const unstickyEditors = editors.filter(e => !this.model.isSticky(e));
70
+ this.stickyEditorTabsControl.closeEditors(stickyEditors);
71
+ this.unstickyEditorTabsControl.closeEditors(unstickyEditors);
72
+ this.handleClosedEditors();
73
+ }
74
+ handleClosedEditors() {
75
+ this.handlePinnedTabsSeparateRowToolbars();
76
+ }
77
+ moveEditor(editor, fromIndex, targetIndex, stickyStateChange) {
78
+ if (stickyStateChange) {
79
+ if (this.model.isSticky(editor)) {
80
+ this.stickyEditorTabsControl.openEditor(editor);
81
+ this.unstickyEditorTabsControl.closeEditor(editor);
82
+ }
83
+ else {
84
+ this.stickyEditorTabsControl.closeEditor(editor);
85
+ this.unstickyEditorTabsControl.openEditor(editor);
86
+ }
87
+ this.handlePinnedTabsSeparateRowToolbars();
88
+ }
89
+ else {
90
+ if (this.model.isSticky(editor)) {
91
+ this.stickyEditorTabsControl.moveEditor(editor, fromIndex, targetIndex, stickyStateChange);
92
+ }
93
+ else {
94
+ this.unstickyEditorTabsControl.moveEditor(editor, fromIndex - this.model.stickyCount, targetIndex - this.model.stickyCount, stickyStateChange);
95
+ }
96
+ }
97
+ }
98
+ pinEditor(editor) {
99
+ this.getEditorTabsController(editor).pinEditor(editor);
100
+ }
101
+ stickEditor(editor) {
102
+ this.unstickyEditorTabsControl.closeEditor(editor);
103
+ this.stickyEditorTabsControl.openEditor(editor);
104
+ this.handlePinnedTabsSeparateRowToolbars();
105
+ }
106
+ unstickEditor(editor) {
107
+ this.stickyEditorTabsControl.closeEditor(editor);
108
+ this.unstickyEditorTabsControl.openEditor(editor);
109
+ this.handlePinnedTabsSeparateRowToolbars();
110
+ }
111
+ setActive(isActive) {
112
+ this.stickyEditorTabsControl.setActive(isActive);
113
+ this.unstickyEditorTabsControl.setActive(isActive);
114
+ }
115
+ updateEditorLabel(editor) {
116
+ this.getEditorTabsController(editor).updateEditorLabel(editor);
117
+ }
118
+ updateEditorDirty(editor) {
119
+ this.getEditorTabsController(editor).updateEditorDirty(editor);
120
+ }
121
+ updateOptions(oldOptions, newOptions) {
122
+ this.stickyEditorTabsControl.updateOptions(oldOptions, newOptions);
123
+ this.unstickyEditorTabsControl.updateOptions(oldOptions, newOptions);
124
+ }
125
+ layout(dimensions) {
126
+ const stickyDimensions = this.stickyEditorTabsControl.layout(dimensions);
127
+ const unstickyAvailableDimensions = {
128
+ container: dimensions.container,
129
+ available: ( new Dimension(
130
+ dimensions.available.width,
131
+ dimensions.available.height - stickyDimensions.height
132
+ ))
133
+ };
134
+ const unstickyDimensions = this.unstickyEditorTabsControl.layout(unstickyAvailableDimensions);
135
+ return ( new Dimension(
136
+ dimensions.container.width,
137
+ stickyDimensions.height + unstickyDimensions.height
138
+ ));
139
+ }
140
+ getHeight() {
141
+ return this.stickyEditorTabsControl.getHeight() + this.unstickyEditorTabsControl.getHeight();
142
+ }
143
+ dispose() {
144
+ this.parent.classList.toggle('two-tab-bars', false);
145
+ super.dispose();
146
+ }
147
+ };
148
+ MultiRowEditorControl = ( __decorate([
149
+ ( __param(4, IInstantiationService))
150
+ ], MultiRowEditorControl));
151
+
152
+ export { MultiRowEditorControl };
@@ -1,6 +1,6 @@
1
- import './media/notabstitlecontrol.css.js';
1
+ import './media/singleeditortabscontrol.css.js';
2
2
  import { preventEditorClose, EditorCloseMethod, EditorResourceAccessor, SideBySideEditor } from 'vscode/vscode/vs/workbench/common/editor';
3
- import { TitleControl } from './titleControl.js';
3
+ import { EditorTabsControl } from './editorTabsControl.js';
4
4
  import { ResourceLabel } from 'vscode/vscode/vs/workbench/browser/labels';
5
5
  import { TAB_ACTIVE_FOREGROUND, TAB_UNFOCUSED_ACTIVE_FOREGROUND } from 'vscode/vscode/vs/workbench/common/theme';
6
6
  import { Gesture, EventType as EventType$1 } from 'monaco-editor/esm/vs/base/browser/touch.js';
@@ -11,14 +11,16 @@ import { assertIsDefined, assertAllDefined } from 'monaco-editor/esm/vs/base/com
11
11
  import { equals } from 'monaco-editor/esm/vs/base/common/objects.js';
12
12
  import { toDisposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
13
13
  import { defaultBreadcrumbsWidgetStyles } from 'monaco-editor/esm/vs/platform/theme/browser/defaultStyles.js';
14
+ import { BreadcrumbsControlFactory } from './breadcrumbsControl.js';
14
15
 
15
- class NoTabsTitleControl extends TitleControl {
16
+ class SingleEditorTabsControl extends EditorTabsControl {
16
17
  constructor() {
17
18
  super(...arguments);
18
19
  this.activeLabel = Object.create(null);
19
20
  }
20
- static { this.HEIGHT = 35; }
21
+ get breadcrumbsControl() { return this.breadcrumbsControlFactory?.control; }
21
22
  create(parent) {
23
+ super.create(parent);
22
24
  const titleContainer = this.titleContainer = parent;
23
25
  titleContainer.draggable = true;
24
26
  this.registerContainerListeners(titleContainer);
@@ -28,7 +30,14 @@ class NoTabsTitleControl extends TitleControl {
28
30
  titleContainer.appendChild(labelContainer);
29
31
  this.editorLabel = this._register(this.instantiationService.createInstance(ResourceLabel, labelContainer, undefined)).element;
30
32
  this._register(addDisposableListener(this.editorLabel.element, EventType.CLICK, e => this.onTitleLabelClick(e)));
31
- this.createBreadcrumbsControl(labelContainer, { showFileIcons: false, showSymbolIcons: true, showDecorationColors: false, widgetStyles: { ...defaultBreadcrumbsWidgetStyles, breadcrumbsBackground: ( Color.transparent.toString()) }, showPlaceholder: false });
33
+ this.breadcrumbsControlFactory = this._register(this.instantiationService.createInstance(BreadcrumbsControlFactory, labelContainer, this.groupView, {
34
+ showFileIcons: false,
35
+ showSymbolIcons: true,
36
+ showDecorationColors: false,
37
+ widgetStyles: { ...defaultBreadcrumbsWidgetStyles, breadcrumbsBackground: ( Color.transparent.toString()) },
38
+ showPlaceholder: false
39
+ }));
40
+ this._register(this.breadcrumbsControlFactory.onDidEnablementChange(() => this.handleBreadcrumbsEnablementChange()));
32
41
  titleContainer.classList.toggle('breadcrumbs', Boolean(this.breadcrumbsControl));
33
42
  this._register(toDisposable(() => titleContainer.classList.remove('breadcrumbs')));
34
43
  const actionsContainer = document.createElement('div');
@@ -43,8 +52,8 @@ class NoTabsTitleControl extends TitleControl {
43
52
  this._register(addDisposableListener(titleContainer, EventType$1.Tap, (e) => this.onTitleTap(e)));
44
53
  for (const event of [EventType.CONTEXT_MENU, EventType$1.Contextmenu]) {
45
54
  this._register(addDisposableListener(titleContainer, event, e => {
46
- if (this.group.activeEditor) {
47
- this.onContextMenu(this.group.activeEditor, e, titleContainer);
55
+ if (this.tabsModel.activeEditor) {
56
+ this.onTabContextMenu(this.tabsModel.activeEditor, e, titleContainer);
48
57
  }
49
58
  }));
50
59
  }
@@ -55,13 +64,13 @@ class NoTabsTitleControl extends TitleControl {
55
64
  }
56
65
  onTitleDoubleClick(e) {
57
66
  EventHelper.stop(e);
58
- this.group.pinEditor();
67
+ this.groupView.pinEditor();
59
68
  }
60
69
  onTitleAuxClick(e) {
61
- if (e.button === 1 && this.group.activeEditor) {
70
+ if (e.button === 1 && this.tabsModel.activeEditor) {
62
71
  EventHelper.stop(e, true );
63
- if (!preventEditorClose(this.group, this.group.activeEditor, EditorCloseMethod.MOUSE, this.accessor.partOptions)) {
64
- this.group.closeEditor(this.group.activeEditor);
72
+ if (!preventEditorClose(this.tabsModel, this.tabsModel.activeEditor, EditorCloseMethod.MOUSE, this.groupsView.partOptions)) {
73
+ this.groupView.closeEditor(this.tabsModel.activeEditor);
65
74
  }
66
75
  }
67
76
  }
@@ -73,16 +82,17 @@ class NoTabsTitleControl extends TitleControl {
73
82
  setTimeout(() => this.quickInputService.quickAccess.show(), 50);
74
83
  }
75
84
  openEditor(editor) {
76
- this.doHandleOpenEditor();
85
+ return this.doHandleOpenEditor();
77
86
  }
78
87
  openEditors(editors) {
79
- this.doHandleOpenEditor();
88
+ return this.doHandleOpenEditor();
80
89
  }
81
90
  doHandleOpenEditor() {
82
91
  const activeEditorChanged = this.ifActiveEditorChanged(() => this.redraw());
83
92
  if (!activeEditorChanged) {
84
93
  this.ifActiveEditorPropertiesChanged(() => this.redraw());
85
94
  }
95
+ return activeEditorChanged;
86
96
  }
87
97
  beforeCloseEditor(editor) {
88
98
  }
@@ -120,6 +130,7 @@ class NoTabsTitleControl extends TitleControl {
120
130
  });
121
131
  }
122
132
  updateOptions(oldOptions, newOptions) {
133
+ super.updateOptions(oldOptions, newOptions);
123
134
  if (oldOptions.labelFormat !== newOptions.labelFormat || !equals(oldOptions.decorations, newOptions.decorations)) {
124
135
  this.redraw();
125
136
  }
@@ -133,9 +144,9 @@ class NoTabsTitleControl extends TitleControl {
133
144
  this.redraw();
134
145
  }
135
146
  ifActiveEditorChanged(fn) {
136
- if (!this.activeLabel.editor && this.group.activeEditor ||
137
- this.activeLabel.editor && !this.group.activeEditor ||
138
- (!this.activeLabel.editor || !this.group.isActive(this.activeLabel.editor))
147
+ if (!this.activeLabel.editor && this.tabsModel.activeEditor ||
148
+ this.activeLabel.editor && !this.tabsModel.activeEditor ||
149
+ (!this.activeLabel.editor || !this.tabsModel.isActive(this.activeLabel.editor))
139
150
  ) {
140
151
  fn();
141
152
  return true;
@@ -143,23 +154,23 @@ class NoTabsTitleControl extends TitleControl {
143
154
  return false;
144
155
  }
145
156
  ifActiveEditorPropertiesChanged(fn) {
146
- if (!this.activeLabel.editor || !this.group.activeEditor) {
157
+ if (!this.activeLabel.editor || !this.tabsModel.activeEditor) {
147
158
  return;
148
159
  }
149
- if (this.activeLabel.pinned !== this.group.isPinned(this.group.activeEditor)) {
160
+ if (this.activeLabel.pinned !== this.tabsModel.isPinned(this.tabsModel.activeEditor)) {
150
161
  fn();
151
162
  }
152
163
  }
153
164
  ifEditorIsActive(editor, fn) {
154
- if (this.group.isActive(editor)) {
165
+ if (this.tabsModel.isActive(editor)) {
155
166
  fn();
156
167
  }
157
168
  }
158
169
  redraw() {
159
- const editor = this.group.activeEditor ?? undefined;
160
- const options = this.accessor.partOptions;
161
- const isEditorPinned = editor ? this.group.isPinned(editor) : false;
162
- const isGroupActive = this.accessor.activeGroup === this.group;
170
+ const editor = this.tabsModel.activeEditor ?? undefined;
171
+ const options = this.groupsView.partOptions;
172
+ const isEditorPinned = editor ? this.tabsModel.isPinned(editor) : false;
173
+ const isGroupActive = this.groupsView.activeGroup === this.groupView;
163
174
  this.activeLabel = { editor, pinned: isEditorPinned };
164
175
  if (this.breadcrumbsControl) {
165
176
  if (isGroupActive) {
@@ -178,7 +189,7 @@ class NoTabsTitleControl extends TitleControl {
178
189
  }
179
190
  else {
180
191
  this.updateEditorDirty(editor);
181
- const { labelFormat } = this.accessor.partOptions;
192
+ const { labelFormat } = this.groupsView.partOptions;
182
193
  let description;
183
194
  if (this.breadcrumbsControl && !this.breadcrumbsControl.isHidden()) {
184
195
  description = '';
@@ -223,7 +234,7 @@ class NoTabsTitleControl extends TitleControl {
223
234
  }
224
235
  }
225
236
  prepareEditorActions(editorActions) {
226
- const isGroupActive = this.accessor.activeGroup === this.group;
237
+ const isGroupActive = this.groupsView.activeGroup === this.groupView;
227
238
  if (isGroupActive) {
228
239
  return editorActions;
229
240
  }
@@ -235,15 +246,12 @@ class NoTabsTitleControl extends TitleControl {
235
246
  }
236
247
  }
237
248
  getHeight() {
238
- return {
239
- total: NoTabsTitleControl.HEIGHT,
240
- offset: 0
241
- };
249
+ return this.tabHeight;
242
250
  }
243
251
  layout(dimensions) {
244
252
  this.breadcrumbsControl?.layout(undefined);
245
- return ( new Dimension(dimensions.container.width, this.getHeight().total));
253
+ return ( new Dimension(dimensions.container.width, this.getHeight()));
246
254
  }
247
255
  }
248
256
 
249
- export { NoTabsTitleControl };
257
+ export { SingleEditorTabsControl };
@@ -50,6 +50,7 @@ class TreeItemCheckbox extends Disposable {
50
50
  this.setHover(node.checkbox);
51
51
  this.setAccessibilityInformation(node.checkbox);
52
52
  this.toggle.domNode.classList.add(TreeItemCheckbox.checkboxClass);
53
+ this.toggle.domNode.tabIndex = 1;
53
54
  dom.append(this.checkboxContainer, this.toggle.domNode);
54
55
  this.registerListener(node);
55
56
  }
@@ -98,7 +98,7 @@ let TreeViewPane = class TreeViewPane extends ViewPane {
98
98
  this.renderTreeView(container);
99
99
  }
100
100
  shouldShowWelcome() {
101
- return ((this.treeView.dataProvider === undefined) || !!this.treeView.dataProvider.isTreeEmpty) && (this.treeView.message === undefined);
101
+ return ((this.treeView.dataProvider === undefined) || !!this.treeView.dataProvider.isTreeEmpty) && ((this.treeView.message === undefined) || (this.treeView.message === ''));
102
102
  }
103
103
  layoutBody(height, width) {
104
104
  super.layoutBody(height, width);
@@ -807,7 +807,7 @@ let AbstractTreeView = class AbstractTreeView extends Disposable {
807
807
  this.focus(true, item);
808
808
  this.tree.setFocus([item]);
809
809
  }
810
- else {
810
+ else if (this.tree.getFocus().length === 0) {
811
811
  this.tree.setFocus([]);
812
812
  }
813
813
  }
@@ -1090,10 +1090,7 @@ let TreeRenderer = class TreeRenderer extends Disposable {
1090
1090
  }
1091
1091
  }
1092
1092
  templateData.actionBar.context = { $treeViewId: this.treeViewId, $treeItemHandle: node.handle };
1093
- const menuActions = this.menus.getResourceActions(node);
1094
- if (menuActions.menu) {
1095
- templateData.elementDisposable.add(menuActions.menu);
1096
- }
1093
+ const menuActions = this.menus.getResourceActions(node, templateData.elementDisposable);
1097
1094
  templateData.actionBar.push(menuActions.actions, { icon: true, label: false });
1098
1095
  if (this._actionRunner) {
1099
1096
  templateData.actionBar.actionRunner = this._actionRunner;
@@ -1329,16 +1326,15 @@ class MultipleSelectionActionRunner extends ActionRunner {
1329
1326
  await action.run(context, selectionHandleArgs);
1330
1327
  }
1331
1328
  }
1332
- let TreeMenus = class TreeMenus extends Disposable {
1329
+ let TreeMenus = class TreeMenus {
1333
1330
  constructor(id, menuService) {
1334
- super();
1335
1331
  this.id = id;
1336
1332
  this.menuService = menuService;
1337
1333
  this._onDidChange = ( new Emitter());
1338
1334
  this.onDidChange = this._onDidChange.event;
1339
1335
  }
1340
- getResourceActions(element) {
1341
- const actions = this.getActions(MenuId.ViewItemContext, element, true);
1336
+ getResourceActions(element, disposableStore) {
1337
+ const actions = this.getActions(MenuId.ViewItemContext, element, disposableStore);
1342
1338
  return { menu: actions.menu, actions: actions.primary };
1343
1339
  }
1344
1340
  getResourceContextActions(element) {
@@ -1347,7 +1343,7 @@ let TreeMenus = class TreeMenus extends Disposable {
1347
1343
  setContextKeyService(service) {
1348
1344
  this.contextKeyService = service;
1349
1345
  }
1350
- getActions(menuId, element, listen = false) {
1346
+ getActions(menuId, element, listen) {
1351
1347
  if (!this.contextKeyService) {
1352
1348
  return { primary: [], secondary: [] };
1353
1349
  }
@@ -1361,7 +1357,8 @@ let TreeMenus = class TreeMenus extends Disposable {
1361
1357
  const result = { primary, secondary, menu };
1362
1358
  createAndFillInContextMenuActions(menu, { shouldForwardArgs: true }, result, 'inline');
1363
1359
  if (listen) {
1364
- this._register(menu.onDidChange(() => this._onDidChange.fire(element)));
1360
+ listen.add(menu.onDidChange(() => this._onDidChange.fire(element)));
1361
+ listen.add(menu);
1365
1362
  }
1366
1363
  else {
1367
1364
  menu.dispose();
@@ -1370,7 +1367,6 @@ let TreeMenus = class TreeMenus extends Disposable {
1370
1367
  }
1371
1368
  dispose() {
1372
1369
  this.contextKeyService = undefined;
1373
- super.dispose();
1374
1370
  }
1375
1371
  };
1376
1372
  TreeMenus = ( __decorate([
@@ -1580,6 +1576,7 @@ let CustomTreeViewDragAndDrop = class CustomTreeViewDragAndDrop {
1580
1576
  this.dragCancellationToken?.cancel();
1581
1577
  }
1582
1578
  }
1579
+ dispose() { }
1583
1580
  };
1584
1581
  CustomTreeViewDragAndDrop = ( __decorate([
1585
1582
  ( __param(1, ILabelService)),
@@ -0,0 +1,109 @@
1
+ import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
2
+ import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
3
+
4
+ class FilteredEditorGroupModel extends Disposable {
5
+ constructor(model) {
6
+ super();
7
+ this.model = model;
8
+ this._onDidModelChange = this._register(( new Emitter()));
9
+ this.onDidModelChange = this._onDidModelChange.event;
10
+ this._register(this.model.onDidModelChange(e => {
11
+ const candidateOrIndex = e.editorIndex ?? e.editor;
12
+ if (candidateOrIndex !== undefined) {
13
+ if (!this.filter(candidateOrIndex)) {
14
+ return;
15
+ }
16
+ }
17
+ this._onDidModelChange.fire(e);
18
+ }));
19
+ }
20
+ get id() { return this.model.id; }
21
+ get isLocked() { return this.model.isLocked; }
22
+ get stickyCount() { return this.model.stickyCount; }
23
+ get activeEditor() { return this.model.activeEditor && this.filter(this.model.activeEditor) ? this.model.activeEditor : null; }
24
+ get previewEditor() { return this.model.previewEditor && this.filter(this.model.previewEditor) ? this.model.previewEditor : null; }
25
+ isPinned(editorOrIndex) { return this.model.isPinned(editorOrIndex); }
26
+ isSticky(editorOrIndex) { return this.model.isSticky(editorOrIndex); }
27
+ isActive(editor) { return this.model.isActive(editor); }
28
+ isFirst(editor) {
29
+ return this.model.isFirst(editor, this.getEditors(1 ));
30
+ }
31
+ isLast(editor) {
32
+ return this.model.isLast(editor, this.getEditors(1 ));
33
+ }
34
+ getEditors(order, options) {
35
+ const editors = this.model.getEditors(order, options);
36
+ return editors.filter(e => this.filter(e));
37
+ }
38
+ findEditor(candidate, options) {
39
+ const result = this.model.findEditor(candidate, options);
40
+ if (!result) {
41
+ return undefined;
42
+ }
43
+ return this.filter(result[1]) ? result : undefined;
44
+ }
45
+ }
46
+ class StickyEditorGroupModel extends FilteredEditorGroupModel {
47
+ get count() { return this.model.stickyCount; }
48
+ getEditors(order, options) {
49
+ if (options?.excludeSticky) {
50
+ return [];
51
+ }
52
+ if (order === 1 ) {
53
+ return this.model.getEditors(1 ).slice(0, this.model.stickyCount);
54
+ }
55
+ return super.getEditors(order, options);
56
+ }
57
+ isSticky(editorOrIndex) {
58
+ return true;
59
+ }
60
+ getEditorByIndex(index) {
61
+ return index < this.count ? this.model.getEditorByIndex(index) : undefined;
62
+ }
63
+ indexOf(editor, editors, options) {
64
+ const editorIndex = this.model.indexOf(editor, editors, options);
65
+ if (editorIndex < 0 || editorIndex >= this.model.stickyCount) {
66
+ return -1;
67
+ }
68
+ return editorIndex;
69
+ }
70
+ contains(candidate, options) {
71
+ const editorIndex = this.model.indexOf(candidate, undefined, options);
72
+ return editorIndex >= 0 && editorIndex < this.model.stickyCount;
73
+ }
74
+ filter(candidateOrIndex) {
75
+ return this.model.isSticky(candidateOrIndex);
76
+ }
77
+ }
78
+ class UnstickyEditorGroupModel extends FilteredEditorGroupModel {
79
+ get count() { return this.model.count - this.model.stickyCount; }
80
+ get stickyCount() { return 0; }
81
+ isSticky(editorOrIndex) {
82
+ return false;
83
+ }
84
+ getEditors(order, options) {
85
+ if (order === 1 ) {
86
+ return this.model.getEditors(1 ).slice(this.model.stickyCount);
87
+ }
88
+ return super.getEditors(order, options);
89
+ }
90
+ getEditorByIndex(index) {
91
+ return index >= 0 ? this.model.getEditorByIndex(index + this.model.stickyCount) : undefined;
92
+ }
93
+ indexOf(editor, editors, options) {
94
+ const editorIndex = this.model.indexOf(editor, editors, options);
95
+ if (editorIndex < this.model.stickyCount || editorIndex >= this.model.count) {
96
+ return -1;
97
+ }
98
+ return editorIndex - this.model.stickyCount;
99
+ }
100
+ contains(candidate, options) {
101
+ const editorIndex = this.model.indexOf(candidate, undefined, options);
102
+ return editorIndex >= this.model.stickyCount && editorIndex < this.model.count;
103
+ }
104
+ filter(candidateOrIndex) {
105
+ return !this.model.isSticky(candidateOrIndex);
106
+ }
107
+ }
108
+
109
+ export { StickyEditorGroupModel, UnstickyEditorGroupModel };
@@ -1,4 +1,4 @@
1
- import { once } from 'monaco-editor/esm/vs/base/common/functional.js';
1
+ import { createSingleCallFunction } from 'monaco-editor/esm/vs/base/common/functional.js';
2
2
 
3
3
  class CustomEditorModelManager {
4
4
  constructor() {
@@ -29,7 +29,7 @@ class CustomEditorModelManager {
29
29
  return entry.model.then(model => {
30
30
  return {
31
31
  object: model,
32
- dispose: once(() => {
32
+ dispose: createSingleCallFunction(() => {
33
33
  if (--entry.counter <= 0) {
34
34
  entry.model.then(x => x.dispose());
35
35
  this._references.delete(key);
@@ -278,7 +278,7 @@ let FileEditorInput = FileEditorInput_1 = class FileEditorInput extends Abstract
278
278
  untypedInput.languageId = this.getLanguageId();
279
279
  untypedInput.contents = (() => {
280
280
  const model = this.textFileService.files.get(this.resource);
281
- if (model?.isDirty()) {
281
+ if (model?.isDirty() && !model.textEditorModel.isTooLargeForHeapOperation()) {
282
282
  return model.textEditorModel.getValue();
283
283
  }
284
284
  return undefined;
@@ -22,7 +22,7 @@ import { TunnelType, TUNNEL_VIEW_ID, TunnelEditId, IRemoteExplorerService } from
22
22
  import { IClipboardService } from 'monaco-editor/esm/vs/platform/clipboard/common/clipboardService.js';
23
23
  import { Severity, INotificationService } from 'monaco-editor/esm/vs/platform/notification/common/notification.js';
24
24
  import { InputBox } from 'monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.js';
25
- import { once } from 'monaco-editor/esm/vs/base/common/functional.js';
25
+ import { createSingleCallFunction } from 'monaco-editor/esm/vs/base/common/functional.js';
26
26
  import { IThemeService } from 'monaco-editor/esm/vs/platform/theme/common/themeService.js';
27
27
  import { ThemeIcon } from 'monaco-editor/esm/vs/base/common/themables.js';
28
28
  import { ViewPane } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPane';
@@ -385,7 +385,7 @@ let ActionBarRenderer = class ActionBarRenderer extends Disposable {
385
385
  inputBox.value = value;
386
386
  inputBox.focus();
387
387
  inputBox.select({ start: 0, end: editableData.startingValue ? editableData.startingValue.length : 0 });
388
- const done = once(async (success, finishEditing) => {
388
+ const done = createSingleCallFunction(async (success, finishEditing) => {
389
389
  dispose(toDispose);
390
390
  if (this.inputDone) {
391
391
  this.inputDone = undefined;
@@ -1320,7 +1320,7 @@ var ChangeLocalPortAction;
1320
1320
  ChangeLocalPortAction.LABEL = ( (nls.localize('remote.tunnel.changeLocalPort', "Change Local Address Port")));
1321
1321
  function validateInput(tunnelService, value, canElevate) {
1322
1322
  if (!value.match(/^[0-9]+$/)) {
1323
- return { content: invalidPortString, severity: Severity.Error };
1323
+ return { content: ( (nls.localize('remote.tunnelsView.portShouldBeNumber', "Local port should be a number."))), severity: Severity.Error };
1324
1324
  }
1325
1325
  else if (Number(value) >= maxPortNumber) {
1326
1326
  return { content: invalidPortNumberString, severity: Severity.Error };
@@ -3,7 +3,7 @@ import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
3
3
  import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
4
4
  import { EDITOR_FONT_DEFAULTS } from 'monaco-editor/esm/vs/editor/common/config/editorOptions.js';
5
5
  import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
6
- import * as colors from 'monaco-editor/esm/vs/platform/theme/common/colorRegistry.js';
6
+ import * as colorRegistry from 'monaco-editor/esm/vs/platform/theme/common/colorRegistry.js';
7
7
  import { ColorScheme } from 'monaco-editor/esm/vs/platform/theme/common/theme.js';
8
8
  import { IWorkbenchThemeService } from 'vscode/vscode/vs/workbench/services/themes/common/workbenchThemeService';
9
9
  import { DEFAULT_FONT_FAMILY } from 'vscode/vscode/vs/workbench/browser/style';
@@ -36,7 +36,7 @@ let WebviewThemeDataProvider = class WebviewThemeDataProvider extends Disposable
36
36
  const editorFontWeight = configuration.fontWeight || EDITOR_FONT_DEFAULTS.fontWeight;
37
37
  const editorFontSize = configuration.fontSize || EDITOR_FONT_DEFAULTS.fontSize;
38
38
  const theme = this._themeService.getColorTheme();
39
- const exportedColors = colors.getColorRegistry().getColors().reduce((colors, entry) => {
39
+ const exportedColors = colorRegistry.getColorRegistry().getColors().reduce((colors, entry) => {
40
40
  const color = theme.getColor(entry.id);
41
41
  if (color) {
42
42
  colors['vscode-' + entry.id.replace('.', '-')] = ( color.toString());
@@ -22,7 +22,7 @@ import { IRemoteAuthorityResolverService } from 'vscode/vscode/vs/platform/remot
22
22
  import { ITelemetryService } from 'monaco-editor/esm/vs/platform/telemetry/common/telemetry.js';
23
23
  import { ITunnelService } from 'vscode/vscode/vs/platform/tunnel/common/tunnel';
24
24
  import { WebviewPortMappingManager } from '../../../../platform/webview/common/webviewPortMapping.js';
25
- import { parentOriginHash } from 'vscode/vscode/vs/workbench/browser/iframe';
25
+ import { parentOriginHash } from 'monaco-editor/esm/vs/base/browser/iframe.js';
26
26
  import { loadLocalResource, WebviewResourceResponse } from './resourceLoading.js';
27
27
  import { areWebviewContentOptionsEqual } from 'vscode/vscode/vs/workbench/contrib/webview/browser/webview';
28
28
  import { WebviewFindWidget } from './webviewFindWidget.js';
@@ -778,6 +778,17 @@ let HistoryService = class HistoryService extends Disposable {
778
778
  }
779
779
  return undefined;
780
780
  }
781
+ dispose() {
782
+ super.dispose();
783
+ for (const [, stack] of this.editorGroupScopedNavigationStacks) {
784
+ stack.disposable.dispose();
785
+ }
786
+ for (const [, editors] of this.editorScopedNavigationStacks) {
787
+ for (const [, stack] of editors) {
788
+ stack.disposable.dispose();
789
+ }
790
+ }
791
+ }
781
792
  };
782
793
  HistoryService = HistoryService_1 = ( (__decorate([
783
794
  ( (__param(0, IEditorService))),
@@ -0,0 +1,7 @@
1
+ import { Codicon } from 'monaco-editor/esm/vs/base/common/codicons.js';
2
+ import { localize } from 'monaco-editor/esm/vs/nls.js';
3
+ import { registerIcon } from 'monaco-editor/esm/vs/platform/theme/common/iconRegistry.js';
4
+
5
+ const DEFAULT_ICON = registerIcon('settings-view-bar-icon', Codicon.settingsGear, ( localize('settingsViewBarIcon', "Settings icon in the view bar.")));
6
+
7
+ export { DEFAULT_ICON };