@codingame/monaco-vscode-view-common-service-override 32.0.2 → 33.0.9

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 (47) hide show
  1. package/package.json +4 -4
  2. package/vscode/src/vs/sessions/common/theme.js +25 -25
  3. package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +56 -56
  4. package/vscode/src/vs/workbench/browser/actions/helpActions.js +20 -20
  5. package/vscode/src/vs/workbench/browser/actions/listCommands.js +3 -3
  6. package/vscode/src/vs/workbench/browser/actions/navigationActions.js +6 -6
  7. package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +179 -174
  8. package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +18 -15
  9. package/vscode/src/vs/workbench/browser/parts/titlebar/menubar.contribution.js +8 -8
  10. package/vscode/src/vs/workbench/browser/workbench.zenMode.contribution.js +15 -15
  11. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +12 -12
  12. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +3 -3
  13. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +3 -3
  14. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.js +2 -4
  15. package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +37 -7
  16. package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.d.ts +4 -7
  17. package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +4 -6
  18. package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.d.ts +62 -35
  19. package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +68 -52
  20. package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.js +7 -7
  21. package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.js +8 -8
  22. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.js +29 -29
  23. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.js +14 -14
  24. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.js +2 -2
  25. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorAccessibilityHelp.js +5 -5
  26. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/colors.js +13 -13
  27. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/conflictActions.js +20 -20
  28. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +3 -3
  29. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +10 -10
  30. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js +3 -3
  31. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +1 -1
  32. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +1 -1
  33. package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.js +12 -12
  34. package/vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.js +2 -2
  35. package/vscode/src/vs/workbench/contrib/scrollLocking/browser/scrollLocking.js +7 -7
  36. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +10 -10
  37. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +3 -3
  38. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +3 -3
  39. package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +1 -1
  40. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +5 -5
  41. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +1 -1
  42. package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.d.ts +2 -2
  43. package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +31 -22
  44. package/vscode/src/vs/workbench/services/history/browser/historyService.js +9 -9
  45. package/vscode/src/vs/workbench/services/progress/browser/progressService.js +7 -7
  46. package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +5 -5
  47. package/vscode/src/vs/workbench/services/views/browser/viewsService.js +9 -9
@@ -5,7 +5,7 @@ import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/regist
5
5
  import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
6
6
  import { Extensions, ConfigurationScope } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configurationRegistry';
7
7
  import { workbenchConfigurationNodeBase } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/configuration';
