@codingame/monaco-vscode-workbench-service-override 7.1.0 → 7.1.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-workbench-service-override",
3
- "version": "7.1.0",
3
+ "version": "7.1.1",
4
4
  "keywords": [],
5
5
  "author": {
6
6
  "name": "CodinGame",
@@ -26,12 +26,12 @@
26
26
  }
27
27
  },
28
28
  "dependencies": {
29
- "vscode": "npm:@codingame/monaco-vscode-api@7.1.0",
30
- "@codingame/monaco-vscode-keybindings-service-override": "7.1.0",
31
- "@codingame/monaco-vscode-quickaccess-service-override": "7.1.0",
32
- "@codingame/monaco-vscode-view-title-bar-service-override": "7.1.0",
33
- "@codingame/monaco-vscode-view-status-bar-service-override": "7.1.0",
34
- "@codingame/monaco-vscode-view-banner-service-override": "7.1.0",
35
- "@codingame/monaco-vscode-view-common-service-override": "7.1.0"
29
+ "vscode": "npm:@codingame/monaco-vscode-api@7.1.1",
30
+ "@codingame/monaco-vscode-keybindings-service-override": "7.1.1",
31
+ "@codingame/monaco-vscode-quickaccess-service-override": "7.1.1",
32
+ "@codingame/monaco-vscode-view-title-bar-service-override": "7.1.1",
33
+ "@codingame/monaco-vscode-view-status-bar-service-override": "7.1.1",
34
+ "@codingame/monaco-vscode-view-banner-service-override": "7.1.1",
35
+ "@codingame/monaco-vscode-view-common-service-override": "7.1.1"
36
36
  }
37
37
  }
@@ -7,7 +7,7 @@ import { isWindows, isLinux, isWeb, isIOS, isMacintosh } from 'vscode/vscode/vs/
7
7
  import { pathsToEditors, isResourceEditorInput, EditorInputCapabilities } from 'vscode/vscode/vs/workbench/common/editor';
8
8
  import { SidebarPart } from '@codingame/monaco-vscode-view-common-service-override/vscode/vs/workbench/browser/parts/sidebar/sidebarPart';
9
9
  import { PanelPart } from '@codingame/monaco-vscode-view-common-service-override/vscode/vs/workbench/browser/parts/panel/panelPart';
10
- import { LayoutSettings, Parts, EditorActionsLocation, ActivityBarPosition, shouldShowCustomTitleBar, Position, ZenModeSettings, panelOpensMaximizedFromString, PanelOpensMaximizedOptions, positionToString, positionFromString } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService';
10
+ import { LayoutSettings, Parts, EditorActionsLocation, ActivityBarPosition, shouldShowCustomTitleBar, Position, isHorizontal, ZenModeSettings, panelOpensMaximizedFromString, PanelOpensMaximizedOptions, positionToString, positionFromString } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService';
11
11
  import { isTemporaryWorkspace, WorkbenchState } from 'vscode/vscode/vs/platform/workspace/common/workspace';
12
12
  import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace.service';
13
13
  import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
