@codingame/monaco-vscode-view-common-service-override 33.0.9 → 34.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/service-override/vs/workbench/contrib/webview/browser/pre/index.html +14 -8
- package/vscode/src/vs/sessions/common/theme.d.ts +4 -0
- package/vscode/src/vs/sessions/common/theme.js +44 -26
- package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +65 -57
- package/vscode/src/vs/workbench/browser/actions/helpActions.js +20 -20
- 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/editor/editor.contribution.js +168 -168
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +9 -9
- package/vscode/src/vs/workbench/browser/parts/titlebar/menubar.contribution.js +8 -8
- package/vscode/src/vs/workbench/browser/workbench.zenMode.contribution.js +15 -15
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +12 -12
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +3 -3
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +3 -3
- 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 +13 -13
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.js +7 -7
- package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.js +8 -8
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.js +29 -29
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.js +14 -14
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.js +9 -3
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorAccessibilityHelp.js +5 -5
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/colors.js +13 -13
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/conflictActions.js +20 -20
- 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 +10 -10
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js +3 -3
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.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/scrollLocking/browser/scrollLocking.js +7 -7
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +10 -10
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +3 -3
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +3 -3
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +13 -1
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +5 -5
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditorInputSerializer.js +1 -0
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +1 -1
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +8 -8
- package/vscode/src/vs/workbench/services/history/browser/historyService.js +9 -9
- package/vscode/src/vs/workbench/services/progress/browser/progressService.js +10 -8
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.d.ts +0 -1
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +8 -15
- package/vscode/src/vs/workbench/services/views/browser/viewsService.js +9 -9
package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js
CHANGED
|
@@ -139,7 +139,7 @@ let ResultCodeEditorView = class ResultCodeEditorView extends CodeEditorView {
|
|
|
139
139
|
return;
|
|
140
140
|
}
|
|
141
141
|
this.editor.setModel(vm.model.resultTextModel);
|
|
142
|
-
reset(this.htmlElements.title, ...renderLabelWithIcons(( localize(
|
|
142
|
+
reset(this.htmlElements.title, ...renderLabelWithIcons(( localize(11685, "Result"))));
|
|
143
143
|
reset(
|
|
144
144
|
this.htmlElements.description,
|
|
145
145
|
...renderLabelWithIcons(this._labelService.getUriLabel(vm.model.resultTextModel.uri, {
|
|
@@ -158,7 +158,7 @@ let ResultCodeEditorView = class ResultCodeEditorView extends CodeEditorView {
|
|
|
158
158
|
return;
|
|
159
159
|
}
|
|
160
160
|
const count = model.unhandledConflictsCount.read(reader);
|
|
161
|
-
const text = count === 1 ? ( localize(
|
|
161
|
+
const text = count === 1 ? ( localize(11686, "{0} Conflict Remaining", count)) : ( localize(11687, "{0} Conflicts Remaining ", count));
|
|
162
162
|
remainingConflictsActionBar.clear();
|
|
163
163
|
remainingConflictsActionBar.push({
|
|
164
164
|
class: undefined,
|
|
@@ -169,7 +169,7 @@ let ResultCodeEditorView = class ResultCodeEditorView extends CodeEditorView {
|
|
|
169
169
|
vm.model.telemetry.reportConflictCounterClicked();
|
|
170
170
|
vm.goToNextModifiedBaseRange(m => !model.isHandled(m).read(undefined));
|
|
171
171
|
},
|
|
172
|
-
tooltip: count > 0 ? ( localize(
|
|
172
|
+
tooltip: count > 0 ? ( localize(11688, "Go to next conflict")) : ( localize(11689, "All conflicts handled, the merge can be completed now."))
|
|
173
173
|
});
|
|
174
174
|
}));
|
|
175
175
|
this._register(applyObservableDecorations(this.editor, this.decorations));
|
|
@@ -149,7 +149,7 @@ let MergeEditor = class MergeEditor extends AbstractTextEditor {
|
|
|
149
149
|
if (this.input) {
|
|
150
150
|
return this.input.getName();
|
|
151
151
|
}
|
|
152
|
-
return localize(
|
|
152
|
+
return localize(11690, "Text Merge Editor");
|
|
153
153
|
}
|
|
154
154
|
createEditorControl(parent, initialOptions) {
|
|
155
155
|
this.rootHtmlElement = parent;
|
|
@@ -238,7 +238,7 @@ let MergeEditorViewModel = class MergeEditorViewModel extends Disposable {
|
|
|
238
238
|
toggleActiveConflict(inputNumber) {
|
|
239
239
|
const activeModifiedBaseRange = this.activeModifiedBaseRange.get();
|
|
240
240
|
if (!activeModifiedBaseRange) {
|
|
241
|
-
this.notificationService.error(( localize(
|
|
241
|
+
this.notificationService.error(( localize(11691, "There is currently no conflict focused that can be toggled.")));
|
|
242
242
|
return;
|
|
243
243
|
}
|
|
244
244
|
transaction(tx => {
|
|
@@ -26,11 +26,11 @@ let KeyboardLayoutPickerContribution = class KeyboardLayoutPickerContribution ex
|
|
|
26
26
|
this.keyboardLayoutService = keyboardLayoutService;
|
|
27
27
|
this.statusbarService = statusbarService;
|
|
28
28
|
this.pickerElement = this._register(( new MutableDisposable()));
|
|
29
|
-
const name = ( localize(
|
|
29
|
+
const name = ( localize(12413, "Keyboard Layout"));
|
|
30
30
|
const layout = this.keyboardLayoutService.getCurrentKeyboardLayout();
|
|
31
31
|
if (layout) {
|
|
32
32
|
const layoutInfo = parseKeyboardLayoutDescription(layout);
|
|
33
|
-
const text = ( localize(
|
|
33
|
+
const text = ( localize(12414, "Layout: {0}", layoutInfo.label));
|
|
34
34
|
this.pickerElement.value = this.statusbarService.addEntry({
|
|
35
35
|
name,
|
|
36
36
|
text,
|
|
@@ -42,7 +42,7 @@ let KeyboardLayoutPickerContribution = class KeyboardLayoutPickerContribution ex
|
|
|
42
42
|
const layout = this.keyboardLayoutService.getCurrentKeyboardLayout();
|
|
43
43
|
const layoutInfo = parseKeyboardLayoutDescription(layout);
|
|
44
44
|
if (this.pickerElement.value) {
|
|
45
|
-
const text = ( localize(
|
|
45
|
+
const text = ( localize(12414, "Layout: {0}", layoutInfo.label));
|
|
46
46
|
this.pickerElement.value.update({
|
|
47
47
|
name,
|
|
48
48
|
text,
|
|
@@ -50,7 +50,7 @@ let KeyboardLayoutPickerContribution = class KeyboardLayoutPickerContribution ex
|
|
|
50
50
|
command: KEYBOARD_LAYOUT_OPEN_PICKER
|
|
51
51
|
});
|
|
52
52
|
} else {
|
|
53
|
-
const text = ( localize(
|
|
53
|
+
const text = ( localize(12414, "Layout: {0}", layoutInfo.label));
|
|
54
54
|
this.pickerElement.value = this.statusbarService.addEntry({
|
|
55
55
|
name,
|
|
56
56
|
text,
|
|
@@ -68,17 +68,17 @@ registerWorkbenchContribution2(
|
|
|
68
68
|
WorkbenchPhase.BlockStartup
|
|
69
69
|
);
|
|
70
70
|
const DEFAULT_CONTENT = [`// ${( localize(
|
|
71
|
-
|
|
71
|
+
12415,
|
|
72
72
|
"Defines the keyboard layout used in VS Code in the browser environment."
|
|
73
73
|
))}`, `// ${( localize(
|
|
74
|
-
|
|
74
|
+
12416,
|
|
75
75
|
"Open VS Code and run \"Developer: Inspect Key Mappings (JSON)\" from Command Palette."
|
|
76
76
|
))}`, ``, `// Once you have the keyboard layout info, please paste it below.`, "\n"].join("\n");
|
|
77
77
|
registerAction2(class extends Action2 {
|
|
78
78
|
constructor() {
|
|
79
79
|
super({
|
|
80
80
|
id: KEYBOARD_LAYOUT_OPEN_PICKER,
|
|
81
|
-
title: ( localize2(
|
|
81
|
+
title: ( localize2(12417, "Change Keyboard Layout")),
|
|
82
82
|
f1: true
|
|
83
83
|
});
|
|
84
84
|
}
|
|
@@ -113,21 +113,21 @@ registerAction2(class extends Action2 {
|
|
|
113
113
|
const platform = isMacintosh ? "Mac" : isWindows ? "Win" : "Linux";
|
|
114
114
|
picks.unshift({
|
|
115
115
|
type: "separator",
|
|
116
|
-
label: ( localize(
|
|
116
|
+
label: ( localize(12418, "Keyboard Layouts ({0})", platform))
|
|
117
117
|
});
|
|
118
118
|
}
|
|
119
119
|
const configureKeyboardLayout = {
|
|
120
|
-
label: ( localize(
|
|
120
|
+
label: ( localize(12419, "Configure Keyboard Layout"))
|
|
121
121
|
};
|
|
122
122
|
picks.unshift(configureKeyboardLayout);
|
|
123
123
|
const autoDetectMode = {
|
|
124
|
-
label: ( localize(
|
|
124
|
+
label: ( localize(12420, "Auto Detect")),
|
|
125
125
|
description: isAutoDetect ? `Current: ${parseKeyboardLayoutDescription(currentLayout).label}` : undefined,
|
|
126
126
|
picked: isAutoDetect ? true : undefined
|
|
127
127
|
};
|
|
128
128
|
picks.unshift(autoDetectMode);
|
|
129
129
|
const pick = await quickInputService.pick(picks, {
|
|
130
|
-
placeHolder: ( localize(
|
|
130
|
+
placeHolder: ( localize(12421, "Select Keyboard Layout")),
|
|
131
131
|
matchOnDescription: true
|
|
132
132
|
});
|
|
133
133
|
if (!pick) {
|
|
@@ -153,7 +153,7 @@ registerAction2(class extends Action2 {
|
|
|
153
153
|
}
|
|
154
154
|
});
|
|
155
155
|
}, error => {
|
|
156
|
-
throw ( new Error(( localize(
|
|
156
|
+
throw ( new Error(( localize(12422, "Unable to create '{0}' ({1}).", (file.toString()), error))));
|
|
157
157
|
});
|
|
158
158
|
return Promise.resolve();
|
|
159
159
|
}
|
|
@@ -21,7 +21,7 @@ registerWorkbenchContribution2(
|
|
|
21
21
|
minimum: 1,
|
|
22
22
|
maximum: 20,
|
|
23
23
|
description: ( localize(
|
|
24
|
-
|
|
24
|
+
12989,
|
|
25
25
|
"Controls the feedback area size in pixels of the dragging area in between views/editors. Set it to a larger value if you feel it's hard to resize views using the mouse."
|
|
26
26
|
))
|
|
27
27
|
},
|
|
@@ -31,7 +31,7 @@ registerWorkbenchContribution2(
|
|
|
31
31
|
minimum: 0,
|
|
32
32
|
maximum: 2000,
|
|
33
33
|
description: ( localize(
|
|
34
|
-
|
|
34
|
+
12990,
|
|
35
35
|
"Controls the hover feedback delay in milliseconds of the dragging area in between views/editors."
|
|
36
36
|
))
|
|
37
37
|
}
|
|
@@ -122,8 +122,8 @@ let SyncScroll = class SyncScroll extends Disposable {
|
|
|
122
122
|
toggleStatusbarItem(active) {
|
|
123
123
|
if (active) {
|
|
124
124
|
if (!this.statusBarEntry.value) {
|
|
125
|
-
const text = ( localize(
|
|
126
|
-
const tooltip = ( localize(
|
|
125
|
+
const text = ( localize(13190, "Scrolling Locked"));
|
|
126
|
+
const tooltip = ( localize(13191, "Lock Scrolling Enabled"));
|
|
127
127
|
this.statusBarEntry.value = this.statusbarService.addEntry({
|
|
128
128
|
name: text,
|
|
129
129
|
text,
|
|
@@ -148,13 +148,13 @@ let SyncScroll = class SyncScroll extends Disposable {
|
|
|
148
148
|
super({
|
|
149
149
|
id: "workbench.action.toggleLockedScrolling",
|
|
150
150
|
title: {
|
|
151
|
-
...( localize2(
|
|
152
|
-
mnemonicTitle: ( localize(
|
|
151
|
+
...( localize2(13192, "Toggle Locked Scrolling Across Editors")),
|
|
152
|
+
mnemonicTitle: ( localize(13193, "Locked Scrolling"))
|
|
153
153
|
},
|
|
154
154
|
category: Categories.View,
|
|
155
155
|
f1: true,
|
|
156
156
|
metadata: {
|
|
157
|
-
description: ( localize(
|
|
157
|
+
description: ( localize(13194, "Synchronize Scrolling Editors"))
|
|
158
158
|
}
|
|
159
159
|
});
|
|
160
160
|
}
|
|
@@ -167,8 +167,8 @@ let SyncScroll = class SyncScroll extends Disposable {
|
|
|
167
167
|
super({
|
|
168
168
|
id: "workbench.action.holdLockedScrolling",
|
|
169
169
|
title: {
|
|
170
|
-
...( localize2(
|
|
171
|
-
mnemonicTitle: ( localize(
|
|
170
|
+
...( localize2(13195, "Hold Locked Scrolling Across Editors")),
|
|
171
|
+
mnemonicTitle: ( localize(13196, "Locked Scrolling"))
|
|
172
172
|
},
|
|
173
173
|
category: Categories.View
|
|
174
174
|
});
|
|
@@ -22,11 +22,11 @@ import { TypeHierarchyTreePeekWidget } from './typeHierarchyPeek.js';
|
|
|
22
22
|
import { TypeHierarchyDirection, TypeHierarchyProviderRegistry, TypeHierarchyModel } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/typeHierarchy/common/typeHierarchy';
|
|
23
23
|
|
|
24
24
|
var TypeHierarchyController_1;
|
|
25
|
-
const _ctxHasTypeHierarchyProvider = ( new RawContextKey("editorHasTypeHierarchyProvider", false, ( localize(
|
|
26
|
-
const _ctxTypeHierarchyVisible = ( new RawContextKey("typeHierarchyVisible", false, ( localize(
|
|
25
|
+
const _ctxHasTypeHierarchyProvider = ( new RawContextKey("editorHasTypeHierarchyProvider", false, ( localize(15612, "Whether a type hierarchy provider is available"))));
|
|
26
|
+
const _ctxTypeHierarchyVisible = ( new RawContextKey("typeHierarchyVisible", false, ( localize(15613, "Whether type hierarchy peek is currently showing"))));
|
|
27
27
|
const _ctxTypeHierarchyDirection = ( new RawContextKey("typeHierarchyDirection", undefined, {
|
|
28
28
|
type: "string",
|
|
29
|
-
description: ( localize(
|
|
29
|
+
description: ( localize(15614, "whether type hierarchy shows super types or subtypes"))
|
|
30
30
|
}));
|
|
31
31
|
function sanitizedDirection(candidate) {
|
|
32
32
|
return candidate === TypeHierarchyDirection.Subtypes || candidate === TypeHierarchyDirection.Supertypes ? candidate : TypeHierarchyDirection.Subtypes;
|
|
@@ -121,14 +121,14 @@ let TypeHierarchyController = class TypeHierarchyController {
|
|
|
121
121
|
this._sessionDisposables.add(model);
|
|
122
122
|
this._widget.showModel(model);
|
|
123
123
|
} else {
|
|
124
|
-
this._widget.showMessage(( localize(
|
|
124
|
+
this._widget.showMessage(( localize(15615, "No results")));
|
|
125
125
|
}
|
|
126
126
|
}).catch(err => {
|
|
127
127
|
if (isCancellationError(err)) {
|
|
128
128
|
this.endTypeHierarchy();
|
|
129
129
|
return;
|
|
130
130
|
}
|
|
131
|
-
this._widget.showMessage(( localize(
|
|
131
|
+
this._widget.showMessage(( localize(15616, "Failed to show type hierarchy")));
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
134
|
async startTypeHierarchyFromTypeHierarchy() {
|
|
@@ -179,7 +179,7 @@ registerAction2(class PeekTypeHierarchyAction extends EditorAction2 {
|
|
|
179
179
|
constructor() {
|
|
180
180
|
super({
|
|
181
181
|
id: "editor.showTypeHierarchy",
|
|
182
|
-
title: ( localize2(
|
|
182
|
+
title: ( localize2(15617, "Peek Type Hierarchy")),
|
|
183
183
|
menu: {
|
|
184
184
|
id: MenuId.EditorContextPeek,
|
|
185
185
|
group: "navigation",
|
|
@@ -198,7 +198,7 @@ registerAction2(class extends EditorAction2 {
|
|
|
198
198
|
constructor() {
|
|
199
199
|
super({
|
|
200
200
|
id: "editor.showSupertypes",
|
|
201
|
-
title: ( localize2(
|
|
201
|
+
title: ( localize2(15618, "Show Supertypes")),
|
|
202
202
|
icon: Codicon.typeHierarchySuper,
|
|
203
203
|
precondition: ( ContextKeyExpr.and(_ctxTypeHierarchyVisible, ( _ctxTypeHierarchyDirection.isEqualTo(TypeHierarchyDirection.Subtypes)))),
|
|
204
204
|
keybinding: {
|
|
@@ -220,7 +220,7 @@ registerAction2(class extends EditorAction2 {
|
|
|
220
220
|
constructor() {
|
|
221
221
|
super({
|
|
222
222
|
id: "editor.showSubtypes",
|
|
223
|
-
title: ( localize2(
|
|
223
|
+
title: ( localize2(15619, "Show Subtypes")),
|
|
224
224
|
icon: Codicon.typeHierarchySub,
|
|
225
225
|
precondition: ( ContextKeyExpr.and(_ctxTypeHierarchyVisible, ( _ctxTypeHierarchyDirection.isEqualTo(TypeHierarchyDirection.Supertypes)))),
|
|
226
226
|
keybinding: {
|
|
@@ -242,7 +242,7 @@ registerAction2(class extends EditorAction2 {
|
|
|
242
242
|
constructor() {
|
|
243
243
|
super({
|
|
244
244
|
id: "editor.refocusTypeHierarchy",
|
|
245
|
-
title: ( localize2(
|
|
245
|
+
title: ( localize2(15620, "Refocus Type Hierarchy")),
|
|
246
246
|
precondition: _ctxTypeHierarchyVisible,
|
|
247
247
|
keybinding: {
|
|
248
248
|
weight: KeybindingWeight.WorkbenchContrib,
|
|
@@ -258,7 +258,7 @@ registerAction2(class extends EditorAction2 {
|
|
|
258
258
|
constructor() {
|
|
259
259
|
super({
|
|
260
260
|
id: "editor.closeTypeHierarchy",
|
|
261
|
-
title: ( localize(
|
|
261
|
+
title: ( localize(15621, "Close")),
|
|
262
262
|
icon: Codicon.close,
|
|
263
263
|
precondition: _ctxTypeHierarchyVisible,
|
|
264
264
|
keybinding: {
|
|
@@ -326,12 +326,12 @@ let TypeHierarchyTreePeekWidget = class TypeHierarchyTreePeekWidget extends Peek
|
|
|
326
326
|
this._previewDisposable.add(toDisposable(() => decorationsCollection.clear()));
|
|
327
327
|
}
|
|
328
328
|
this._previewDisposable.add(value);
|
|
329
|
-
const title = this._direction === TypeHierarchyDirection.Supertypes ? ( localize(
|
|
329
|
+
const title = this._direction === TypeHierarchyDirection.Supertypes ? ( localize(15622, "Supertypes of '{0}'", element.model.root.name)) : ( localize(15623, "Subtypes of '{0}'", element.model.root.name));
|
|
330
330
|
this.setTitle(title);
|
|
331
331
|
}
|
|
332
332
|
showLoading() {
|
|
333
333
|
this._parent.dataset["state"] = State.Loading;
|
|
334
|
-
this.setTitle(( localize(
|
|
334
|
+
this.setTitle(( localize(15624, "Loading...")));
|
|
335
335
|
this._show();
|
|
336
336
|
}
|
|
337
337
|
showMessage(message) {
|
|
@@ -349,7 +349,7 @@ let TypeHierarchyTreePeekWidget = class TypeHierarchyTreePeekWidget extends Peek
|
|
|
349
349
|
const root = this._tree.getNode(model).children[0];
|
|
350
350
|
await this._tree.expand(root.element);
|
|
351
351
|
if (root.children.length === 0) {
|
|
352
|
-
this.showMessage(this._direction === TypeHierarchyDirection.Supertypes ? ( localize(
|
|
352
|
+
this.showMessage(this._direction === TypeHierarchyDirection.Supertypes ? ( localize(15625, "No supertypes of '{0}'", model.root.name)) : ( localize(15626, "No subtypes of '{0}'", model.root.name)));
|
|
353
353
|
} else {
|
|
354
354
|
this._parent.dataset["state"] = State.Data;
|
|
355
355
|
if (!viewState || this._tree.getFocus().length === 0) {
|
|
@@ -123,13 +123,13 @@ class AccessibilityProvider {
|
|
|
123
123
|
this.getDirection = getDirection;
|
|
124
124
|
}
|
|
125
125
|
getWidgetAriaLabel() {
|
|
126
|
-
return localize(
|
|
126
|
+
return localize(15627, "Type Hierarchy");
|
|
127
127
|
}
|
|
128
128
|
getAriaLabel(element) {
|
|
129
129
|
if (this.getDirection() === TypeHierarchyDirection.Supertypes) {
|
|
130
|
-
return localize(
|
|
130
|
+
return localize(15628, "supertypes of {0}", element.item.name);
|
|
131
131
|
} else {
|
|
132
|
-
return localize(
|
|
132
|
+
return localize(15629, "subtypes of {0}", element.item.name);
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
}
|
|
@@ -118,6 +118,8 @@ export declare class WebviewElement extends Disposable implements IWebviewElemen
|
|
|
118
118
|
private doUpdateContent;
|
|
119
119
|
protected style(): void;
|
|
120
120
|
protected handleFocusChange(isFocused: boolean): void;
|
|
121
|
+
private shouldForwardKeyEvent;
|
|
122
|
+
private isActiveElement;
|
|
121
123
|
private handleKeyEvent;
|
|
122
124
|
private handleDragEvent;
|
|
123
125
|
windowDidDragStart(): void;
|
|
@@ -174,6 +174,9 @@ let WebviewElement = class WebviewElement extends Disposable {
|
|
|
174
174
|
uri
|
|
175
175
|
}
|
|
176
176
|
) => {
|
|
177
|
+
if (!this.isActiveElement()) {
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
177
180
|
this._onDidClickLink.fire(uri);
|
|
178
181
|
}));
|
|
179
182
|
this._register(this.on("onmessage", (
|
|
@@ -220,7 +223,7 @@ let WebviewElement = class WebviewElement extends Disposable {
|
|
|
220
223
|
this._hasFindResult.fire(didFind);
|
|
221
224
|
}));
|
|
222
225
|
this._register(this.on("fatal-error", e => {
|
|
223
|
-
notificationService.error(( localize(
|
|
226
|
+
notificationService.error(( localize(15986, "Error loading webview: {0}", e.message)));
|
|
224
227
|
this._onFatalError.fire({
|
|
225
228
|
message: e.message
|
|
226
229
|
});
|
|
@@ -643,7 +646,16 @@ let WebviewElement = class WebviewElement extends Disposable {
|
|
|
643
646
|
this._onDidBlur.fire();
|
|
644
647
|
}
|
|
645
648
|
}
|
|
649
|
+
shouldForwardKeyEvent(event) {
|
|
650
|
+
return event.isTrusted || !!this._content.options.forwardUntrustedKeypressEvents;
|
|
651
|
+
}
|
|
652
|
+
isActiveElement() {
|
|
653
|
+
return !!this.element && this.window?.document.activeElement === this.element;
|
|
654
|
+
}
|
|
646
655
|
handleKeyEvent(type, event) {
|
|
656
|
+
if (!this.shouldForwardKeyEvent(event) || !this.isActiveElement()) {
|
|
657
|
+
return;
|
|
658
|
+
}
|
|
647
659
|
const emulatedKeyboardEvent = ( new KeyboardEvent(type, event));
|
|
648
660
|
Object.defineProperty(emulatedKeyboardEvent, "target", {
|
|
649
661
|
get: () => this.element
|
|
@@ -18,7 +18,7 @@ class ShowWebViewEditorFindWidgetAction extends Action2 {
|
|
|
18
18
|
this.ID = "editor.action.webvieweditor.showFind";
|
|
19
19
|
}
|
|
20
20
|
static {
|
|
21
|
-
this.LABEL = ( localize(
|
|
21
|
+
this.LABEL = ( localize(16017, "Show find"));
|
|
22
22
|
}
|
|
23
23
|
constructor() {
|
|
24
24
|
super({
|
|
@@ -43,7 +43,7 @@ class HideWebViewEditorFindCommand extends Action2 {
|
|
|
43
43
|
this.ID = "editor.action.webvieweditor.hideFind";
|
|
44
44
|
}
|
|
45
45
|
static {
|
|
46
|
-
this.LABEL = ( localize(
|
|
46
|
+
this.LABEL = ( localize(16018, "Stop find"));
|
|
47
47
|
}
|
|
48
48
|
constructor() {
|
|
49
49
|
super({
|
|
@@ -68,7 +68,7 @@ class WebViewEditorFindNextCommand extends Action2 {
|
|
|
68
68
|
this.ID = "editor.action.webvieweditor.findNext";
|
|
69
69
|
}
|
|
70
70
|
static {
|
|
71
|
-
this.LABEL = ( localize(
|
|
71
|
+
this.LABEL = ( localize(16019, "Find next"));
|
|
72
72
|
}
|
|
73
73
|
constructor() {
|
|
74
74
|
super({
|
|
@@ -93,7 +93,7 @@ class WebViewEditorFindPreviousCommand extends Action2 {
|
|
|
93
93
|
this.ID = "editor.action.webvieweditor.findPrevious";
|
|
94
94
|
}
|
|
95
95
|
static {
|
|
96
|
-
this.LABEL = ( localize(
|
|
96
|
+
this.LABEL = ( localize(16020, "Find previous"));
|
|
97
97
|
}
|
|
98
98
|
constructor() {
|
|
99
99
|
super({
|
|
@@ -118,7 +118,7 @@ class ReloadWebviewAction extends Action2 {
|
|
|
118
118
|
this.ID = "workbench.action.webview.reloadWebviewAction";
|
|
119
119
|
}
|
|
120
120
|
static {
|
|
121
|
-
this.LABEL = ( localize2(
|
|
121
|
+
this.LABEL = ( localize2(16021, "Reload Webviews"));
|
|
122
122
|
}
|
|
123
123
|
constructor() {
|
|
124
124
|
super({
|
package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditorInputSerializer.js
CHANGED
|
@@ -126,6 +126,7 @@ function restoreWebviewOptions(options) {
|
|
|
126
126
|
function restoreWebviewContentOptions(options) {
|
|
127
127
|
return {
|
|
128
128
|
...options,
|
|
129
|
+
forwardUntrustedKeypressEvents: options.forwardUntrustedKeypressEvents ?? true,
|
|
129
130
|
localResourceRoots: options.localResourceRoots?.map(uri => reviveUri(uri))
|
|
130
131
|
};
|
|
131
132
|
}
|
|
@@ -19,7 +19,7 @@ import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/ins
|
|
|
19
19
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
20
20
|
|
|
21
21
|
( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(
|
|
22
|
-
EditorPaneDescriptor.create(WebviewEditor, WebviewEditor.ID, ( localize(
|
|
22
|
+
EditorPaneDescriptor.create(WebviewEditor, WebviewEditor.ID, ( localize(16023, "webview editor"))),
|
|
23
23
|
[( new SyncDescriptor(WebviewInput))]
|
|
24
24
|
);
|
|
25
25
|
let WebviewPanelContribution = class WebviewPanelContribution extends Disposable {
|
|
@@ -636,8 +636,8 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
636
636
|
if (storedChoices[globForResource]?.find(editorID => editorID === currentEditor.editorId)) {
|
|
637
637
|
return;
|
|
638
638
|
}
|
|
639
|
-
const handle = this.notificationService.prompt(Severity.Warning, ( localize(
|
|
640
|
-
label: ( localize(
|
|
639
|
+
const handle = this.notificationService.prompt(Severity.Warning, ( localize(16865, "There are multiple default editors available for the resource.")), [{
|
|
640
|
+
label: ( localize(16866, "Configure Default")),
|
|
641
641
|
run: async () => {
|
|
642
642
|
const picked = await this.doPickEditor(untypedInput, true);
|
|
643
643
|
if (!picked) {
|
|
@@ -655,7 +655,7 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
655
655
|
}]);
|
|
656
656
|
}
|
|
657
657
|
}, {
|
|
658
|
-
label: ( localize(
|
|
658
|
+
label: ( localize(16867, "Keep {0}", editorName)),
|
|
659
659
|
run: writeCurrentEditorsToStorage
|
|
660
660
|
}]);
|
|
661
661
|
const onCloseListener = handle.onDidClose(() => {
|
|
@@ -681,9 +681,9 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
681
681
|
}
|
|
682
682
|
});
|
|
683
683
|
const quickPickEntries = [];
|
|
684
|
-
const currentlyActiveLabel = ( localize(
|
|
685
|
-
const currentDefaultLabel = ( localize(
|
|
686
|
-
const currentDefaultAndActiveLabel = ( localize(
|
|
684
|
+
const currentlyActiveLabel = ( localize(16868, "Active"));
|
|
685
|
+
const currentDefaultLabel = ( localize(16869, "Default"));
|
|
686
|
+
const currentDefaultAndActiveLabel = ( localize(16870, "Active and Default"));
|
|
687
687
|
let defaultViewType = defaultSetting;
|
|
688
688
|
if (!defaultViewType && registeredEditors.length > 2 && this.getEffectivePriority(registeredEditors[1].editorInfo, associationType) !== RegisteredEditorPriority.option) {
|
|
689
689
|
defaultViewType = registeredEditors[1]?.editorInfo.id;
|
|
@@ -710,7 +710,7 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
710
710
|
quickPickEntries.push(separator);
|
|
711
711
|
const configureDefaultEntry = {
|
|
712
712
|
id: EditorResolverService_1.configureDefaultID,
|
|
713
|
-
label: ( localize(
|
|
713
|
+
label: ( localize(16871, "Configure default editor for '{0}'...", `*${extname(resource)}`))
|
|
714
714
|
};
|
|
715
715
|
quickPickEntries.push(configureDefaultEntry);
|
|
716
716
|
}
|
|
@@ -731,7 +731,7 @@ let EditorResolverService = class EditorResolverService extends Disposable {
|
|
|
731
731
|
const editorPicker = disposables.add(this.quickInputService.createQuickPick({
|
|
732
732
|
useSeparators: true
|
|
733
733
|
}));
|
|
734
|
-
const placeHolderMessage = showDefaultPicker ? ( localize(
|
|
734
|
+
const placeHolderMessage = showDefaultPicker ? ( localize(16872, "Select new default editor for '{0}'", `*${extname(resource)}`)) : ( localize(16873, "Select editor for '{0}'", basename(resource)));
|
|
735
735
|
editorPicker.placeholder = placeHolderMessage;
|
|
736
736
|
editorPicker.canAcceptInBackground = true;
|
|
737
737
|
editorPicker.items = editorPicks;
|
|
@@ -101,33 +101,33 @@ let HistoryService = class HistoryService extends Disposable {
|
|
|
101
101
|
return matcher;
|
|
102
102
|
}));
|
|
103
103
|
this.editorHelper = this.instantiationService.createInstance(EditorHelper);
|
|
104
|
-
this.canNavigateBackContextKey = ( new RawContextKey("canNavigateBack", false, ( localize(
|
|
105
|
-
this.canNavigateForwardContextKey = ( new RawContextKey("canNavigateForward", false, ( localize(
|
|
104
|
+
this.canNavigateBackContextKey = ( new RawContextKey("canNavigateBack", false, ( localize(17088, "Whether it is possible to navigate back in editor history")))).bindTo(this.contextKeyService);
|
|
105
|
+
this.canNavigateForwardContextKey = ( new RawContextKey("canNavigateForward", false, ( localize(17089, "Whether it is possible to navigate forward in editor history")))).bindTo(this.contextKeyService);
|
|
106
106
|
this.canNavigateBackInNavigationsContextKey = ( new RawContextKey("canNavigateBackInNavigationLocations", false, ( localize(
|
|
107
|
-
|
|
107
|
+
17090,
|
|
108
108
|
"Whether it is possible to navigate back in editor navigation locations history"
|
|
109
109
|
)))).bindTo(this.contextKeyService);
|
|
110
110
|
this.canNavigateForwardInNavigationsContextKey = ( new RawContextKey("canNavigateForwardInNavigationLocations", false, ( localize(
|
|
111
|
-
|
|
111
|
+
17091,
|
|
112
112
|
"Whether it is possible to navigate forward in editor navigation locations history"
|
|
113
113
|
)))).bindTo(this.contextKeyService);
|
|
114
114
|
this.canNavigateToLastNavigationLocationContextKey = ( new RawContextKey("canNavigateToLastNavigationLocation", false, ( localize(
|
|
115
|
-
|
|
115
|
+
17092,
|
|
116
116
|
"Whether it is possible to navigate to the last editor navigation location"
|
|
117
117
|
)))).bindTo(this.contextKeyService);
|
|
118
118
|
this.canNavigateBackInEditsContextKey = ( new RawContextKey("canNavigateBackInEditLocations", false, ( localize(
|
|
119
|
-
|
|
119
|
+
17093,
|
|
120
120
|
"Whether it is possible to navigate back in editor edit locations history"
|
|
121
121
|
)))).bindTo(this.contextKeyService);
|
|
122
122
|
this.canNavigateForwardInEditsContextKey = ( new RawContextKey("canNavigateForwardInEditLocations", false, ( localize(
|
|
123
|
-
|
|
123
|
+
17094,
|
|
124
124
|
"Whether it is possible to navigate forward in editor edit locations history"
|
|
125
125
|
)))).bindTo(this.contextKeyService);
|
|
126
126
|
this.canNavigateToLastEditLocationContextKey = ( new RawContextKey("canNavigateToLastEditLocation", false, ( localize(
|
|
127
|
-
|
|
127
|
+
17095,
|
|
128
128
|
"Whether it is possible to navigate to the last editor edit location"
|
|
129
129
|
)))).bindTo(this.contextKeyService);
|
|
130
|
-
this.canReopenClosedEditorContextKey = ( new RawContextKey("canReopenClosedEditor", false, ( localize(
|
|
130
|
+
this.canReopenClosedEditorContextKey = ( new RawContextKey("canReopenClosedEditor", false, ( localize(17096, "Whether it is possible to reopen the last closed editor")))).bindTo(this.contextKeyService);
|
|
131
131
|
this.registerListeners();
|
|
132
132
|
if (this.editorService.activeEditorPane) {
|
|
133
133
|
this.onDidActiveEditorChange();
|
|
@@ -157,7 +157,9 @@ let ProgressService = class ProgressService extends Disposable {
|
|
|
157
157
|
this.updateWindowProgress();
|
|
158
158
|
Promise.all([timeout(150), promise]).finally(() => {
|
|
159
159
|
const idx = this.windowProgressStack.indexOf(task);
|
|
160
|
-
|
|
160
|
+
if (idx !== -1) {
|
|
161
|
+
this.windowProgressStack.splice(idx, 1);
|
|
162
|
+
}
|
|
161
163
|
this.updateWindowProgress();
|
|
162
164
|
});
|
|
163
165
|
}, 150);
|
|
@@ -173,20 +175,20 @@ let ProgressService = class ProgressService extends Disposable {
|
|
|
173
175
|
let title;
|
|
174
176
|
const source = options.source && typeof options.source !== "string" ? options.source.label : options.source;
|
|
175
177
|
if (progressTitle && progressMessage) {
|
|
176
|
-
text = ( localize(
|
|
177
|
-
title = source ? ( localize(
|
|
178
|
+
text = ( localize(17225, "{0}: {1}", progressTitle, progressMessage));
|
|
179
|
+
title = source ? ( localize(17226, "[{0}] {1}: {2}", source, progressTitle, progressMessage)) : text;
|
|
178
180
|
} else if (progressTitle) {
|
|
179
181
|
text = progressTitle;
|
|
180
|
-
title = source ? ( localize(
|
|
182
|
+
title = source ? ( localize(17227, "[{0}]: {1}", source, progressTitle)) : text;
|
|
181
183
|
} else if (progressMessage) {
|
|
182
184
|
text = progressMessage;
|
|
183
|
-
title = source ? ( localize(
|
|
185
|
+
title = source ? ( localize(17227, "[{0}]: {1}", source, progressMessage)) : text;
|
|
184
186
|
} else {
|
|
185
187
|
this.updateWindowProgress(idx + 1);
|
|
186
188
|
return;
|
|
187
189
|
}
|
|
188
190
|
const statusEntryProperties = {
|
|
189
|
-
name: ( localize(
|
|
191
|
+
name: ( localize(17228, "Progress Message")),
|
|
190
192
|
text,
|
|
191
193
|
showProgress: options.type || true,
|
|
192
194
|
ariaLabel: text,
|
|
@@ -292,7 +294,7 @@ let ProgressService = class ProgressService extends Disposable {
|
|
|
292
294
|
constructor() {
|
|
293
295
|
super(
|
|
294
296
|
"progress.cancel",
|
|
295
|
-
typeof options.cancellable === "string" ? options.cancellable : ( localize(
|
|
297
|
+
typeof options.cancellable === "string" ? options.cancellable : ( localize(17229, "Cancel")),
|
|
296
298
|
undefined,
|
|
297
299
|
true
|
|
298
300
|
);
|
|
@@ -484,7 +486,7 @@ let ProgressService = class ProgressService extends Disposable {
|
|
|
484
486
|
const buttons = options.buttons || [];
|
|
485
487
|
if (!options.sticky) {
|
|
486
488
|
buttons.push(
|
|
487
|
-
options.cancellable ? (typeof options.cancellable === "boolean" ? ( localize(
|
|
489
|
+
options.cancellable ? (typeof options.cancellable === "boolean" ? ( localize(17229, "Cancel")) : options.cancellable) : ( localize(17230, "Dismiss"))
|
|
488
490
|
);
|
|
489
491
|
}
|
|
490
492
|
dialog = ( new Dialog(
|
|
@@ -78,7 +78,6 @@ export declare class ViewDescriptorService extends Disposable implements IViewDe
|
|
|
78
78
|
getViewContainerByViewId(viewId: string): ViewContainer | null;
|
|
79
79
|
getViewContainerLocation(viewContainer: ViewContainer): ViewContainerLocation;
|
|
80
80
|
getDefaultViewContainerLocation(viewContainer: ViewContainer): ViewContainerLocation;
|
|
81
|
-
private getEffectiveViewContainerLocation;
|
|
82
81
|
getDefaultContainerById(viewId: string): ViewContainer | null;
|
|
83
82
|
getViewContainerModel(container: ViewContainer): ViewContainerModel;
|
|
84
83
|
getViewContainerById(id: string): ViewContainer | null;
|