8
- import { RegisteredEditorPriority, editorsAssociationsSettingId, diffEditorsAssociationsSettingId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorResolverService';
8
+ import { toRegisteredEditorPriorityInfo, RegisteredEditorPriority, editorsAssociationsAgentsWindowDefault, editorsAssociationsSettingId, diffEditorsAssociationsSettingId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorResolverService';
9
9
  import { IEditorResolverService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorResolverService.service';
10
10
  import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
11
11
  import { coalesce } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arrays';
@@ -33,20 +33,20 @@ let DynamicEditorConfigurations = class DynamicEditorConfigurations extends Disp
33
33
  this.AUTO_LOCK_EXTRA_EDITORS = [
34
34
  {
35
35
  id: "workbench.input.interactive",
36
- label: ( localize(3506, "Interactive Window")),
37
- priority: RegisteredEditorPriority.builtin
36
+ label: ( localize(3528, "Interactive Window")),
37
+ priority: toRegisteredEditorPriorityInfo(RegisteredEditorPriority.builtin)
38
38
  }, {
39
39
  id: "mainThreadWebview-markdown.preview",
40
- label: ( localize(3507, "Markdown Preview")),
41
- priority: RegisteredEditorPriority.builtin
40
+ label: ( localize(3529, "Markdown Preview")),
41
+ priority: toRegisteredEditorPriorityInfo(RegisteredEditorPriority.builtin)
42
42
  }, {
43
43
  id: "mainThreadWebview-simpleBrowser.view",
44
- label: ( localize(3508, "Simple Browser")),
45
- priority: RegisteredEditorPriority.builtin
44
+ label: ( localize(3530, "Simple Browser")),
45
+ priority: toRegisteredEditorPriorityInfo(RegisteredEditorPriority.builtin)
46
46
  }, {
47
47
  id: "mainThreadWebview-browserPreview",
48
- label: ( localize(3509, "Live Preview")),
49
- priority: RegisteredEditorPriority.builtin
48
+ label: ( localize(3531, "Live Preview")),
49
+ priority: toRegisteredEditorPriorityInfo(RegisteredEditorPriority.builtin)
50
50
  }];
51
51
  }
52
52
  static {
@@ -74,7 +74,7 @@ let DynamicEditorConfigurations = class DynamicEditorConfigurations extends Disp
74
74
  ...this.editorResolverService.getEditors(),
75
75
  ...DynamicEditorConfigurations_1.AUTO_LOCK_EXTRA_EDITORS
76
76
  ].filter(e => !( DynamicEditorConfigurations_1.AUTO_LOCK_REMOVE_EDITORS.has(e.id)));
77
- const binaryEditorCandidates = ( this.editorResolverService.getEditors().filter(e => e.priority !== RegisteredEditorPriority.exclusive).map(e => e.id));
77
+ const binaryEditorCandidates = ( this.editorResolverService.getEditors().filter(e => e.priority.editor !== RegisteredEditorPriority.exclusive).map(e => e.id));
78
78
  const autoLockGroupConfiguration = Object.create(null);
79
79
  for (const editor of lockableEditors) {
80
80
  autoLockGroupConfiguration[editor.id] = {
@@ -94,7 +94,7 @@ let DynamicEditorConfigurations = class DynamicEditorConfigurations extends Disp
94
94
  "workbench.editor.autoLockGroups": {
95
95
  type: "object",
96
96
  description: ( localize(
97
- 3510,
97
+ 3532,
98
98
  "If an editor matching one of the listed types is opened as the first in an editor group and more than one group is open, the group is automatically locked. Locked groups will only be used for opening editors when explicitly chosen by a user gesture (for example drag and drop), but not by default. Consequently, the active editor in a locked group is less likely to be replaced accidentally with a different editor."
99
99
  )),
100
100
  properties: autoLockGroupConfiguration,
@@ -112,7 +112,7 @@ let DynamicEditorConfigurations = class DynamicEditorConfigurations extends Disp
112
112
  default: "",
113
113
  enum: [...binaryEditorCandidates, ""],
114
114
  description: ( localize(
115
- 3511,
115
+ 3533,
116
116
  "The default editor for files detected as binary. If undefined, the user will be presented with a picker."
117
117
  ))
118
118
  }
@@ -125,7 +125,7 @@ let DynamicEditorConfigurations = class DynamicEditorConfigurations extends Disp
125
125
  [editorsAssociationsSettingId]: {
126
126
  type: "object",
127
127
  markdownDescription: ( localize(
128
- 3512,
128
+ 3534,
129
129
  "Configure [glob patterns](https://aka.ms/vscode-glob-patterns) to editors (for example `\"*.hex\": \"hexEditor.hexedit\"`). These have precedence over the default behavior."
130
130
  )),
131
131
  patternProperties: {
@@ -133,6 +133,9 @@ let DynamicEditorConfigurations = class DynamicEditorConfigurations extends Disp
133
133
  type: "string",
134
134
  enum: binaryEditorCandidates
135
135
  }
136
+ },
137
+ agentsWindow: {
138
+ default: editorsAssociationsAgentsWindowDefault
136
139
  }
137
140
  }
138
141
  }
@@ -144,7 +147,7 @@ let DynamicEditorConfigurations = class DynamicEditorConfigurations extends Disp
144
147
  [diffEditorsAssociationsSettingId]: {
145
148
  type: "object",
146
149
  markdownDescription: ( localize(
147
- 3513,
150
+ 3535,
148
151
  "Configure [glob patterns](https://aka.ms/vscode-glob-patterns) to editors for diff views (for example `\"*.md\": \"vscode.markdown.preview.editor\"`). These override `workbench.editorAssociations` for diffs."
149
152
  )),
150
153
  patternProperties: {
@@ -166,7 +169,7 @@ let DynamicEditorConfigurations = class DynamicEditorConfigurations extends Disp
166
169
  minimum: 1,
167
170
  scope: ConfigurationScope.RESOURCE,
168
171
  markdownDescription: ( localize(
169
- 3514,
172
+ 3536,
170
173
  "Controls the minimum size of a file in MB before asking for confirmation when opening in the editor. Note that this setting may not apply to all editor types and environments."
171
174
  ))
172
175
  }
@@ -8,7 +8,7 @@ MenuRegistry.appendMenuItem(MenuId.MenubarMainMenu, {
8
8
  title: {
9
9
  value: "File",
10
10
  original: "File",
11
- mnemonicTitle: ( localize(3774, "&&File"))
11
+ mnemonicTitle: ( localize(3796, "&&File"))
12
12
  },
13
13
  order: 1
14
14
  });
@@ -17,7 +17,7 @@ MenuRegistry.appendMenuItem(MenuId.MenubarMainMenu, {
17
17
  title: {
18
18
  value: "Edit",
19
19
  original: "Edit",
20
- mnemonicTitle: ( localize(3775, "&&Edit"))
20
+ mnemonicTitle: ( localize(3797, "&&Edit"))
21
21
  },
22
22
  order: 2
23
23
  });
@@ -26,7 +26,7 @@ MenuRegistry.appendMenuItem(MenuId.MenubarMainMenu, {
26
26
  title: {
27
27
  value: "Selection",
28
28
  original: "Selection",
29
- mnemonicTitle: ( localize(3776, "&&Selection"))
29
+ mnemonicTitle: ( localize(3798, "&&Selection"))
30
30
  },
31
31
  order: 3
32
32
  });
@@ -35,7 +35,7 @@ MenuRegistry.appendMenuItem(MenuId.MenubarMainMenu, {
35
35
  title: {
36
36
  value: "View",
37
37
  original: "View",
38
- mnemonicTitle: ( localize(3777, "&&View"))
38
+ mnemonicTitle: ( localize(3799, "&&View"))
39
39
  },
40
40
  order: 4
41
41
  });
@@ -44,7 +44,7 @@ MenuRegistry.appendMenuItem(MenuId.MenubarMainMenu, {
44
44
  title: {
45
45
  value: "Go",
46
46
  original: "Go",
47
- mnemonicTitle: ( localize(3778, "&&Go"))
47
+ mnemonicTitle: ( localize(3800, "&&Go"))
48
48
  },
49
49
  order: 5
50
50
  });
@@ -53,7 +53,7 @@ MenuRegistry.appendMenuItem(MenuId.MenubarMainMenu, {
53
53
  title: {
54
54
  value: "Terminal",
55
55
  original: "Terminal",
56
- mnemonicTitle: ( localize(3779, "&&Terminal"))
56
+ mnemonicTitle: ( localize(3801, "&&Terminal"))
57
57
  },
58
58
  order: 7
59
59
  });
@@ -62,7 +62,7 @@ MenuRegistry.appendMenuItem(MenuId.MenubarMainMenu, {
62
62
  title: {
63
63
  value: "Help",
64
64
  original: "Help",
65
- mnemonicTitle: ( localize(3780, "&&Help"))
65
+ mnemonicTitle: ( localize(3802, "&&Help"))
66
66
  },
67
67
  order: 8
68
68
  });
@@ -71,7 +71,7 @@ MenuRegistry.appendMenuItem(MenuId.MenubarMainMenu, {
71
71
  title: {
72
72
  value: "Preferences",
73
73
  original: "Preferences",
74
- mnemonicTitle: ( localize(3781, "&&Preferences"))
74
+ mnemonicTitle: ( localize(3803, "&&Preferences"))
75
75
  },
76
76
  when: IsMacNativeContext,
77
77
  order: 9
@@ -16,40 +16,40 @@ import { ZenHideEditorTabsAction, ZenShowMultipleEditorTabsAction, ZenShowSingle
16
16
  registry.registerConfiguration({
17
17
  "id": "zenMode",
18
18
  "order": 9,
19
- "title": ( localize(4102, "Zen Mode")),
19
+ "title": ( localize(4124, "Zen Mode")),
20
20
  "type": "object",
21
21
  "properties": {
22
22
  "zenMode.fullScreen": {
23
23
  "type": "boolean",
24
24
  "default": true,
25
25
  "description": ( localize(
26
- 4103,
26
+ 4125,
27
27
  "Controls whether turning on Zen Mode also puts the workbench into full screen mode."
28
28
  ))
29
29
  },
30
30
  "zenMode.centerLayout": {
31
31
  "type": "boolean",
32
32
  "default": true,
33
- "description": ( localize(4104, "Controls whether turning on Zen Mode also centers the layout."))
33
+ "description": ( localize(4126, "Controls whether turning on Zen Mode also centers the layout."))
34
34
  },
35
35
  "zenMode.showTabs": {
36
36
  "type": "string",
37
37
  "enum": ["multiple", "single", "none"],
38
38
  "description": ( localize(
39
- 4105,
39
+ 4127,
40
40
  "Controls whether turning on Zen Mode should show multiple editor tabs, a single editor tab, or hide the editor title area completely."
41
41
  )),
42
- "enumDescriptions": [( localize(4106, "Each editor is displayed as a tab in the editor title area.")), ( localize(
43
- 4107,
42
+ "enumDescriptions": [( localize(4128, "Each editor is displayed as a tab in the editor title area.")), ( localize(
43
+ 4129,
44
44
  "The active editor is displayed as a single large tab in the editor title area."
45
- )), ( localize(4108, "The editor title area is not displayed."))],
45
+ )), ( localize(4130, "The editor title area is not displayed."))],
46
46
  "default": "multiple"
47
47
  },
48
48
  "zenMode.hideStatusBar": {
49
49
  "type": "boolean",
50
50
  "default": true,
51
51
  "description": ( localize(
52
- 4109,
52
+ 4131,
53
53
  "Controls whether turning on Zen Mode also hides the status bar at the bottom of the workbench."
54
54
  ))
55
55
  },
@@ -57,7 +57,7 @@ import { ZenHideEditorTabsAction, ZenShowMultipleEditorTabsAction, ZenShowSingle
57
57
  "type": "boolean",
58
58
  "default": true,
59
59
  "description": ( localize(
60
- 4110,
60
+ 4132,
61
61
  "Controls whether turning on Zen Mode also hides the activity bar either at the left or right of the workbench."
62
62
  ))
63
63
  },
@@ -65,7 +65,7 @@ import { ZenHideEditorTabsAction, ZenShowMultipleEditorTabsAction, ZenShowSingle
65
65
  "type": "boolean",
66
66
  "default": true,
67
67
  "description": ( localize(
68
- 4111,
68
+ 4133,
69
69
  "Controls whether turning on Zen Mode also hides the editor line numbers."
70
70
  ))
71
71
  },
@@ -73,7 +73,7 @@ import { ZenHideEditorTabsAction, ZenShowMultipleEditorTabsAction, ZenShowSingle
73
73
  "type": "boolean",
74
74
  "default": true,
75
75
  "description": ( localize(
76
- 4112,
76
+ 4134,
77
77
  "Controls whether a window should restore to Zen Mode if it was exited in Zen Mode."
78
78
  ))
79
79
  },
@@ -81,7 +81,7 @@ import { ZenHideEditorTabsAction, ZenShowMultipleEditorTabsAction, ZenShowSingle
81
81
  "type": "boolean",
82
82
  "default": true,
83
83
  "description": ( localize(
84
- 4113,
84
+ 4135,
85
85
  "Controls whether notifications do not disturb mode should be enabled while in Zen Mode. If true, only error notifications will pop out."
86
86
  ))
87
87
  }
@@ -93,7 +93,7 @@ registerAction2(ZenShowMultipleEditorTabsAction);
93
93
  registerAction2(ZenShowSingleEditorTabAction);
94
94
  MenuRegistry.appendMenuItem(MenuId.MenubarAppearanceMenu, {
95
95
  submenu: MenuId.EditorTabsBarShowTabsZenModeSubmenu,
96
- title: ( localize(4114, "Tab Bar")),
96
+ title: ( localize(4136, "Tab Bar")),
97
97
  group: "3_workbench_layout_move",
98
98
  order: 10,
99
99
  when: InEditorZenModeContext
@@ -103,8 +103,8 @@ registerAction2(class extends Action2 {
103
103
  super({
104
104
  id: "workbench.action.toggleZenMode",
105
105
  title: {
106
- ...( localize2(4115, "Toggle Zen Mode")),
107
- mnemonicTitle: ( localize(4116, "Zen Mode"))
106
+ ...( localize2(4137, "Toggle Zen Mode")),
107
+ mnemonicTitle: ( localize(4138, "Zen Mode"))
108
108
  },
109
109
  precondition: ( IsAuxiliaryWindowFocusedContext.toNegated()),
110
110
  category: Categories.View,
@@ -24,11 +24,11 @@ import { registerIcon } from '@codingame/monaco-vscode-api/vscode/vs/platform/th
24
24
  import { isCancellationError } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
25
25
 
26
26
  var CallHierarchyController_1;
27
- const _ctxHasCallHierarchyProvider = ( new RawContextKey("editorHasCallHierarchyProvider", false, ( localize(4726, "Whether a call hierarchy provider is available"))));
28
- const _ctxCallHierarchyVisible = ( new RawContextKey("callHierarchyVisible", false, ( localize(4727, "Whether call hierarchy peek is currently showing"))));
27
+ const _ctxHasCallHierarchyProvider = ( new RawContextKey("editorHasCallHierarchyProvider", false, ( localize(4748, "Whether a call hierarchy provider is available"))));
28
+ const _ctxCallHierarchyVisible = ( new RawContextKey("callHierarchyVisible", false, ( localize(4749, "Whether call hierarchy peek is currently showing"))));
29
29
  const _ctxCallHierarchyDirection = ( new RawContextKey("callHierarchyDirection", undefined, {
30
30
  type: "string",
31
- description: ( localize(4728, "Whether call hierarchy shows incoming or outgoing calls"))
31
+ description: ( localize(4750, "Whether call hierarchy shows incoming or outgoing calls"))
32
32
  }));
33
33
  function sanitizedDirection(candidate) {
34
34
  return candidate === CallHierarchyDirection.CallsFrom || candidate === CallHierarchyDirection.CallsTo ? candidate : CallHierarchyDirection.CallsTo;
@@ -149,14 +149,14 @@ let CallHierarchyController = class CallHierarchyController {
149
149
  this._sessionDisposables.add(model);
150
150
  this._widget.showModel(model);
151
151
  } else {
152
- this._widget.showMessage(( localize(4729, "No results")));
152
+ this._widget.showMessage(( localize(4751, "No results")));
153
153
  }
154
154
  }).catch(err => {
155
155
  if (isCancellationError(err)) {
156
156
  this.endCallHierarchy();
157
157
  return;
158
158
  }
159
- this._widget.showMessage(( localize(4730, "Failed to show call hierarchy")));
159
+ this._widget.showMessage(( localize(4752, "Failed to show call hierarchy")));
160
160
  });
161
161
  }
162
162
  showOutgoingCalls() {
@@ -183,7 +183,7 @@ registerAction2(class PeekCallHierarchyAction extends EditorAction2 {
183
183
  constructor() {
184
184
  super({
185
185
  id: "editor.showCallHierarchy",
186
- title: ( localize2(4731, "Peek Call Hierarchy")),
186
+ title: ( localize2(4753, "Peek Call Hierarchy")),
187
187
  menu: {
188
188
  id: MenuId.EditorContextPeek,
189
189
  group: "navigation",
@@ -207,8 +207,8 @@ registerAction2(class extends EditorAction2 {
207
207
  constructor() {
208
208
  super({
209
209
  id: "editor.showIncomingCalls",
210
- title: ( localize2(4732, "Show Incoming Calls")),
211
- icon: registerIcon("callhierarchy-incoming", Codicon.callIncoming, ( localize(4733, "Icon for incoming calls in the call hierarchy view."))),
210
+ title: ( localize2(4754, "Show Incoming Calls")),
211
+ icon: registerIcon("callhierarchy-incoming", Codicon.callIncoming, ( localize(4755, "Icon for incoming calls in the call hierarchy view."))),
212
212
  precondition: ( ContextKeyExpr.and(_ctxCallHierarchyVisible, ( _ctxCallHierarchyDirection.isEqualTo(CallHierarchyDirection.CallsFrom)))),
213
213
  keybinding: {
214
214
  weight: KeybindingWeight.WorkbenchContrib,
@@ -229,8 +229,8 @@ registerAction2(class extends EditorAction2 {
229
229
  constructor() {
230
230
  super({
231
231
  id: "editor.showOutgoingCalls",
232
- title: ( localize2(4734, "Show Outgoing Calls")),
233
- icon: registerIcon("callhierarchy-outgoing", Codicon.callOutgoing, ( localize(4735, "Icon for outgoing calls in the call hierarchy view."))),
232
+ title: ( localize2(4756, "Show Outgoing Calls")),
233
+ icon: registerIcon("callhierarchy-outgoing", Codicon.callOutgoing, ( localize(4757, "Icon for outgoing calls in the call hierarchy view."))),
234
234
  precondition: ( ContextKeyExpr.and(_ctxCallHierarchyVisible, ( _ctxCallHierarchyDirection.isEqualTo(CallHierarchyDirection.CallsTo)))),
235
235
  keybinding: {
236
236
  weight: KeybindingWeight.WorkbenchContrib,
@@ -251,7 +251,7 @@ registerAction2(class extends EditorAction2 {
251
251
  constructor() {
252
252
  super({
253
253
  id: "editor.refocusCallHierarchy",
254
- title: ( localize2(4736, "Refocus Call Hierarchy")),
254
+ title: ( localize2(4758, "Refocus Call Hierarchy")),
255
255
  precondition: _ctxCallHierarchyVisible,
256
256
  keybinding: {
257
257
  weight: KeybindingWeight.WorkbenchContrib,
@@ -267,7 +267,7 @@ registerAction2(class extends EditorAction2 {
267
267
  constructor() {
268
268
  super({
269
269
  id: "editor.closeCallHierarchy",
270
- title: ( localize(4737, "Close")),
270
+ title: ( localize(4759, "Close")),
271
271
  icon: Codicon.close,
272
272
  precondition: _ctxCallHierarchyVisible,
273
273
  keybinding: {
@@ -323,12 +323,12 @@ let CallHierarchyTreePeekWidget = class CallHierarchyTreePeekWidget extends Peek
323
323
  this._previewDisposable.add(toDisposable(() => decorationsCollection.clear()));
324
324
  }
325
325
  this._previewDisposable.add(value);
326
- const title = this._direction === CallHierarchyDirection.CallsFrom ? ( localize(4738, "Calls from '{0}'", element.model.root.name)) : ( localize(4739, "Callers of '{0}'", element.model.root.name));
326
+ const title = this._direction === CallHierarchyDirection.CallsFrom ? ( localize(4760, "Calls from '{0}'", element.model.root.name)) : ( localize(4761, "Callers of '{0}'", element.model.root.name));
327
327
  this.setTitle(title);
328
328
  }
329
329
  showLoading() {
330
330
  this._parent.dataset["state"] = State.Loading;
331
- this.setTitle(( localize(4740, "Loading...")));
331
+ this.setTitle(( localize(4762, "Loading...")));
332
332
  this._show();
333
333
  }
334
334
  showMessage(message) {
@@ -346,7 +346,7 @@ let CallHierarchyTreePeekWidget = class CallHierarchyTreePeekWidget extends Peek
346
346
  const root = this._tree.getNode(model).children[0];
347
347
  await this._tree.expand(root.element);
348
348
  if (root.children.length === 0) {
349
- this.showMessage(this._direction === CallHierarchyDirection.CallsFrom ? ( localize(4741, "No calls from '{0}'", model.root.name)) : ( localize(4742, "No callers of '{0}'", model.root.name)));
349
+ this.showMessage(this._direction === CallHierarchyDirection.CallsFrom ? ( localize(4763, "No calls from '{0}'", model.root.name)) : ( localize(4764, "No callers of '{0}'", model.root.name)));
350
350
  } else {
351
351
  this._parent.dataset["state"] = State.Data;
352
352
  if (!viewState || this._tree.getFocus().length === 0) {
@@ -131,13 +131,13 @@ class AccessibilityProvider {
131
131
  this.getDirection = getDirection;
132
132
  }
133
133
  getWidgetAriaLabel() {
134
- return localize(4743, "Call Hierarchy");
134
+ return localize(4765, "Call Hierarchy");
135
135
  }
136
136
  getAriaLabel(element) {
137
137
  if (this.getDirection() === CallHierarchyDirection.CallsFrom) {
138
- return localize(4744, "calls from {0}", element.item.name);
138
+ return localize(4766, "calls from {0}", element.item.name);
139
139
  } else {
140
- return localize(4745, "callers of {0}", element.item.name);
140
+ return localize(4767, "callers of {0}", element.item.name);
141
141
  }
142
142
  }
143
143
  }
@@ -149,9 +149,7 @@ let CustomEditorService = class CustomEditorService extends Disposable {
149
149
  id: contributedEditor.id,
150
150
  label: contributedEditor.displayName,
151
151
  detail: contributedEditor.providerDisplayName,
152
- priority: contributedEditor.priority,
153
- diffEditorPriority: contributedEditor.diffEditorPriority,
154
- mergeEditorPriority: contributedEditor.mergeEditorPriority
152
+ priority: contributedEditor.priority
155
153
  }, {
156
154
  singlePerResource: () => !(this.getCustomEditorCapabilities(contributedEditor.id)?.supportsMultipleEditorsPerDocument ?? false)
157
155
  }, {
@@ -399,7 +397,7 @@ let CustomEditorService = class CustomEditorService extends Disposable {
399
397
  return;
400
398
  }
401
399
  const possibleEditors = this.getAllCustomEditors(newResource);
402
- if (!( possibleEditors.allEditors.some(editor => editor.priority !== RegisteredEditorPriority.option))) {
400
+ if (!( possibleEditors.allEditors.some(editor => editor.priority.editor !== RegisteredEditorPriority.option))) {
403
401
  return;
404
402
  }
405
403
  const editorsToReplace = ( new Map());
@@ -23,7 +23,7 @@ class ContributedCustomEditors extends Disposable {
23
23
  this._memento = ( new Memento(ContributedCustomEditors.CUSTOM_EDITORS_STORAGE_ID, storageService));
24
24
  const mementoObject = this._memento.getMemento(StorageScope.PROFILE, StorageTarget.MACHINE);
25
25
  for (const info of mementoObject[ContributedCustomEditors.CUSTOM_EDITORS_ENTRY_ID] || []) {
26
- this.add(( new CustomEditorInfo(info)));
26
+ this.add(( new CustomEditorInfo(normalizeStoredCustomEditorDescriptor(info))));
27
27
  }
28
28
  this._register(customEditorsExtensionPoint.setHandler(extensions => {
29
29
  this.update(extensions);
@@ -34,14 +34,17 @@ class ContributedCustomEditors extends Disposable {
34
34
  for (const extension of extensions) {
35
35
  const hasCustomEditorPriorityProposal = extension.description.enabledApiProposals?.includes("customEditorPriority") ?? false;
36
36
  for (const webviewEditorContribution of extension.value) {
37
+ const priority = getPriorityFromContribution(
38
+ webviewEditorContribution.priority,
39
+ extension.description,
40
+ hasCustomEditorPriorityProposal
41
+ );
37
42
  this.add(( new CustomEditorInfo({
38
43
  id: webviewEditorContribution.viewType,
39
44
  displayName: webviewEditorContribution.displayName,
40
- providerDisplayName: extension.description.isBuiltin ? ( localize(8485, "Built-in")) : extension.description.displayName || extension.description.identifier.value,
45
+ providerDisplayName: extension.description.isBuiltin ? ( localize(8570, "Built-in")) : extension.description.displayName || extension.description.identifier.value,
41
46
  selector: webviewEditorContribution.selector || [],
42
- priority: getPriorityFromContribution(webviewEditorContribution, extension.description, "priority") ?? RegisteredEditorPriority.default,
43
- diffEditorPriority: hasCustomEditorPriorityProposal ? getPriorityFromContribution(webviewEditorContribution, extension.description, "diffEditorPriority") : undefined,
44
- mergeEditorPriority: hasCustomEditorPriorityProposal ? getPriorityFromContribution(webviewEditorContribution, extension.description, "mergeEditorPriority") : undefined
47
+ priority
45
48
  })));
46
49
  }
47
50
  }
@@ -67,8 +70,35 @@ class ContributedCustomEditors extends Disposable {
67
70
  this._editors.set(info.id, info);
68
71
  }
69
72
  }
70
- function getPriorityFromContribution(contribution, extension, field) {
71
- const value = contribution[field];
73
+ function normalizeStoredCustomEditorDescriptor(descriptor) {
74
+ return {
75
+ id: descriptor.id,
76
+ displayName: descriptor.displayName,
77
+ providerDisplayName: descriptor.providerDisplayName,
78
+ selector: descriptor.selector,
79
+ priority: typeof descriptor.priority === "string" ? {
80
+ editor: descriptor.priority,
81
+ diff: descriptor.priority,
82
+ merge: descriptor.priority
83
+ } : {
84
+ editor: descriptor.priority.editor,
85
+ diff: descriptor.priority.diff ?? descriptor.priority.editor,
86
+ merge: descriptor.priority.merge ?? descriptor.priority.editor
87
+ }
88
+ };
89
+ }
90
+ function getPriorityFromContribution(contribution, extension, includeDiffAndMergePriority) {
91
+ const editorPriority = getSinglePriorityFromContribution(
92
+ typeof contribution === "string" ? contribution : contribution?.editor,
93
+ extension
94
+ ) ?? RegisteredEditorPriority.default;
95
+ return {
96
+ editor: editorPriority,
97
+ diff: includeDiffAndMergePriority && typeof contribution !== "string" ? getSinglePriorityFromContribution(contribution?.diff, extension) ?? editorPriority : editorPriority,
98
+ merge: includeDiffAndMergePriority && typeof contribution !== "string" ? getSinglePriorityFromContribution(contribution?.merge, extension) ?? editorPriority : editorPriority
99
+ };
100
+ }
101
+ function getSinglePriorityFromContribution(value, extension) {
72
102
  switch (value) {
73
103
  case CustomEditorPriority.default:
74
104
  return RegisteredEditorPriority.default;
@@ -4,7 +4,7 @@ import { IDisposable, IReference } from "@codingame/monaco-vscode-api/vscode/vs/
4
4
  import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
5
5
  import { RawContextKey } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey";
6
6
  import { IRevertOptions, ISaveOptions } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor";
7
- import { RegisteredEditorPriority } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorResolverService";
7
+ import { RegisteredEditorPriorityInfo } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorResolverService";
8
8
  export declare const CONTEXT_ACTIVE_CUSTOM_EDITOR_ID: RawContextKey<string>;
9
9
  export declare const CONTEXT_FOCUSED_CUSTOM_EDITOR_IS_EDITABLE: RawContextKey<boolean>;
10
10
  export interface CustomEditorCapabilities {
@@ -47,22 +47,19 @@ export declare enum CustomEditorDiffEditorLayout {
47
47
  export interface CustomEditorSelector {
48
48
  readonly filenamePattern?: string;
49
49
  }
50
+ export type CustomEditorPriorityInfo = RegisteredEditorPriorityInfo;
50
51
  export interface CustomEditorDescriptor {
51
52
  readonly id: string;
52
53
  readonly displayName: string;
53
54
  readonly providerDisplayName: string;
54
- readonly priority: RegisteredEditorPriority;
55
- readonly diffEditorPriority?: RegisteredEditorPriority;
56
- readonly mergeEditorPriority?: RegisteredEditorPriority;
55
+ readonly priority: CustomEditorPriorityInfo;
57
56
  readonly selector: readonly CustomEditorSelector[];
58
57
  }
59
58
  export declare class CustomEditorInfo implements CustomEditorDescriptor {
60
59
  readonly id: string;
61
60
  readonly displayName: string;
62
61
  readonly providerDisplayName: string;
63
- readonly priority: RegisteredEditorPriority;
64
- readonly diffEditorPriority?: RegisteredEditorPriority;
65
- readonly mergeEditorPriority?: RegisteredEditorPriority;
62
+ readonly priority: CustomEditorPriorityInfo;
66
63
  readonly selector: readonly CustomEditorSelector[];
67
64
  constructor(descriptor: CustomEditorDescriptor);
68
65
  matches(resource: URI): boolean;
@@ -6,7 +6,7 @@ import { globMatchesResource, RegisteredEditorPriority, priorityToRank } from '@
6
6
 
7
7
  const CONTEXT_ACTIVE_CUSTOM_EDITOR_ID = ( new RawContextKey("activeCustomEditorId", "", {
8
8
  type: "string",
9
- description: ( localize(8486, "The viewType of the currently active custom editor."))
9
+ description: ( localize(8571, "The viewType of the currently active custom editor."))
10
10
  }));
11
11
  const CONTEXT_FOCUSED_CUSTOM_EDITOR_IS_EDITABLE = ( new RawContextKey("focusedCustomEditorIsEditable", false));
12
12
  var CustomEditorPriority;
@@ -26,8 +26,6 @@ class CustomEditorInfo {
26
26
  this.displayName = descriptor.displayName;
27
27
  this.providerDisplayName = descriptor.providerDisplayName;
28
28
  this.priority = descriptor.priority;
29
- this.diffEditorPriority = descriptor.diffEditorPriority;
30
- this.mergeEditorPriority = descriptor.mergeEditorPriority;
31
29
  this.selector = descriptor.selector;
32
30
  }
33
31
  matches(resource) {
@@ -45,7 +43,7 @@ class CustomEditorInfoCollection {
45
43
  }
46
44
  get defaultEditor() {
47
45
  return this.allEditors.find(editor => {
48
- switch (editor.priority) {
46
+ switch (editor.priority.editor) {
49
47
  case RegisteredEditorPriority.default:
50
48
  case RegisteredEditorPriority.builtin:
51
49
  return this.allEditors.every(
@@ -58,13 +56,13 @@ class CustomEditorInfoCollection {
58
56
  }
59
57
  get bestAvailableEditor() {
60
58
  const editors = Array.from(this.allEditors).sort((a, b) => {
61
- return priorityToRank(a.priority) - priorityToRank(b.priority);
59
+ return priorityToRank(a.priority.editor) - priorityToRank(b.priority.editor);
62
60
  });
63
61
  return editors[0];
64
62
  }
65
63
  }
66
64
  function isLowerPriority(otherEditor, editor) {
67
- return priorityToRank(otherEditor.priority) < priorityToRank(editor.priority);
65
+ return priorityToRank(otherEditor.priority.editor) < priorityToRank(editor.priority.editor);
68
66
  }
69
67
 
70
68
  export { CONTEXT_ACTIVE_CUSTOM_EDITOR_ID, CONTEXT_FOCUSED_CUSTOM_EDITOR_IS_EDITABLE, CustomEditorDiffEditorLayout, CustomEditorInfo, CustomEditorInfoCollection, CustomEditorPriority };