@@ -854,15 +854,14 @@ class Layout extends Disposable {
854
854
  const targetWindow = getWindow(container);
855
855
  const containerDimension = this.getContainerDimension(container);
856
856
  if (container === this.mainContainer) {
857
- const panelPosition = this.getPanelPosition();
858
- const isColumn = panelPosition === Position.RIGHT || panelPosition === Position.LEFT;
857
+ const isPanelHorizontal = isHorizontal(this.getPanelPosition());
859
858
  const takenWidth = (this.isVisible(Parts.ACTIVITYBAR_PART) ? this.activityBarPartView.minimumWidth : 0) +
860
859
  (this.isVisible(Parts.SIDEBAR_PART) ? this.sideBarPartView.minimumWidth : 0) +
861
- (this.isVisible(Parts.PANEL_PART) && isColumn ? this.panelPartView.minimumWidth : 0) +
860
+ (this.isVisible(Parts.PANEL_PART) && !isPanelHorizontal ? this.panelPartView.minimumWidth : 0) +
862
861
  (this.isVisible(Parts.AUXILIARYBAR_PART) ? this.auxiliaryBarPartView.minimumWidth : 0);
863
862
  const takenHeight = (this.isVisible(Parts.TITLEBAR_PART, targetWindow) ? this.titleBarPartView.minimumHeight : 0) +
864
863
  (this.isVisible(Parts.STATUSBAR_PART, targetWindow) ? this.statusBarPartView.minimumHeight : 0) +
865
- (this.isVisible(Parts.PANEL_PART) && !isColumn ? this.panelPartView.minimumHeight : 0);
864
+ (this.isVisible(Parts.PANEL_PART) && isPanelHorizontal ? this.panelPartView.minimumHeight : 0);
866
865
  const availableWidth = containerDimension.width - takenWidth;
867
866
  const availableHeight = containerDimension.height - takenHeight;
868
867
  return { width: availableWidth, height: availableHeight };
@@ -1062,7 +1061,9 @@ class Layout extends Disposable {
1062
1061
  this.stateModel.setInitializationValue(LayoutStateKeys.SIDEBAR_SIZE, sideBarSize);
1063
1062
  const panelSize = this.stateModel.getRuntimeValue(LayoutStateKeys.PANEL_HIDDEN)
1064
1063
  ? this.workbenchGrid.getViewCachedVisibleSize(this.panelPartView)
1065
- : (this.stateModel.getRuntimeValue(LayoutStateKeys.PANEL_POSITION) === Position.BOTTOM ? this.workbenchGrid.getViewSize(this.panelPartView).height : this.workbenchGrid.getViewSize(this.panelPartView).width);
1064
+ : isHorizontal(this.stateModel.getRuntimeValue(LayoutStateKeys.PANEL_POSITION))
1065
+ ? this.workbenchGrid.getViewSize(this.panelPartView).height
1066
+ : this.workbenchGrid.getViewSize(this.panelPartView).width;
1066
1067
  this.stateModel.setInitializationValue(LayoutStateKeys.PANEL_SIZE, panelSize);
1067
1068
  const auxiliaryBarSize = this.stateModel.getRuntimeValue(LayoutStateKeys.AUXILIARYBAR_HIDDEN)
1068
1069
  ? this.workbenchGrid.getViewCachedVisibleSize(this.auxiliaryBarPartView)
@@ -1126,8 +1127,8 @@ class Layout extends Disposable {
1126
1127
  case Parts.PANEL_PART:
1127
1128
  viewSize = this.workbenchGrid.getViewSize(this.panelPartView);
1128
1129
  this.workbenchGrid.resizeView(this.panelPartView, {
1129
- width: viewSize.width + (this.getPanelPosition() !== Position.BOTTOM ? sizeChangePxWidth : 0),
1130
- height: viewSize.height + (this.getPanelPosition() !== Position.BOTTOM ? 0 : sizeChangePxHeight)
1130
+ width: viewSize.width + (isHorizontal(this.getPanelPosition()) ? 0 : sizeChangePxWidth),
1131
+ height: viewSize.height + (isHorizontal(this.getPanelPosition()) ? sizeChangePxHeight : 0)
1131
1132
  });
1132
1133
  break;
1133
1134
  case Parts.AUXILIARYBAR_PART:
@@ -1227,8 +1228,9 @@ class Layout extends Disposable {
1227
1228
  return viewContainerModel.activeViewDescriptors.length >= 1;
1228
1229
  }
1229
1230
  adjustPartPositions(sideBarPosition, panelAlignment, panelPosition) {
1230
- const sideBarSiblingToEditor = panelPosition !== Position.BOTTOM || !(panelAlignment === 'center' || (sideBarPosition === Position.LEFT && panelAlignment === 'right') || (sideBarPosition === Position.RIGHT && panelAlignment === 'left'));
1231
- const auxiliaryBarSiblingToEditor = panelPosition !== Position.BOTTOM || !(panelAlignment === 'center' || (sideBarPosition === Position.RIGHT && panelAlignment === 'right') || (sideBarPosition === Position.LEFT && panelAlignment === 'left'));
1231
+ const isPanelVertical = !isHorizontal(panelPosition);
1232
+ const sideBarSiblingToEditor = isPanelVertical || !(panelAlignment === 'center' || (sideBarPosition === Position.LEFT && panelAlignment === 'right') || (sideBarPosition === Position.RIGHT && panelAlignment === 'left'));
1233
+ const auxiliaryBarSiblingToEditor = isPanelVertical || !(panelAlignment === 'center' || (sideBarPosition === Position.RIGHT && panelAlignment === 'right') || (sideBarPosition === Position.LEFT && panelAlignment === 'left'));
1232
1234
  const preMovePanelWidth = !this.isVisible(Parts.PANEL_PART) ? Sizing.Invisible(this.workbenchGrid.getViewCachedVisibleSize(this.panelPartView) ?? this.panelPartView.minimumWidth) : this.workbenchGrid.getViewSize(this.panelPartView).width;
1233
1235
  const preMovePanelHeight = !this.isVisible(Parts.PANEL_PART) ? Sizing.Invisible(this.workbenchGrid.getViewCachedVisibleSize(this.panelPartView) ?? this.panelPartView.minimumHeight) : this.workbenchGrid.getViewSize(this.panelPartView).height;
1234
1236
  const preMoveSideBarSize = !this.isVisible(Parts.SIDEBAR_PART) ? Sizing.Invisible(this.workbenchGrid.getViewCachedVisibleSize(this.sideBarPartView) ?? this.sideBarPartView.minimumWidth) : this.workbenchGrid.getViewSize(this.sideBarPartView).width;
@@ -1253,7 +1255,7 @@ class Layout extends Disposable {
1253
1255
  this.workbenchGrid.moveViewTo(this.auxiliaryBarPartView, [2, 0]);
1254
1256
  }
1255
1257
  }
1256
- if (panelPosition !== Position.BOTTOM) {
1258
+ if (isPanelVertical) {
1257
1259
  this.workbenchGrid.moveView(this.panelPartView, preMovePanelWidth, this.editorPartView, panelPosition === Position.LEFT ? Direction.Left : Direction.Right);
1258
1260
  this.workbenchGrid.resizeView(this.panelPartView, {
1259
1261
  height: preMovePanelHeight,
@@ -1274,7 +1276,7 @@ class Layout extends Disposable {
1274
1276
  }
1275
1277
  }
1276
1278
  setPanelAlignment(alignment, skipLayout) {
1277
- if (this.getPanelPosition() !== Position.BOTTOM) {
1279
+ if (!isHorizontal(this.getPanelPosition())) {
1278
1280
  this.setPanelPosition(Position.BOTTOM);
1279
1281
  }
1280
1282
  if (alignment !== 'center' && this.isPanelMaximized()) {
@@ -1340,7 +1342,7 @@ class Layout extends Disposable {
1340
1342
  const isMaximized = this.isPanelMaximized();
1341
1343
  if (!isMaximized) {
1342
1344
  if (this.isVisible(Parts.PANEL_PART)) {
1343
- if (panelPosition === Position.BOTTOM) {
1345
+ if (isHorizontal(panelPosition)) {
1344
1346
  this.stateModel.setRuntimeValue(LayoutStateKeys.PANEL_LAST_NON_MAXIMIZED_HEIGHT, size.height);
1345
1347
  }
1346
1348
  else {
@@ -1352,14 +1354,14 @@ class Layout extends Disposable {
1352
1354
  else {
1353
1355
  this.setEditorHidden(false);
1354
1356
  this.workbenchGrid.resizeView(this.panelPartView, {
1355
- width: panelPosition === Position.BOTTOM ? size.width : this.stateModel.getRuntimeValue(LayoutStateKeys.PANEL_LAST_NON_MAXIMIZED_WIDTH),
1356
- height: panelPosition === Position.BOTTOM ? this.stateModel.getRuntimeValue(LayoutStateKeys.PANEL_LAST_NON_MAXIMIZED_HEIGHT) : size.height
1357
+ width: isHorizontal(panelPosition) ? size.width : this.stateModel.getRuntimeValue(LayoutStateKeys.PANEL_LAST_NON_MAXIMIZED_WIDTH),
1358
+ height: isHorizontal(panelPosition) ? this.stateModel.getRuntimeValue(LayoutStateKeys.PANEL_LAST_NON_MAXIMIZED_HEIGHT) : size.height
1357
1359
  });
1358
1360
  }
1359
1361
  this.stateModel.setRuntimeValue(LayoutStateKeys.PANEL_WAS_LAST_MAXIMIZED, !isMaximized);
1360
1362
  }
1361
1363
  panelOpensMaximized() {
1362
- if (this.getPanelAlignment() !== 'center' && this.getPanelPosition() === Position.BOTTOM) {
1364
+ if (this.getPanelAlignment() !== 'center' && isHorizontal(this.getPanelPosition())) {
1363
1365
  return false;
1364
1366
  }
1365
1367
  const panelOpensMaximized = panelOpensMaximizedFromString(this.configurationService.getValue(WorkbenchLayoutSettings.PANEL_OPENS_MAXIMIZED));
@@ -1415,7 +1417,7 @@ class Layout extends Disposable {
1415
1417
  return this.state.runtime.mainWindowBorder && isMacintosh ? '5px' : undefined;
1416
1418
  }
1417
1419
  isPanelMaximized() {
1418
- return (this.getPanelAlignment() === 'center' || this.getPanelPosition() !== Position.BOTTOM) && !this.isVisible(Parts.EDITOR_PART, mainWindow);
1420
+ return (this.getPanelAlignment() === 'center' || !isHorizontal(this.getPanelPosition())) && !this.isVisible(Parts.EDITOR_PART, mainWindow);
1419
1421
  }
1420
1422
  getSideBarPosition() {
1421
1423
  return this.stateModel.getRuntimeValue(LayoutStateKeys.SIDEBAR_POSITON);
@@ -1469,14 +1471,14 @@ class Layout extends Disposable {
1469
1471
  const auxiliaryBarSize = this.workbenchGrid.getViewSize(this.auxiliaryBarPartView);
1470
1472
  let editorHidden = !this.isVisible(Parts.EDITOR_PART, mainWindow);
1471
1473
  if (newPositionValue !== oldPositionValue && !editorHidden) {
1472
- if (position === Position.BOTTOM) {
1474
+ if (isHorizontal(position)) {
1473
1475
  this.stateModel.setRuntimeValue(LayoutStateKeys.PANEL_LAST_NON_MAXIMIZED_WIDTH, size.width);
1474
1476
  }
1475
- else if (positionFromString(oldPositionValue) === Position.BOTTOM) {
1477
+ else if (isHorizontal(positionFromString(oldPositionValue))) {
1476
1478
  this.stateModel.setRuntimeValue(LayoutStateKeys.PANEL_LAST_NON_MAXIMIZED_HEIGHT, size.height);
1477
1479
  }
1478
1480
  }
1479
- if (position === Position.BOTTOM && this.getPanelAlignment() !== 'center' && editorHidden) {
1481
+ if (isHorizontal(position) && this.getPanelAlignment() !== 'center' && editorHidden) {
1480
1482
  this.toggleMaximizedPanel();
1481
1483
  editorHidden = false;
1482
1484
  }
@@ -1486,6 +1488,9 @@ class Layout extends Disposable {
1486
1488
  if (position === Position.BOTTOM) {
1487
1489
  this.workbenchGrid.moveView(this.panelPartView, editorHidden ? size.height : this.stateModel.getRuntimeValue(LayoutStateKeys.PANEL_LAST_NON_MAXIMIZED_HEIGHT), this.editorPartView, Direction.Down);
1488
1490
  }
1491
+ else if (position === Position.TOP) {
1492
+ this.workbenchGrid.moveView(this.panelPartView, editorHidden ? size.height : this.stateModel.getRuntimeValue(LayoutStateKeys.PANEL_LAST_NON_MAXIMIZED_HEIGHT), this.editorPartView, Direction.Up);
1493
+ }
1489
1494
  else if (position === Position.RIGHT) {
1490
1495
  this.workbenchGrid.moveView(this.panelPartView, editorHidden ? size.width : this.stateModel.getRuntimeValue(LayoutStateKeys.PANEL_LAST_NON_MAXIMIZED_WIDTH), this.editorPartView, Direction.Right);
1491
1496
  }
@@ -1500,7 +1505,7 @@ class Layout extends Disposable {
1500
1505
  if (!auxiliaryBarVisible) {
1501
1506
  this.setAuxiliaryBarHidden(true);
1502
1507
  }
1503
- if (position === Position.BOTTOM) {
1508
+ if (isHorizontal(position)) {
1504
1509
  this.adjustPartPositions(this.getSideBarPosition(), this.getPanelAlignment(), position);
1505
1510
  }
1506
1511
  this._onDidChangePanelPosition.fire(newPositionValue);
@@ -1587,17 +1592,19 @@ class Layout extends Disposable {
1587
1592
  const sideBarSize = this.stateModel.getRuntimeValue(LayoutStateKeys.SIDEBAR_HIDDEN) ? 0 : nodes.sideBar.size;
1588
1593
  const auxiliaryBarSize = this.stateModel.getRuntimeValue(LayoutStateKeys.AUXILIARYBAR_HIDDEN) ? 0 : nodes.auxiliaryBar.size;
1589
1594
  const panelSize = this.stateModel.getInitializationValue(LayoutStateKeys.PANEL_SIZE) ? 0 : nodes.panel.size;
1595
+ const panelPostion = this.stateModel.getRuntimeValue(LayoutStateKeys.PANEL_POSITION);
1596
+ const sideBarPosition = this.stateModel.getRuntimeValue(LayoutStateKeys.SIDEBAR_POSITON);
1590
1597
  const result = [];
1591
- if (this.stateModel.getRuntimeValue(LayoutStateKeys.PANEL_POSITION) !== Position.BOTTOM) {
1598
+ if (!isHorizontal(panelPostion)) {
1592
1599
  result.push(nodes.editor);
1593
1600
  nodes.editor.size = availableWidth - activityBarSize - sideBarSize - panelSize - auxiliaryBarSize;
1594
- if (this.stateModel.getRuntimeValue(LayoutStateKeys.PANEL_POSITION) === Position.RIGHT) {
1601
+ if (panelPostion === Position.RIGHT) {
1595
1602
  result.push(nodes.panel);
1596
1603
  }
1597
1604
  else {
1598
1605
  result.splice(0, 0, nodes.panel);
1599
1606
  }
1600
- if (this.stateModel.getRuntimeValue(LayoutStateKeys.SIDEBAR_POSITON) === Position.LEFT) {
1607
+ if (sideBarPosition === Position.LEFT) {
1601
1608
  result.push(nodes.auxiliaryBar);
1602
1609
  result.splice(0, 0, nodes.sideBar);
1603
1610
  result.splice(0, 0, nodes.activityBar);
@@ -1610,17 +1617,17 @@ class Layout extends Disposable {
1610
1617
  }
1611
1618
  else {
1612
1619
  const panelAlignment = this.stateModel.getRuntimeValue(LayoutStateKeys.PANEL_ALIGNMENT);
1613
- const sideBarPosition = this.stateModel.getRuntimeValue(LayoutStateKeys.SIDEBAR_POSITON);
1614
1620
  const sideBarNextToEditor = !(panelAlignment === 'center' || (sideBarPosition === Position.LEFT && panelAlignment === 'right') || (sideBarPosition === Position.RIGHT && panelAlignment === 'left'));
1615
1621
  const auxiliaryBarNextToEditor = !(panelAlignment === 'center' || (sideBarPosition === Position.RIGHT && panelAlignment === 'right') || (sideBarPosition === Position.LEFT && panelAlignment === 'left'));
1616
1622
  const editorSectionWidth = availableWidth - activityBarSize - (sideBarNextToEditor ? 0 : sideBarSize) - (auxiliaryBarNextToEditor ? 0 : auxiliaryBarSize);
1623
+ const editorNodes = this.arrangeEditorNodes({
1624
+ editor: nodes.editor,
1625
+ sideBar: sideBarNextToEditor ? nodes.sideBar : undefined,
1626
+ auxiliaryBar: auxiliaryBarNextToEditor ? nodes.auxiliaryBar : undefined
1627
+ }, availableHeight - panelSize, editorSectionWidth);
1617
1628
  result.push({
1618
1629
  type: 'branch',
1619
- data: [this.arrangeEditorNodes({
1620
- editor: nodes.editor,
1621
- sideBar: sideBarNextToEditor ? nodes.sideBar : undefined,
1622
- auxiliaryBar: auxiliaryBarNextToEditor ? nodes.auxiliaryBar : undefined
1623
- }, availableHeight - panelSize, editorSectionWidth), nodes.panel],
1630
+ data: panelPostion === Position.BOTTOM ? [editorNodes, nodes.panel] : [nodes.panel, editorNodes],
1624
1631
  size: editorSectionWidth
1625
1632
  });
1626
1633
  if (!sideBarNextToEditor) {
@@ -1913,7 +1920,7 @@ class LayoutStateModel extends Disposable {
1913
1920
  LayoutStateKeys.GRID_SIZE.defaultValue = { height: workbenchDimensions.height, width: workbenchDimensions.width };
1914
1921
  LayoutStateKeys.SIDEBAR_SIZE.defaultValue = Math.min(300, workbenchDimensions.width / 4);
1915
1922
  LayoutStateKeys.AUXILIARYBAR_SIZE.defaultValue = Math.min(300, workbenchDimensions.width / 4);
1916
- LayoutStateKeys.PANEL_SIZE.defaultValue = (this.stateCache.get(LayoutStateKeys.PANEL_POSITION.name) ?? LayoutStateKeys.PANEL_POSITION.defaultValue) === Position.BOTTOM ? workbenchDimensions.height / 3 : workbenchDimensions.width / 4;
1923
+ LayoutStateKeys.PANEL_SIZE.defaultValue = (this.stateCache.get(LayoutStateKeys.PANEL_POSITION.name) ?? isHorizontal(LayoutStateKeys.PANEL_POSITION.defaultValue)) ? workbenchDimensions.height / 3 : workbenchDimensions.width / 4;
1917
1924
  LayoutStateKeys.SIDEBAR_HIDDEN.defaultValue = this.contextService.getWorkbenchState() === WorkbenchState.EMPTY;
1918
1925
  for (key in LayoutStateKeys) {
1919
1926
  const stateKey = LayoutStateKeys[key];
@@ -1,9 +1,8 @@
1
1
  import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
2
2
  import { ThemeIcon } from 'vscode/vscode/vs/base/common/themables';
3
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
4
- import { AccessibleViewType, AccessibleViewProviderId } from 'vscode/vscode/vs/platform/accessibility/browser/accessibleView';
3
+ import { localize } from 'vscode/vscode/vs/nls';
4
+ import { AccessibleViewType, AccessibleContentProvider, AccessibleViewProviderId } from 'vscode/vscode/vs/platform/accessibility/browser/accessibleView';
5
5
  import { IAccessibleViewService } from 'vscode/vscode/vs/platform/accessibility/browser/accessibleView.service';
6
- import { alertAccessibleViewFocusChange } from 'vscode/vscode/vs/platform/accessibility/browser/accessibleViewRegistry';
7
6
  import { AccessibilitySignal } from 'vscode/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService';
8
7
  import { IAccessibilitySignalService } from 'vscode/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService.service';
9
8
  import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
@@ -12,7 +11,6 @@ import { IListService } from 'vscode/vscode/vs/platform/list/browser/listService
12
11
  import { getNotificationFromContext } from 'vscode/vscode/vs/workbench/browser/parts/notifications/notificationsCommands';
13
12
  import { NotificationFocusedContext } from 'vscode/vscode/vs/workbench/common/contextkeys';
14
13
 
15
- const _moduleId = "vs/workbench/browser/parts/notifications/notificationAccessibleView";
16
14
  class NotificationAccessibleView {
17
15
  constructor() {
18
16
  this.priority = 90;
@@ -32,11 +30,9 @@ class NotificationAccessibleView {
32
30
  }
33
31
  commandService.executeCommand('notifications.showList');
34
32
  let notificationIndex;
35
- let length;
36
33
  const list = listService.lastFocusedList;
37
34
  if (list instanceof WorkbenchList) {
38
35
  notificationIndex = list.indexOf(notification);
39
- length = list.length;
40
36
  }
41
37
  if (notificationIndex === undefined) {
42
38
  return;
@@ -51,45 +47,49 @@ class NotificationAccessibleView {
51
47
  catch { }
52
48
  }
53
49
  }
54
- const message = ( (notification.message.original.toString()));
55
- if (!message) {
50
+ function getContentForNotification() {
51
+ const notification = getNotificationFromContext(listService);
52
+ const message = notification?.message.original.toString();
53
+ if (!notification) {
54
+ return;
55
+ }
56
+ return notification.source ? ( localize(8671, '{0} Source: {1}', message, notification.source)) : ( localize(8672, '{0}', message));
57
+ }
58
+ const content = getContentForNotification();
59
+ if (!content) {
56
60
  return;
57
61
  }
58
62
  notification.onDidClose(() => accessibleViewService.next());
59
- return {
60
- id: AccessibleViewProviderId.Notification,
61
- provideContent: () => {
62
- return notification.source ? ( localizeWithPath(_moduleId, 0, '{0} Source: {1}', message, notification.source)) : ( localizeWithPath(_moduleId, 1, '{0}', message));
63
- },
64
- onClose() {
65
- focusList();
66
- },
67
- next() {
68
- if (!list) {
69
- return;
63
+ return (
64
+ (new AccessibleContentProvider(
65
+ AccessibleViewProviderId.Notification,
66
+ { type: AccessibleViewType.View },
67
+ () => content,
68
+ () => focusList(),
69
+ 'accessibility.verbosity.notification',
70
+ undefined,
71
+ getActionsFromNotification(notification, accessibilitySignalService),
72
+ () => {
73
+ if (!list) {
74
+ return;
75
+ }
76
+ focusList();
77
+ list.focusNext();
78
+ return getContentForNotification();
79
+ },
80
+ () => {
81
+ if (!list) {
82
+ return;
83
+ }
84
+ focusList();
85
+ list.focusPrevious();
86
+ return getContentForNotification();
70
87
  }
71
- focusList();
72
- list.focusNext();
73
- alertAccessibleViewFocusChange(notificationIndex, length, 'next');
74
- getProvider();
75
- },
76
- previous() {
77
- if (!list) {
78
- return;
79
- }
80
- focusList();
81
- list.focusPrevious();
82
- alertAccessibleViewFocusChange(notificationIndex, length, 'previous');
83
- getProvider();
84
- },
85
- verbositySettingKey: 'accessibility.verbosity.notification',
86
- options: { type: AccessibleViewType.View },
87
- actions: getActionsFromNotification(notification, accessibilitySignalService)
88
- };
88
+ ))
89
+ );
89
90
  }
90
91
  return getProvider();
91
92
  }
92
- dispose() { }
93
93
  }
94
94
  function getActionsFromNotification(notification, accessibilitySignalService) {
95
95
  let actions = undefined;
@@ -118,7 +118,7 @@ function getActionsFromNotification(notification, accessibilitySignalService) {
118
118
  }
119
119
  if (actions) {
120
120
  actions.push({
121
- id: 'clearNotification', label: ( localizeWithPath(_moduleId, 2, "Clear Notification")), tooltip: ( localizeWithPath(_moduleId, 2, "Clear Notification")), run: () => {
121
+ id: 'clearNotification', label: ( localize(8673, "Clear Notification")), tooltip: ( localize(8673, "Clear Notification")), run: () => {
122
122
  notification.close();
123
123
  accessibilitySignalService.playSignal(AccessibilitySignal.clear);
124
124
  }, enabled: true, class: ThemeIcon.asClassName(Codicon.clearAll)
@@ -1,5 +1,5 @@
1
1
  import '@codingame/monaco-vscode-view-common-service-override/vscode/vs/workbench/browser/style';
2
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
2
+ import { localize } from 'vscode/vscode/vs/nls';
3
3
  import { runWhenWindowIdle } from 'vscode/vscode/vs/base/browser/dom';
4
4
  import { Emitter, setGlobalLeakWarningThreshold, Event } from 'vscode/vscode/vs/base/common/event';
5
5
  import { timeout, RunOnceScheduler } from 'vscode/vscode/vs/base/common/async';
@@ -38,7 +38,6 @@ import { setProgressAcccessibilitySignalScheduler } from 'vscode/vscode/vs/base/
38
38
  import { AccessibleViewRegistry } from 'vscode/vscode/vs/platform/accessibility/browser/accessibleViewRegistry';
39
39
  import { NotificationAccessibleView } from './parts/notifications/notificationAccessibleView.js';
40
40
 
41
- const _moduleId = "vs/workbench/browser/workbench";
42
41
  class Workbench extends Layout {
43
42
  constructor(parent, options, serviceCollection, logService) {
44
43
  super(parent);
@@ -62,9 +61,8 @@ class Workbench extends Layout {
62
61
  mainWindow.require.config({
63
62
  onError: (err) => {
64
63
  if (err.phase === 'loading') {
65
- onUnexpectedError(( (new Error(( localizeWithPath(
66
- _moduleId,
67
- 0,
64
+ onUnexpectedError(( (new Error(( localize(
65
+ 3534,
68
66
  "Failed to load a required file. Please restart the application to try again. Details: {0}",
69
67
  JSON.stringify(err)
70
68
  ))))));