@codingame/monaco-vscode-view-common-service-override 8.0.4 → 9.0.2
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 +3 -3
- package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +58 -58
- package/vscode/src/vs/workbench/browser/actions/listCommands.js +3 -3
- package/vscode/src/vs/workbench/browser/actions/navigationActions.js +6 -6
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js +21 -21
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.js +3 -3
- package/vscode/src/vs/workbench/browser/parts/compositeBar.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/compositePart.js +3 -3
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +159 -159
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +8 -8
- package/vscode/src/vs/workbench/browser/parts/editor/editorDropTarget.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/editor/editorPart.js +10 -10
- package/vscode/src/vs/workbench/browser/parts/editor/editorParts.js +19 -4
- package/vscode/src/vs/workbench/browser/parts/paneCompositeBar.js +2 -2
- package/vscode/src/vs/workbench/browser/parts/paneCompositePart.js +3 -3
- package/vscode/src/vs/workbench/browser/parts/panel/panelPart.js +3 -3
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarActions.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +12 -12
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +5 -5
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +3 -3
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +12 -12
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js +22 -19
- package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.js +8 -8
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.js +27 -27
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.js +14 -14
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/colors.js +13 -13
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +3 -3
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +11 -11
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js +5 -5
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +2 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewZones.js +1 -1
- package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.js +12 -12
- package/vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +10 -10
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +5 -5
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +3 -3
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +11 -1
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +5 -5
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +1 -1
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +20 -16
- package/vscode/src/vs/workbench/services/history/browser/historyService.js +9 -9
- package/vscode/src/vs/workbench/services/progress/browser/progressService.js +8 -8
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +2 -2
- package/vscode/src/vs/workbench/services/views/common/viewContainerModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/conflictActions.js +0 -271
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/fixedZoneWidget.js +0 -41
|
@@ -24,22 +24,22 @@ let DynamicEditorConfigurations = class DynamicEditorConfigurations extends Disp
|
|
|
24
24
|
static { this.AUTO_LOCK_EXTRA_EDITORS = [
|
|
25
25
|
{
|
|
26
26
|
id: 'workbench.input.interactive',
|
|
27
|
-
label: ( localize(
|
|
27
|
+
label: ( localize(9755, 'Interactive Window')),
|
|
28
28
|
priority: RegisteredEditorPriority.builtin
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
id: 'mainThreadWebview-markdown.preview',
|
|
32
|
-
label: ( localize(
|
|
32
|
+
label: ( localize(9756, "Markdown Preview")),
|
|
33
33
|
priority: RegisteredEditorPriority.builtin
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
id: 'mainThreadWebview-simpleBrowser.view',
|
|
37
|
-
label: ( localize(
|
|
37
|
+
label: ( localize(9757, "Simple Browser")),
|
|
38
38
|
priority: RegisteredEditorPriority.builtin
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
id: 'mainThreadWebview-browserPreview',
|
|
42
|
-
label: ( localize(
|
|
42
|
+
label: ( localize(9758, "Live Preview")),
|
|
43
43
|
priority: RegisteredEditorPriority.builtin
|
|
44
44
|
}
|
|
45
45
|
]; }
|
|
@@ -84,7 +84,7 @@ let DynamicEditorConfigurations = class DynamicEditorConfigurations extends Disp
|
|
|
84
84
|
'workbench.editor.autoLockGroups': {
|
|
85
85
|
type: 'object',
|
|
86
86
|
description: ( localize(
|
|
87
|
-
|
|
87
|
+
9759,
|
|
88
88
|
"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."
|
|
89
89
|
)),
|
|
90
90
|
properties: autoLockGroupConfiguration,
|
|
@@ -102,7 +102,7 @@ let DynamicEditorConfigurations = class DynamicEditorConfigurations extends Disp
|
|
|
102
102
|
default: '',
|
|
103
103
|
enum: [...binaryEditorCandidates, ''],
|
|
104
104
|
description: ( localize(
|
|
105
|
-
|
|
105
|
+
9760,
|
|
106
106
|
"The default editor for files detected as binary. If undefined, the user will be presented with a picker."
|
|
107
107
|
)),
|
|
108
108
|
}
|
|
@@ -115,7 +115,7 @@ let DynamicEditorConfigurations = class DynamicEditorConfigurations extends Disp
|
|
|
115
115
|
'workbench.editorAssociations': {
|
|
116
116
|
type: 'object',
|
|
117
117
|
markdownDescription: ( localize(
|
|
118
|
-
|
|
118
|
+
9761,
|
|
119
119
|
"Configure [glob patterns](https://aka.ms/vscode-glob-patterns) to editors (for example `\"*.hex\": \"hexEditor.hexedit\"`). These have precedence over the default behavior."
|
|
120
120
|
)),
|
|
121
121
|
patternProperties: {
|
|
@@ -137,7 +137,7 @@ let DynamicEditorConfigurations = class DynamicEditorConfigurations extends Disp
|
|
|
137
137
|
minimum: 1,
|
|
138
138
|
scope: ConfigurationScope.RESOURCE,
|
|
139
139
|
markdownDescription: ( localize(
|
|
140
|
-
|
|
140
|
+
9762,
|
|
141
141
|
"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."
|
|
142
142
|
)),
|
|
143
143
|
}
|
|
@@ -79,7 +79,7 @@ let DropOverlay = class DropOverlay extends Themable {
|
|
|
79
79
|
this.overlay.classList.add('editor-group-overlay-indicator');
|
|
80
80
|
container.appendChild(this.overlay);
|
|
81
81
|
if (this.enableDropIntoEditor) {
|
|
82
|
-
this.dropIntoPromptElement = renderFormattedText(( localize(
|
|
82
|
+
this.dropIntoPromptElement = renderFormattedText(( localize(10893, "Hold __{0}__ to drop into editor", isMacintosh ? '⇧' : 'Shift')), {});
|
|
83
83
|
this.dropIntoPromptElement.classList.add('editor-group-overlay-drop-into-prompt');
|
|
84
84
|
this.overlay.appendChild(this.dropIntoPromptElement);
|
|
85
85
|
}
|
|
@@ -108,7 +108,7 @@ let EditorPart = class EditorPart extends Part {
|
|
|
108
108
|
this.onDidChangeGroupMaximized = this._onDidChangeGroupMaximized.event;
|
|
109
109
|
this._onDidActivateGroup = this._register(( new Emitter()));
|
|
110
110
|
this.onDidActivateGroup = this._onDidActivateGroup.event;
|
|
111
|
-
this._onDidAddGroup = this._register(( new
|
|
111
|
+
this._onDidAddGroup = this._register(( new PauseableEmitter()));
|
|
112
112
|
this.onDidAddGroup = this._onDidAddGroup.event;
|
|
113
113
|
this._onDidRemoveGroup = this._register(( new PauseableEmitter()));
|
|
114
114
|
this.onDidRemoveGroup = this._onDidRemoveGroup.event;
|
|
@@ -121,6 +121,8 @@ let EditorPart = class EditorPart extends Part {
|
|
|
121
121
|
this.onDidScroll = Event.any(this.onDidSetGridWidget.event, this._onDidScroll.event);
|
|
122
122
|
this._onDidChangeEditorPartOptions = this._register(( new Emitter()));
|
|
123
123
|
this.onDidChangeEditorPartOptions = this._onDidChangeEditorPartOptions.event;
|
|
124
|
+
this._onWillDispose = this._register(( new Emitter()));
|
|
125
|
+
this.onWillDispose = this._onWillDispose.event;
|
|
124
126
|
this.workspaceMemento = this.getMemento(StorageScope.WORKSPACE, StorageTarget.USER);
|
|
125
127
|
this.profileMemento = this.getMemento(StorageScope.PROFILE, StorageTarget.MACHINE);
|
|
126
128
|
this.groupViews = ( new Map());
|
|
@@ -976,13 +978,16 @@ let EditorPart = class EditorPart extends Part {
|
|
|
976
978
|
}
|
|
977
979
|
async doApplyState(state, options) {
|
|
978
980
|
const groups = await this.doPrepareApplyState();
|
|
979
|
-
|
|
981
|
+
this._onDidAddGroup.pause();
|
|
982
|
+
this._onDidRemoveGroup.pause();
|
|
983
|
+
this.disposeGroups();
|
|
980
984
|
this.mostRecentActiveGroups = state.mostRecentActiveGroups;
|
|
981
985
|
try {
|
|
982
986
|
this.doApplyGridState(state.serializedGrid, state.activeGroup, undefined, options);
|
|
983
987
|
}
|
|
984
988
|
finally {
|
|
985
|
-
|
|
989
|
+
this._onDidRemoveGroup.resume();
|
|
990
|
+
this._onDidAddGroup.resume();
|
|
986
991
|
}
|
|
987
992
|
await this.activeGroup.openEditors(( groups
|
|
988
993
|
.flatMap(group => group.editors)
|
|
@@ -1027,21 +1032,16 @@ let EditorPart = class EditorPart extends Part {
|
|
|
1027
1032
|
type: Parts.EDITOR_PART
|
|
1028
1033
|
};
|
|
1029
1034
|
}
|
|
1030
|
-
disposeGroups(
|
|
1031
|
-
if (surpressEvents) {
|
|
1032
|
-
this._onDidRemoveGroup.pause();
|
|
1033
|
-
}
|
|
1035
|
+
disposeGroups() {
|
|
1034
1036
|
for (const group of this.groups) {
|
|
1035
1037
|
group.dispose();
|
|
1036
1038
|
this._onDidRemoveGroup.fire(group);
|
|
1037
1039
|
}
|
|
1038
1040
|
this.groupViews.clear();
|
|
1039
1041
|
this.mostRecentActiveGroups = [];
|
|
1040
|
-
if (surpressEvents) {
|
|
1041
|
-
return () => this._onDidRemoveGroup.resume();
|
|
1042
|
-
}
|
|
1043
1042
|
}
|
|
1044
1043
|
dispose() {
|
|
1044
|
+
this._onWillDispose.fire();
|
|
1045
1045
|
this.disposeGroups();
|
|
1046
1046
|
this.gridWidget?.dispose();
|
|
1047
1047
|
super.dispose();
|
|
@@ -3,7 +3,7 @@ import { localize } from 'vscode/vscode/vs/nls';
|
|
|
3
3
|
import { GroupsOrder, GroupLocation } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService';
|
|
4
4
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
5
5
|
import { Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
6
|
-
import { DisposableMap,
|
|
6
|
+
import { DisposableMap, toDisposable, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
7
7
|
import { MainEditorPart } from './editorPart.js';
|
|
8
8
|
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
9
9
|
import { firstOrDefault, distinct } from 'vscode/vscode/vs/base/common/arrays';
|
|
@@ -17,6 +17,8 @@ import { IAuxiliaryWindowService } from 'vscode/vscode/vs/workbench/services/aux
|
|
|
17
17
|
import { generateUuid } from 'vscode/vscode/vs/base/common/uuid';
|
|
18
18
|
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
19
19
|
import { isHTMLElement } from 'vscode/vscode/vs/base/browser/dom';
|
|
20
|
+
import { ServiceCollection } from 'vscode/vscode/vs/platform/instantiation/common/serviceCollection';
|
|
21
|
+
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
20
22
|
|
|
21
23
|
var EditorParts_1;
|
|
22
24
|
let EditorParts = class EditorParts extends MultiWindowParts {
|
|
@@ -29,6 +31,7 @@ let EditorParts = class EditorParts extends MultiWindowParts {
|
|
|
29
31
|
this.contextKeyService = contextKeyService;
|
|
30
32
|
this.mainPart = this._register(this.createMainEditorPart());
|
|
31
33
|
this.mostRecentActiveParts = [this.mainPart];
|
|
34
|
+
this.mapPartToInstantiationService = ( (new Map()));
|
|
32
35
|
this._onDidCreateAuxiliaryEditorPart = this._register(( (new Emitter())));
|
|
33
36
|
this.onDidCreateAuxiliaryEditorPart = this._onDidCreateAuxiliaryEditorPart.event;
|
|
34
37
|
this.workspaceMemento = this.getMemento(StorageScope.WORKSPACE, StorageTarget.USER);
|
|
@@ -76,11 +79,23 @@ let EditorParts = class EditorParts extends MultiWindowParts {
|
|
|
76
79
|
createMainEditorPart() {
|
|
77
80
|
return this.instantiationService.createInstance(MainEditorPart, this);
|
|
78
81
|
}
|
|
82
|
+
getScopedInstantiationService(part) {
|
|
83
|
+
if (part === this.mainPart) {
|
|
84
|
+
if (!( (this.mapPartToInstantiationService.has(part.windowId)))) {
|
|
85
|
+
this.instantiationService.invokeFunction(accessor => {
|
|
86
|
+
const editorService = accessor.get(IEditorService);
|
|
87
|
+
this.mapPartToInstantiationService.set(part.windowId, this._register(this.instantiationService.createChild(( (new ServiceCollection([IEditorService, editorService.createScoped('main', this._store)]))))));
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return this.mapPartToInstantiationService.get(part.windowId) ?? this.instantiationService;
|
|
92
|
+
}
|
|
79
93
|
async createAuxiliaryEditorPart(options) {
|
|
80
94
|
const { part, instantiationService, disposables } = await this.instantiationService.createInstance(AuxiliaryEditorPart, this).create(this.getGroupsLabel(this._parts.size), options);
|
|
95
|
+
this.mapPartToInstantiationService.set(part.windowId, instantiationService);
|
|
96
|
+
disposables.add(toDisposable(() => this.mapPartToInstantiationService.delete(part.windowId)));
|
|
81
97
|
this._onDidAddGroup.fire(part.activeGroup);
|
|
82
|
-
|
|
83
|
-
this._onDidCreateAuxiliaryEditorPart.fire({ part, instantiationService, disposables: eventDisposables });
|
|
98
|
+
this._onDidCreateAuxiliaryEditorPart.fire(part);
|
|
84
99
|
return part;
|
|
85
100
|
}
|
|
86
101
|
registerPart(part) {
|
|
@@ -125,7 +140,7 @@ let EditorParts = class EditorParts extends MultiWindowParts {
|
|
|
125
140
|
}
|
|
126
141
|
}
|
|
127
142
|
getGroupsLabel(index) {
|
|
128
|
-
return ( localize(
|
|
143
|
+
return ( localize(3533, "Window {0}", index + 1));
|
|
129
144
|
}
|
|
130
145
|
getPart(groupOrElement) {
|
|
131
146
|
if (this._parts.size > 1) {
|
|
@@ -95,7 +95,7 @@ let PaneCompositeBar = class PaneCompositeBar extends Disposable {
|
|
|
95
95
|
const viewContainer = this.viewDescriptorService.getViewContainerById(compositeId);
|
|
96
96
|
const defaultLocation = this.viewDescriptorService.getDefaultViewContainerLocation(viewContainer);
|
|
97
97
|
if (defaultLocation !== this.viewDescriptorService.getViewContainerLocation(viewContainer)) {
|
|
98
|
-
actions.push(toAction({ id: 'resetLocationAction', label: ( localize(
|
|
98
|
+
actions.push(toAction({ id: 'resetLocationAction', label: ( localize(9335, "Reset Location")), run: () => this.viewDescriptorService.moveViewContainerToLocation(viewContainer, defaultLocation, undefined, 'resetLocationAction') }));
|
|
99
99
|
}
|
|
100
100
|
else {
|
|
101
101
|
const viewContainerModel = this.viewDescriptorService.getViewContainerModel(viewContainer);
|
|
@@ -103,7 +103,7 @@ let PaneCompositeBar = class PaneCompositeBar extends Disposable {
|
|
|
103
103
|
const viewToReset = viewContainerModel.allViewDescriptors[0];
|
|
104
104
|
const defaultContainer = this.viewDescriptorService.getDefaultContainerById(viewToReset.id);
|
|
105
105
|
if (defaultContainer !== viewContainer) {
|
|
106
|
-
actions.push(toAction({ id: 'resetLocationAction', label: ( localize(
|
|
106
|
+
actions.push(toAction({ id: 'resetLocationAction', label: ( localize(9335, "Reset Location")), run: () => this.viewDescriptorService.moveViewsToContainer([viewToReset], defaultContainer, undefined, 'resetLocationAction') }));
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
}
|
|
@@ -142,7 +142,7 @@ let AbstractPaneCompositePart = class AbstractPaneCompositePart extends Composit
|
|
|
142
142
|
this.emptyPaneMessageElement.classList.add('empty-pane-message-area');
|
|
143
143
|
const messageElement = document.createElement('div');
|
|
144
144
|
messageElement.classList.add('empty-pane-message');
|
|
145
|
-
messageElement.innerText = ( localize(
|
|
145
|
+
messageElement.innerText = ( localize(9332, "Drag a view here to display."));
|
|
146
146
|
this.emptyPaneMessageElement.appendChild(messageElement);
|
|
147
147
|
parent.appendChild(this.emptyPaneMessageElement);
|
|
148
148
|
this._register(CompositeDragAndDropObserver.INSTANCE.registerTarget(this.emptyPaneMessageElement, {
|
|
@@ -192,7 +192,7 @@ let AbstractPaneCompositePart = class AbstractPaneCompositePart extends Composit
|
|
|
192
192
|
orientation: ActionsOrientation.HORIZONTAL,
|
|
193
193
|
getKeyBinding: action => this.keybindingService.lookupKeybinding(action.id),
|
|
194
194
|
anchorAlignmentProvider: () => this.getTitleAreaDropDownAnchorAlignment(),
|
|
195
|
-
toggleMenuTitle: ( localize(
|
|
195
|
+
toggleMenuTitle: ( localize(9333, "More Actions...")),
|
|
196
196
|
hoverDelegate: this.toolbarHoverDelegate,
|
|
197
197
|
hiddenItemStrategy: HiddenItemStrategy.NoHide
|
|
198
198
|
}));
|
|
@@ -450,7 +450,7 @@ let AbstractPaneCompositePart = class AbstractPaneCompositePart extends Composit
|
|
|
450
450
|
const menu = this.menuService.getMenuActions(ViewsSubMenu, scopedContextKeyService, { shouldForwardArgs: true, renderShortTitle: true });
|
|
451
451
|
createAndFillInActionBarActions(menu, { primary: viewsActions, secondary: [] }, () => true);
|
|
452
452
|
disposables.dispose();
|
|
453
|
-
return viewsActions.length > 1 && ( (viewsActions.some(a => a.enabled))) ? ( (new SubmenuAction('views', ( localize(
|
|
453
|
+
return viewsActions.length > 1 && ( (viewsActions.some(a => a.enabled))) ? ( (new SubmenuAction('views', ( localize(9334, "Views")), viewsActions))) : undefined;
|
|
454
454
|
}
|
|
455
455
|
return undefined;
|
|
456
456
|
}
|
|
@@ -114,9 +114,9 @@ let PanelPart = class PanelPart extends AbstractPaneCompositePart {
|
|
|
114
114
|
createAndFillInContextMenuActions(panelAlignMenu, { primary: [], secondary: alignActions });
|
|
115
115
|
actions.push(...[
|
|
116
116
|
( (new Separator())),
|
|
117
|
-
( (new SubmenuAction('workbench.action.panel.position', ( localize(
|
|
118
|
-
( (new SubmenuAction('workbench.action.panel.align', ( localize(
|
|
119
|
-
toAction({ id: TogglePanelAction.ID, label: ( localize(
|
|
117
|
+
( (new SubmenuAction('workbench.action.panel.position', ( localize(3745, "Panel Position")), positionActions))),
|
|
118
|
+
( (new SubmenuAction('workbench.action.panel.align', ( localize(3746, "Align Panel")), alignActions))),
|
|
119
|
+
toAction({ id: TogglePanelAction.ID, label: ( localize(3747, "Hide Panel")), run: () => this.commandService.executeCommand(TogglePanelAction.ID) })
|
|
120
120
|
]);
|
|
121
121
|
}
|
|
122
122
|
layout(width, height, top, left) {
|
|
@@ -13,7 +13,7 @@ class FocusSideBarAction extends Action2 {
|
|
|
13
13
|
constructor() {
|
|
14
14
|
super({
|
|
15
15
|
id: 'workbench.action.focusSideBar',
|
|
16
|
-
title: ( localize2(
|
|
16
|
+
title: ( localize2(9331, 'Focus into Primary Side Bar')),
|
|
17
17
|
category: Categories.View,
|
|
18
18
|
f1: true,
|
|
19
19
|
keybinding: {
|
|
@@ -217,7 +217,7 @@ let SidebarPart = class SidebarPart extends AbstractPaneCompositePart {
|
|
|
217
217
|
constructor() {
|
|
218
218
|
super({
|
|
219
219
|
id: ToggleActivityBarVisibilityActionId,
|
|
220
|
-
title: ( localize2(
|
|
220
|
+
title: ( localize2(3725, "Toggle Activity Bar Visibility")),
|
|
221
221
|
});
|
|
222
222
|
}
|
|
223
223
|
run() {
|
|
@@ -23,12 +23,12 @@ import { registerIcon } from 'vscode/vscode/vs/platform/theme/common/iconRegistr
|
|
|
23
23
|
import { isCancellationError } from 'vscode/vscode/vs/base/common/errors';
|
|
24
24
|
|
|
25
25
|
var CallHierarchyController_1;
|
|
26
|
-
const _ctxHasCallHierarchyProvider = ( (new RawContextKey('editorHasCallHierarchyProvider', false, ( localize(
|
|
27
|
-
const _ctxCallHierarchyVisible = ( (new RawContextKey('callHierarchyVisible', false, ( localize(
|
|
26
|
+
const _ctxHasCallHierarchyProvider = ( (new RawContextKey('editorHasCallHierarchyProvider', false, ( localize(4117, 'Whether a call hierarchy provider is available')))));
|
|
27
|
+
const _ctxCallHierarchyVisible = ( (new RawContextKey('callHierarchyVisible', false, ( localize(4118, 'Whether call hierarchy peek is currently showing')))));
|
|
28
28
|
const _ctxCallHierarchyDirection = ( (new RawContextKey(
|
|
29
29
|
'callHierarchyDirection',
|
|
30
30
|
undefined,
|
|
31
|
-
{ type: 'string', description: ( localize(
|
|
31
|
+
{ type: 'string', description: ( localize(4119, 'Whether call hierarchy shows incoming or outgoing calls')) }
|
|
32
32
|
)));
|
|
33
33
|
function sanitizedDirection(candidate) {
|
|
34
34
|
return candidate === CallHierarchyDirection.CallsFrom || candidate === CallHierarchyDirection.CallsTo
|
|
@@ -116,14 +116,14 @@ let CallHierarchyController = class CallHierarchyController {
|
|
|
116
116
|
this._widget.showModel(model);
|
|
117
117
|
}
|
|
118
118
|
else {
|
|
119
|
-
this._widget.showMessage(( localize(
|
|
119
|
+
this._widget.showMessage(( localize(4120, "No results")));
|
|
120
120
|
}
|
|
121
121
|
}).catch(err => {
|
|
122
122
|
if (isCancellationError(err)) {
|
|
123
123
|
this.endCallHierarchy();
|
|
124
124
|
return;
|
|
125
125
|
}
|
|
126
|
-
this._widget.showMessage(( localize(
|
|
126
|
+
this._widget.showMessage(( localize(4121, "Failed to show call hierarchy")));
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
129
|
showOutgoingCalls() {
|
|
@@ -151,7 +151,7 @@ registerAction2(class PeekCallHierarchyAction extends EditorAction2 {
|
|
|
151
151
|
constructor() {
|
|
152
152
|
super({
|
|
153
153
|
id: 'editor.showCallHierarchy',
|
|
154
|
-
title: ( localize2(
|
|
154
|
+
title: ( localize2(4122, 'Peek Call Hierarchy')),
|
|
155
155
|
menu: {
|
|
156
156
|
id: MenuId.EditorContextPeek,
|
|
157
157
|
group: 'navigation',
|
|
@@ -179,8 +179,8 @@ registerAction2(class extends EditorAction2 {
|
|
|
179
179
|
constructor() {
|
|
180
180
|
super({
|
|
181
181
|
id: 'editor.showIncomingCalls',
|
|
182
|
-
title: ( localize2(
|
|
183
|
-
icon: registerIcon('callhierarchy-incoming', Codicon.callIncoming, ( localize(
|
|
182
|
+
title: ( localize2(4123, 'Show Incoming Calls')),
|
|
183
|
+
icon: registerIcon('callhierarchy-incoming', Codicon.callIncoming, ( localize(4124, 'Icon for incoming calls in the call hierarchy view.'))),
|
|
184
184
|
precondition: ( (ContextKeyExpr.and(
|
|
185
185
|
_ctxCallHierarchyVisible,
|
|
186
186
|
(_ctxCallHierarchyDirection.isEqualTo(CallHierarchyDirection.CallsFrom))
|
|
@@ -204,8 +204,8 @@ registerAction2(class extends EditorAction2 {
|
|
|
204
204
|
constructor() {
|
|
205
205
|
super({
|
|
206
206
|
id: 'editor.showOutgoingCalls',
|
|
207
|
-
title: ( localize2(
|
|
208
|
-
icon: registerIcon('callhierarchy-outgoing', Codicon.callOutgoing, ( localize(
|
|
207
|
+
title: ( localize2(4125, 'Show Outgoing Calls')),
|
|
208
|
+
icon: registerIcon('callhierarchy-outgoing', Codicon.callOutgoing, ( localize(4126, 'Icon for outgoing calls in the call hierarchy view.'))),
|
|
209
209
|
precondition: ( (ContextKeyExpr.and(
|
|
210
210
|
_ctxCallHierarchyVisible,
|
|
211
211
|
(_ctxCallHierarchyDirection.isEqualTo(CallHierarchyDirection.CallsTo))
|
|
@@ -229,7 +229,7 @@ registerAction2(class extends EditorAction2 {
|
|
|
229
229
|
constructor() {
|
|
230
230
|
super({
|
|
231
231
|
id: 'editor.refocusCallHierarchy',
|
|
232
|
-
title: ( localize2(
|
|
232
|
+
title: ( localize2(4127, 'Refocus Call Hierarchy')),
|
|
233
233
|
precondition: _ctxCallHierarchyVisible,
|
|
234
234
|
keybinding: {
|
|
235
235
|
weight: KeybindingWeight.WorkbenchContrib,
|
|
@@ -245,7 +245,7 @@ registerAction2(class extends EditorAction2 {
|
|
|
245
245
|
constructor() {
|
|
246
246
|
super({
|
|
247
247
|
id: 'editor.closeCallHierarchy',
|
|
248
|
-
title: ( localize(
|
|
248
|
+
title: ( localize(4128, 'Close')),
|
|
249
249
|
icon: Codicon.close,
|
|
250
250
|
precondition: _ctxCallHierarchyVisible,
|
|
251
251
|
keybinding: {
|
|
@@ -267,13 +267,13 @@ let CallHierarchyTreePeekWidget = class CallHierarchyTreePeekWidget extends Peek
|
|
|
267
267
|
}
|
|
268
268
|
this._previewDisposable.add(value);
|
|
269
269
|
const title = this._direction === CallHierarchyDirection.CallsFrom
|
|
270
|
-
? ( localize(
|
|
271
|
-
: ( localize(
|
|
270
|
+
? ( localize(9545, "Calls from '{0}'", element.model.root.name))
|
|
271
|
+
: ( localize(9546, "Callers of '{0}'", element.model.root.name));
|
|
272
272
|
this.setTitle(title);
|
|
273
273
|
}
|
|
274
274
|
showLoading() {
|
|
275
275
|
this._parent.dataset['state'] = State.Loading;
|
|
276
|
-
this.setTitle(( localize(
|
|
276
|
+
this.setTitle(( localize(9547, "Loading...")));
|
|
277
277
|
this._show();
|
|
278
278
|
}
|
|
279
279
|
showMessage(message) {
|
|
@@ -292,8 +292,8 @@ let CallHierarchyTreePeekWidget = class CallHierarchyTreePeekWidget extends Peek
|
|
|
292
292
|
await this._tree.expand(root.element);
|
|
293
293
|
if (root.children.length === 0) {
|
|
294
294
|
this.showMessage(this._direction === CallHierarchyDirection.CallsFrom
|
|
295
|
-
? ( localize(
|
|
296
|
-
: ( localize(
|
|
295
|
+
? ( localize(9548, "No calls from '{0}'", model.root.name))
|
|
296
|
+
: ( localize(9549, "No callers of '{0}'", model.root.name)));
|
|
297
297
|
}
|
|
298
298
|
else {
|
|
299
299
|
this._parent.dataset['state'] = State.Data;
|
|
@@ -128,14 +128,14 @@ class AccessibilityProvider {
|
|
|
128
128
|
this.getDirection = getDirection;
|
|
129
129
|
}
|
|
130
130
|
getWidgetAriaLabel() {
|
|
131
|
-
return ( localize(
|
|
131
|
+
return ( localize(11242, "Call Hierarchy"));
|
|
132
132
|
}
|
|
133
133
|
getAriaLabel(element) {
|
|
134
134
|
if (this.getDirection() === CallHierarchyDirection.CallsFrom) {
|
|
135
|
-
return ( localize(
|
|
135
|
+
return ( localize(11243, "calls from {0}", element.item.name));
|
|
136
136
|
}
|
|
137
137
|
else {
|
|
138
|
-
return ( localize(
|
|
138
|
+
return ( localize(11244, "callers of {0}", element.item.name));
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
}
|
|
@@ -98,7 +98,7 @@ let CustomEditorService = class CustomEditorService extends Disposable {
|
|
|
98
98
|
detail: contributedEditor.providerDisplayName,
|
|
99
99
|
priority: contributedEditor.priority,
|
|
100
100
|
}, {
|
|
101
|
-
singlePerResource: () => !this.getCustomEditorCapabilities(contributedEditor.id)?.supportsMultipleEditorsPerDocument ??
|
|
101
|
+
singlePerResource: () => !(this.getCustomEditorCapabilities(contributedEditor.id)?.supportsMultipleEditorsPerDocument ?? false)
|
|
102
102
|
}, {
|
|
103
103
|
createEditorInput: ({ resource }, group) => {
|
|
104
104
|
return { editor: CustomEditorInput.create(this.instantiationService, resource, contributedEditor.id, group.id) };
|
|
@@ -31,7 +31,7 @@ class ContributedCustomEditors extends Disposable {
|
|
|
31
31
|
this.add(( (new CustomEditorInfo({
|
|
32
32
|
id: webviewEditorContribution.viewType,
|
|
33
33
|
displayName: webviewEditorContribution.displayName,
|
|
34
|
-
providerDisplayName: extension.description.isBuiltin ? ( localize(
|
|
34
|
+
providerDisplayName: extension.description.isBuiltin ? ( localize(9533, "Built-in")) : extension.description.displayName || extension.description.identifier.value,
|
|
35
35
|
selector: webviewEditorContribution.selector || [],
|
|
36
36
|
priority: getPriorityFromContribution(webviewEditorContribution, extension.description),
|
|
37
37
|
}))));
|
|
@@ -5,7 +5,7 @@ import { globMatchesResource, RegisteredEditorPriority, priorityToRank } from 'v
|
|
|
5
5
|
|
|
6
6
|
const CONTEXT_ACTIVE_CUSTOM_EDITOR_ID = ( (new RawContextKey('activeCustomEditorId', '', {
|
|
7
7
|
type: 'string',
|
|
8
|
-
description: ( localize(
|
|
8
|
+
description: ( localize(9532, "The viewType of the currently active custom editor.")),
|
|
9
9
|
})));
|
|
10
10
|
const CONTEXT_FOCUSED_CUSTOM_EDITOR_IS_EDITABLE = ( (new RawContextKey('focusedCustomEditorIsEditable', false)));
|
|
11
11
|
var CustomEditorPriority;
|
|
@@ -15,7 +15,7 @@ const Fields = ( (Object.freeze({
|
|
|
15
15
|
priority: 'priority',
|
|
16
16
|
})));
|
|
17
17
|
const CustomEditorsContribution = {
|
|
18
|
-
description: ( localize(
|
|
18
|
+
description: ( localize(11230, 'Contributed custom editors.')),
|
|
19
19
|
type: 'array',
|
|
20
20
|
defaultSnippets: [{
|
|
21
21
|
body: [{
|
|
@@ -37,20 +37,20 @@ const CustomEditorsContribution = {
|
|
|
37
37
|
[Fields.viewType]: {
|
|
38
38
|
type: 'string',
|
|
39
39
|
markdownDescription: ( localize(
|
|
40
|
-
|
|
40
|
+
11231,
|
|
41
41
|
'Identifier for the custom editor. This must be unique across all custom editors, so we recommend including your extension id as part of `viewType`. The `viewType` is used when registering custom editors with `vscode.registerCustomEditorProvider` and in the `onCustomEditor:${id}` [activation event](https://code.visualstudio.com/api/references/activation-events).'
|
|
42
42
|
)),
|
|
43
43
|
},
|
|
44
44
|
[Fields.displayName]: {
|
|
45
45
|
type: 'string',
|
|
46
46
|
description: ( localize(
|
|
47
|
-
|
|
47
|
+
11232,
|
|
48
48
|
'Human readable name of the custom editor. This is displayed to users when selecting which editor to use.'
|
|
49
49
|
)),
|
|
50
50
|
},
|
|
51
51
|
[Fields.selector]: {
|
|
52
52
|
type: 'array',
|
|
53
|
-
description: ( localize(
|
|
53
|
+
description: ( localize(11233, 'Set of globs that the custom editor is enabled for.')),
|
|
54
54
|
items: {
|
|
55
55
|
type: 'object',
|
|
56
56
|
defaultSnippets: [{
|
|
@@ -61,7 +61,7 @@ const CustomEditorsContribution = {
|
|
|
61
61
|
properties: {
|
|
62
62
|
filenamePattern: {
|
|
63
63
|
type: 'string',
|
|
64
|
-
description: ( localize(
|
|
64
|
+
description: ( localize(11234, 'Glob that the custom editor is enabled for.')),
|
|
65
65
|
},
|
|
66
66
|
}
|
|
67
67
|
}
|
|
@@ -69,7 +69,7 @@ const CustomEditorsContribution = {
|
|
|
69
69
|
[Fields.priority]: {
|
|
70
70
|
type: 'string',
|
|
71
71
|
markdownDeprecationMessage: ( localize(
|
|
72
|
-
|
|
72
|
+
11235,
|
|
73
73
|
'Controls if the custom editor is enabled automatically when the user opens a file. This may be overridden by users using the `workbench.editorAssociations` setting.'
|
|
74
74
|
)),
|
|
75
75
|
enum: [
|
|
@@ -78,11 +78,11 @@ const CustomEditorsContribution = {
|
|
|
78
78
|
],
|
|
79
79
|
markdownEnumDescriptions: [
|
|
80
80
|
( localize(
|
|
81
|
-
|
|
81
|
+
11236,
|
|
82
82
|
'The editor is automatically used when the user opens a resource, provided that no other default custom editors are registered for that resource.'
|
|
83
83
|
)),
|
|
84
84
|
( localize(
|
|
85
|
-
|
|
85
|
+
11237,
|
|
86
86
|
'The editor is not automatically used when the user opens a resource, but a user can switch to the editor using the `Reopen With` command.'
|
|
87
87
|
)),
|
|
88
88
|
],
|
|
@@ -118,9 +118,9 @@ class CustomEditorsDataRenderer extends Disposable {
|
|
|
118
118
|
return { data: { headers: [], rows: [] }, dispose: () => { } };
|
|
119
119
|
}
|
|
120
120
|
const headers = [
|
|
121
|
-
( localize(
|
|
122
|
-
( localize(
|
|
123
|
-
( localize(
|
|
121
|
+
( localize(11238, "View Type")),
|
|
122
|
+
( localize(11239, "Priority")),
|
|
123
|
+
( localize(11240, "Filename Pattern")),
|
|
124
124
|
];
|
|
125
125
|
const rows = ( (customEditors
|
|
126
126
|
.map(customEditor => {
|
|
@@ -141,7 +141,7 @@ class CustomEditorsDataRenderer extends Disposable {
|
|
|
141
141
|
}
|
|
142
142
|
( (Registry.as(Extensions.ExtensionFeaturesRegistry))).registerExtensionFeature({
|
|
143
143
|
id: 'customEditors',
|
|
144
|
-
label: ( localize(
|
|
144
|
+
label: ( localize(11241, "Custom Editors")),
|
|
145
145
|
access: {
|
|
146
146
|
canToggle: false
|
|
147
147
|
},
|
package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js
CHANGED
|
@@ -26,12 +26,11 @@ import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storag
|
|
|
26
26
|
import { equals } from 'vscode/vscode/vs/base/common/arrays';
|
|
27
27
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
28
28
|
import { registerAction2, Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
29
|
-
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
30
29
|
import { Categories } from 'vscode/vscode/vs/platform/action/common/actionCommonCategories';
|
|
31
30
|
import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
32
|
-
import { ServiceCollection } from 'vscode/vscode/vs/platform/instantiation/common/serviceCollection';
|
|
33
31
|
import { nativeHoverDelegate } from 'vscode/vscode/vs/platform/hover/browser/hover';
|
|
34
32
|
import { IHoverService } from 'vscode/vscode/vs/platform/hover/browser/hover.service';
|
|
33
|
+
import { Event } from 'vscode/vscode/vs/base/common/event';
|
|
35
34
|
|
|
36
35
|
var LanguageStatus_1;
|
|
37
36
|
class LanguageStatusViewModel {
|
|
@@ -61,19 +60,23 @@ StoredCounter = ( (__decorate([
|
|
|
61
60
|
( (__param(0, IStorageService)))
|
|
62
61
|
], StoredCounter)));
|
|
63
62
|
let LanguageStatusContribution = class LanguageStatusContribution extends Disposable {
|
|
64
|
-
constructor(
|
|
63
|
+
constructor(editorGroupService) {
|
|
65
64
|
super();
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
65
|
+
this.editorGroupService = editorGroupService;
|
|
66
|
+
for (const part of editorGroupService.parts) {
|
|
67
|
+
this.createLanguageStatus(part);
|
|
68
|
+
}
|
|
69
|
+
this._register(editorGroupService.onDidCreateAuxiliaryEditorPart(part => this.createLanguageStatus(part)));
|
|
70
|
+
}
|
|
71
|
+
createLanguageStatus(part) {
|
|
72
|
+
const disposables = ( (new DisposableStore()));
|
|
73
|
+
Event.once(part.onWillDispose)(() => disposables.dispose());
|
|
74
|
+
const scopedInstantiationService = this.editorGroupService.getScopedInstantiationService(part);
|
|
75
|
+
disposables.add(scopedInstantiationService.createInstance(LanguageStatus));
|
|
71
76
|
}
|
|
72
77
|
};
|
|
73
78
|
LanguageStatusContribution = ( (__decorate([
|
|
74
|
-
( (__param(0,
|
|
75
|
-
( (__param(1, IEditorGroupsService))),
|
|
76
|
-
( (__param(2, IEditorService)))
|
|
79
|
+
( (__param(0, IEditorGroupsService)))
|
|
77
80
|
], LanguageStatusContribution)));
|
|
78
81
|
let LanguageStatus = class LanguageStatus {
|
|
79
82
|
static { LanguageStatus_1 = this; }
|
|
@@ -179,8 +182,8 @@ let LanguageStatus = class LanguageStatus {
|
|
|
179
182
|
isOneBusy = isOneBusy || (!isPinned && status.busy);
|
|
180
183
|
}
|
|
181
184
|
const props = {
|
|
182
|
-
name: ( localize(
|
|
183
|
-
ariaLabel: ( localize(
|
|
185
|
+
name: ( localize(4321, "Editor Language Status")),
|
|
186
|
+
ariaLabel: ( localize(4322, "Editor Language Status: {0}", ariaLabels.join(', next: '))),
|
|
184
187
|
tooltip: element,
|
|
185
188
|
command: ShowTooltipCommand,
|
|
186
189
|
text: isOneBusy ? `${text}\u00A0\u00A0$(sync~spin)` : text,
|
|
@@ -280,7 +283,7 @@ let LanguageStatus = class LanguageStatus {
|
|
|
280
283
|
store.add(actionBar);
|
|
281
284
|
let action;
|
|
282
285
|
if (!isPinned) {
|
|
283
|
-
action = ( (new Action('pin', ( localize(
|
|
286
|
+
action = ( (new Action('pin', ( localize(4323, "Add to Status Bar")), ThemeIcon.asClassName(Codicon.pin), true, () => {
|
|
284
287
|
this._dedicated.add(status.id);
|
|
285
288
|
this._statusBarService.updateEntryVisibility(status.id, true);
|
|
286
289
|
this._update();
|
|
@@ -288,7 +291,7 @@ let LanguageStatus = class LanguageStatus {
|
|
|
288
291
|
})));
|
|
289
292
|
}
|
|
290
293
|
else {
|
|
291
|
-
action = ( (new Action('unpin', ( localize(
|
|
294
|
+
action = ( (new Action('unpin', ( localize(4324, "Remove from Status Bar")), ThemeIcon.asClassName(Codicon.pinned), true, () => {
|
|
292
295
|
this._dedicated.delete(status.id);
|
|
293
296
|
this._statusBarService.updateEntryVisibility(status.id, false);
|
|
294
297
|
this._update();
|
|
@@ -330,10 +333,10 @@ let LanguageStatus = class LanguageStatus {
|
|
|
330
333
|
}
|
|
331
334
|
const textValue = typeof status.label === 'string' ? status.label : status.label.value;
|
|
332
335
|
if (status.detail) {
|
|
333
|
-
return { label: ( localize(
|
|
336
|
+
return { label: ( localize(4325, '{0}, {1}', textValue, status.detail)) };
|
|
334
337
|
}
|
|
335
338
|
else {
|
|
336
|
-
return { label: ( localize(
|
|
339
|
+
return { label: ( localize(4326, '{0}', textValue)) };
|
|
337
340
|
}
|
|
338
341
|
}
|
|
339
342
|
static _asStatusbarEntry(item) {
|
|
@@ -346,7 +349,7 @@ let LanguageStatus = class LanguageStatus {
|
|
|
346
349
|
}
|
|
347
350
|
const textValue = typeof item.label === 'string' ? item.label : item.label.shortValue;
|
|
348
351
|
return {
|
|
349
|
-
name: ( localize(
|
|
352
|
+
name: ( localize(4327, '{0} (Language Status)', item.name)),
|
|
350
353
|
text: item.busy ? `${textValue}\u00A0\u00A0$(sync~spin)` : textValue,
|
|
351
354
|
ariaLabel: LanguageStatus_1._accessibilityInformation(item).label,
|
|
352
355
|
role: item.accessibilityInfo?.role,
|
|
@@ -369,7 +372,7 @@ registerAction2(class extends Action2 {
|
|
|
369
372
|
constructor() {
|
|
370
373
|
super({
|
|
371
374
|
id: 'editor.inlayHints.Reset',
|
|
372
|
-
title: ( localize2(
|
|
375
|
+
title: ( localize2(4328, "Reset Language Status Interaction Counter")),
|
|
373
376
|
category: Categories.View,
|
|
374
377
|
f1: true
|
|
375
378
|
});
|