@codingame/monaco-vscode-view-common-service-override 31.0.0 → 32.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/index.js +3 -0
- package/package.json +3 -3
- package/service-override/vs/workbench/contrib/webview/browser/pre/service-worker.js +107 -88
- package/vscode/src/vs/sessions/common/theme.d.ts +21 -0
- package/vscode/src/vs/sessions/common/theme.js +126 -0
- package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +56 -56
- 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 +173 -168
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.d.ts +1 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +31 -10
- package/vscode/src/vs/workbench/browser/parts/titlebar/menubar.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/browser/parts/titlebar/menubar.contribution.js +78 -0
- package/vscode/src/vs/workbench/browser/workbench.zenMode.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/browser/workbench.zenMode.contribution.js +140 -0
- 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/browser/customEditor.contribution.js +8 -2
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.js +84 -1
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.d.ts +11 -1
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.js +184 -19
- package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +9 -5
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +9 -2
- package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.d.ts +27 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +44 -12
- 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 +2 -2
- 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/editorGutter.js +1 -1
- 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/overlayWebview.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/webview/browser/overlayWebview.js +16 -8
- package/vscode/src/vs/workbench/contrib/webview/browser/resourceLoading.d.ts +9 -5
- package/vscode/src/vs/workbench/contrib/webview/browser/resourceLoading.js +22 -5
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.d.ts +4 -7
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +133 -32
- 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/contrib/webviewView/browser/webviewViewPane.d.ts +0 -5
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.js +5 -27
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.d.ts +15 -7
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +129 -55
- package/vscode/src/vs/workbench/services/history/browser/historyService.js +9 -9
- package/vscode/src/vs/workbench/services/progress/browser/progressService.js +7 -7
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorHandler.js +1 -2
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.d.ts +3 -2
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +31 -33
- package/vscode/src/vs/workbench/services/views/browser/viewsService.js +9 -9
|
@@ -92,14 +92,14 @@ class ActionsSource {
|
|
|
92
92
|
const result = [];
|
|
93
93
|
if (state.kind === ModifiedBaseRangeStateKind.unrecognized) {
|
|
94
94
|
result.push({
|
|
95
|
-
text: ( localize(
|
|
96
|
-
tooltip: ( localize(
|
|
95
|
+
text: ( localize(11319, "Manual Resolution")),
|
|
96
|
+
tooltip: ( localize(11320, "This conflict has been resolved manually."))
|
|
97
97
|
});
|
|
98
98
|
} else if (state.kind === ModifiedBaseRangeStateKind.base) {
|
|
99
99
|
result.push({
|
|
100
|
-
text: ( localize(
|
|
100
|
+
text: ( localize(11321, "No Changes Accepted")),
|
|
101
101
|
tooltip: ( localize(
|
|
102
|
-
|
|
102
|
+
11322,
|
|
103
103
|
"The current resolution of this conflict equals the common ancestor of both the right and left changes."
|
|
104
104
|
))
|
|
105
105
|
});
|
|
@@ -120,33 +120,33 @@ class ActionsSource {
|
|
|
120
120
|
}
|
|
121
121
|
const stateToggles = [];
|
|
122
122
|
if (state.includesInput1) {
|
|
123
|
-
stateToggles.push(command(( localize(
|
|
123
|
+
stateToggles.push(command(( localize(11323, "Remove {0}", model.input1.title)), async () => {
|
|
124
124
|
transaction(tx => {
|
|
125
125
|
model.setState(modifiedBaseRange, state.withInputValue(1, false), true, tx);
|
|
126
126
|
model.telemetry.reportRemoveInvoked(1, state.includesInput(2));
|
|
127
127
|
});
|
|
128
|
-
}, ( localize(
|
|
128
|
+
}, ( localize(11324, "Remove {0} from the result document.", model.input1.title))));
|
|
129
129
|
}
|
|
130
130
|
if (state.includesInput2) {
|
|
131
|
-
stateToggles.push(command(( localize(
|
|
131
|
+
stateToggles.push(command(( localize(11323, "Remove {0}", model.input2.title)), async () => {
|
|
132
132
|
transaction(tx => {
|
|
133
133
|
model.setState(modifiedBaseRange, state.withInputValue(2, false), true, tx);
|
|
134
134
|
model.telemetry.reportRemoveInvoked(2, state.includesInput(1));
|
|
135
135
|
});
|
|
136
|
-
}, ( localize(
|
|
136
|
+
}, ( localize(11324, "Remove {0} from the result document.", model.input2.title))));
|
|
137
137
|
}
|
|
138
138
|
if (state.kind === ModifiedBaseRangeStateKind.both && state.firstInput === 2) {
|
|
139
139
|
stateToggles.reverse();
|
|
140
140
|
}
|
|
141
141
|
result.push(...stateToggles);
|
|
142
142
|
if (state.kind === ModifiedBaseRangeStateKind.unrecognized) {
|
|
143
|
-
result.push(command(( localize(
|
|
143
|
+
result.push(command(( localize(11325, "Reset to base")), async () => {
|
|
144
144
|
transaction(tx => {
|
|
145
145
|
model.setState(modifiedBaseRange, ModifiedBaseRangeState.base, true, tx);
|
|
146
146
|
model.telemetry.reportResetToBaseInvoked();
|
|
147
147
|
});
|
|
148
148
|
}, ( localize(
|
|
149
|
-
|
|
149
|
+
11326,
|
|
150
150
|
"Reset this conflict to the common ancestor of both the right and left changes."
|
|
151
151
|
))));
|
|
152
152
|
}
|
|
@@ -178,7 +178,7 @@ class ActionsSource {
|
|
|
178
178
|
const otherInputNumber = inputNumber === 1 ? 2 : 1;
|
|
179
179
|
if (state.kind !== ModifiedBaseRangeStateKind.unrecognized && !state.isInputIncluded(inputNumber)) {
|
|
180
180
|
if (!state.isInputIncluded(otherInputNumber) || !this.viewModel.shouldUseAppendInsteadOfAccept.read(reader)) {
|
|
181
|
-
result.push(command(( localize(
|
|
181
|
+
result.push(command(( localize(11327, "Accept {0}", inputData.title)), async () => {
|
|
182
182
|
transaction(tx => {
|
|
183
183
|
model.setState(
|
|
184
184
|
modifiedBaseRange,
|
|
@@ -188,9 +188,9 @@ class ActionsSource {
|
|
|
188
188
|
);
|
|
189
189
|
model.telemetry.reportAcceptInvoked(inputNumber, state.includesInput(otherInputNumber));
|
|
190
190
|
});
|
|
191
|
-
}, ( localize(
|
|
191
|
+
}, ( localize(11328, "Accept {0} in the result document.", inputData.title))));
|
|
192
192
|
if (modifiedBaseRange.canBeCombined) {
|
|
193
|
-
const commandName = modifiedBaseRange.isOrderRelevant ? ( localize(
|
|
193
|
+
const commandName = modifiedBaseRange.isOrderRelevant ? ( localize(11329, "Accept Combination ({0} First)", inputData.title)) : ( localize(11330, "Accept Combination"));
|
|
194
194
|
result.push(command(commandName, async () => {
|
|
195
195
|
transaction(tx => {
|
|
196
196
|
model.setState(
|
|
@@ -202,12 +202,12 @@ class ActionsSource {
|
|
|
202
202
|
model.telemetry.reportSmartCombinationInvoked(state.includesInput(otherInputNumber));
|
|
203
203
|
});
|
|
204
204
|
}, ( localize(
|
|
205
|
-
|
|
205
|
+
11331,
|
|
206
206
|
"Accept an automatic combination of both sides in the result document."
|
|
207
207
|
))));
|
|
208
208
|
}
|
|
209
209
|
} else {
|
|
210
|
-
result.push(command(( localize(
|
|
210
|
+
result.push(command(( localize(11332, "Append {0}", inputData.title)), async () => {
|
|
211
211
|
transaction(tx => {
|
|
212
212
|
model.setState(
|
|
213
213
|
modifiedBaseRange,
|
|
@@ -217,9 +217,9 @@ class ActionsSource {
|
|
|
217
217
|
);
|
|
218
218
|
model.telemetry.reportAcceptInvoked(inputNumber, state.includesInput(otherInputNumber));
|
|
219
219
|
});
|
|
220
|
-
}, ( localize(
|
|
220
|
+
}, ( localize(11333, "Append {0} to the result document.", inputData.title))));
|
|
221
221
|
if (modifiedBaseRange.canBeCombined) {
|
|
222
|
-
result.push(command(( localize(
|
|
222
|
+
result.push(command(( localize(11334, "Accept Combination", inputData.title)), async () => {
|
|
223
223
|
transaction(tx => {
|
|
224
224
|
model.setState(
|
|
225
225
|
modifiedBaseRange,
|
|
@@ -230,17 +230,17 @@ class ActionsSource {
|
|
|
230
230
|
model.telemetry.reportSmartCombinationInvoked(state.includesInput(otherInputNumber));
|
|
231
231
|
});
|
|
232
232
|
}, ( localize(
|
|
233
|
-
|
|
233
|
+
11331,
|
|
234
234
|
"Accept an automatic combination of both sides in the result document."
|
|
235
235
|
))));
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
238
|
if (!model.isInputHandled(modifiedBaseRange, inputNumber).read(reader)) {
|
|
239
|
-
result.push(command(( localize(
|
|
239
|
+
result.push(command(( localize(11335, "Ignore")), async () => {
|
|
240
240
|
transaction(tx => {
|
|
241
241
|
model.setInputHandled(modifiedBaseRange, inputNumber, true, tx);
|
|
242
242
|
});
|
|
243
|
-
}, ( localize(
|
|
243
|
+
}, ( localize(11336, "Don't take this side of the conflict."))));
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
246
|
return result;
|
|
@@ -38,7 +38,7 @@ class EditorGutter extends Disposable {
|
|
|
38
38
|
width: "100%"
|
|
39
39
|
}
|
|
40
40
|
}).root);
|
|
41
|
-
const o = this._register(( new DisposableResizeObserver(() => {
|
|
41
|
+
const o = this._register(( new DisposableResizeObserver("EditorGutter.domNodeSizeChange", () => {
|
|
42
42
|
transaction(tx => {
|
|
43
43
|
this.domNodeSizeChanged.trigger(tx);
|
|
44
44
|
});
|
package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js
CHANGED
|
@@ -122,16 +122,16 @@ let BaseCodeEditorView = class BaseCodeEditorView extends CodeEditorView {
|
|
|
122
122
|
return;
|
|
123
123
|
}
|
|
124
124
|
this.editor.setModel(vm.model.base);
|
|
125
|
-
reset(this.htmlElements.title, ...renderLabelWithIcons(( localize(
|
|
125
|
+
reset(this.htmlElements.title, ...renderLabelWithIcons(( localize(11337, "Base"))));
|
|
126
126
|
const baseShowDiffAgainst = vm.baseShowDiffAgainst.read(reader);
|
|
127
127
|
let node = undefined;
|
|
128
128
|
if (baseShowDiffAgainst) {
|
|
129
129
|
const label = ( localize(
|
|
130
|
-
|
|
130
|
+
11338,
|
|
131
131
|
"Comparing with {0}",
|
|
132
132
|
baseShowDiffAgainst === 1 ? vm.model.input1.title : vm.model.input2.title
|
|
133
133
|
));
|
|
134
|
-
const tooltip = ( localize(
|
|
134
|
+
const tooltip = ( localize(11339, "Differences are highlighted with a background color."));
|
|
135
135
|
node = h("span", {
|
|
136
136
|
title: tooltip
|
|
137
137
|
}, [label]).root;
|
package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js
CHANGED
|
@@ -178,7 +178,7 @@ let InputCodeEditorView = class InputCodeEditorView extends CodeEditorView {
|
|
|
178
178
|
this.editor.setModel(
|
|
179
179
|
this.inputNumber === 1 ? vm.model.input1.textModel : vm.model.input2.textModel
|
|
180
180
|
);
|
|
181
|
-
const title = this.inputNumber === 1 ? vm.model.input1.title || ( localize(
|
|
181
|
+
const title = this.inputNumber === 1 ? vm.model.input1.title || ( localize(11340, "Input 1")) : vm.model.input2.title || ( localize(11341, "Input 2"));
|
|
182
182
|
const description = this.inputNumber === 1 ? vm.model.input1.description : vm.model.input2.description;
|
|
183
183
|
const detail = this.inputNumber === 1 ? vm.model.input1.detail : vm.model.input2.detail;
|
|
184
184
|
reset(this.htmlElements.title, ...renderLabelWithIcons(title));
|
|
@@ -255,16 +255,16 @@ class ModifiedBaseRangeGutterItemModel {
|
|
|
255
255
|
}
|
|
256
256
|
const both = state.includesInput1 && state.includesInput2;
|
|
257
257
|
return [
|
|
258
|
-
this.baseRange.input1Diffs.length > 0 ? action("mergeEditor.acceptInput1", ( localize(
|
|
259
|
-
this.baseRange.input2Diffs.length > 0 ? action("mergeEditor.acceptInput2", ( localize(
|
|
260
|
-
this.baseRange.isConflicting ? setFields(action("mergeEditor.acceptBoth", ( localize(
|
|
258
|
+
this.baseRange.input1Diffs.length > 0 ? action("mergeEditor.acceptInput1", ( localize(11342, "Accept {0}", this.model.input1.title)), state.toggle(1), state.includesInput1) : undefined,
|
|
259
|
+
this.baseRange.input2Diffs.length > 0 ? action("mergeEditor.acceptInput2", ( localize(11342, "Accept {0}", this.model.input2.title)), state.toggle(2), state.includesInput2) : undefined,
|
|
260
|
+
this.baseRange.isConflicting ? setFields(action("mergeEditor.acceptBoth", ( localize(11343, "Accept Both")), state.withInputValue(1, !both).withInputValue(2, !both), both), {
|
|
261
261
|
enabled: this.baseRange.canBeCombined
|
|
262
262
|
}) : undefined,
|
|
263
263
|
( new Separator()),
|
|
264
|
-
this.baseRange.isConflicting ? setFields(action("mergeEditor.swap", ( localize(
|
|
264
|
+
this.baseRange.isConflicting ? setFields(action("mergeEditor.swap", ( localize(11344, "Swap")), state.swap(), false), {
|
|
265
265
|
enabled: !state.kind && (!both || this.baseRange.isOrderRelevant)
|
|
266
266
|
}) : undefined,
|
|
267
|
-
setFields(( new Action("mergeEditor.markAsHandled", ( localize(
|
|
267
|
+
setFields(( new Action("mergeEditor.markAsHandled", ( localize(11345, "Mark as Handled")), undefined, true, () => {
|
|
268
268
|
transaction(tx => {
|
|
269
269
|
this.model.setHandled(this.baseRange, !handled, tx);
|
|
270
270
|
});
|
|
@@ -311,22 +311,22 @@ class MergeConflictGutterItemView extends Disposable {
|
|
|
311
311
|
[InputState.excluded]: {
|
|
312
312
|
icon: undefined,
|
|
313
313
|
checked: false,
|
|
314
|
-
title: ( localize(
|
|
314
|
+
title: ( localize(11346, "Accept"))
|
|
315
315
|
},
|
|
316
316
|
[InputState.unrecognized]: {
|
|
317
317
|
icon: Codicon.circleFilled,
|
|
318
318
|
checked: false,
|
|
319
|
-
title: ( localize(
|
|
319
|
+
title: ( localize(11347, "Accept (result is dirty)"))
|
|
320
320
|
},
|
|
321
321
|
[InputState.first]: {
|
|
322
322
|
icon: Codicon.check,
|
|
323
323
|
checked: true,
|
|
324
|
-
title: ( localize(
|
|
324
|
+
title: ( localize(11348, "Undo accept"))
|
|
325
325
|
},
|
|
326
326
|
[InputState.second]: {
|
|
327
327
|
icon: Codicon.checkAll,
|
|
328
328
|
checked: true,
|
|
329
|
-
title: ( localize(
|
|
329
|
+
title: ( localize(11349, "Undo accept (currently second)"))
|
|
330
330
|
}
|
|
331
331
|
};
|
|
332
332
|
const state = iconMap[value];
|
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(11350, "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(11351, "{0} Conflict Remaining", count)) : ( localize(11352, "{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(11353, "Go to next conflict")) : ( localize(11354, "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(11355, "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(11356, "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(12073, "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(12074, "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(12074, "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(12074, "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
|
+
12075,
|
|
72
72
|
"Defines the keyboard layout used in VS Code in the browser environment."
|
|
73
73
|
))}`, `// ${( localize(
|
|
74
|
-
|
|
74
|
+
12076,
|
|
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(12077, "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(12078, "Keyboard Layouts ({0})", platform))
|
|
117
117
|
});
|
|
118
118
|
}
|
|
119
119
|
const configureKeyboardLayout = {
|
|
120
|
-
label: ( localize(
|
|
120
|
+
label: ( localize(12079, "Configure Keyboard Layout"))
|
|
121
121
|
};
|
|
122
122
|
picks.unshift(configureKeyboardLayout);
|
|
123
123
|
const autoDetectMode = {
|
|
124
|
-
label: ( localize(
|
|
124
|
+
label: ( localize(12080, "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(12081, "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(12082, "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
|
+
12646,
|
|
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
|
+
12647,
|
|
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(12847, "Scrolling Locked"));
|
|
126
|
+
const tooltip = ( localize(12848, "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(12849, "Toggle Locked Scrolling Across Editors")),
|
|
152
|
+
mnemonicTitle: ( localize(12850, "Locked Scrolling"))
|
|
153
153
|
},
|
|
154
154
|
category: Categories.View,
|
|
155
155
|
f1: true,
|
|
156
156
|
metadata: {
|
|
157
|
-
description: ( localize(
|
|
157
|
+
description: ( localize(12851, "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(12852, "Hold Locked Scrolling Across Editors")),
|
|
171
|
+
mnemonicTitle: ( localize(12853, "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(15248, "Whether a type hierarchy provider is available"))));
|
|
26
|
+
const _ctxTypeHierarchyVisible = ( new RawContextKey("typeHierarchyVisible", false, ( localize(15249, "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(15250, "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(15251, "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(15252, "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(15253, "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(15254, "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(15255, "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(15256, "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(15257, "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(15258, "Supertypes of '{0}'", element.model.root.name)) : ( localize(15259, "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(15260, "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(15261, "No supertypes of '{0}'", model.root.name)) : ( localize(15262, "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(15263, "Type Hierarchy");
|
|
127
127
|
}
|
|
128
128
|
getAriaLabel(element) {
|
|
129
129
|
if (this.getDirection() === TypeHierarchyDirection.Supertypes) {
|
|
130
|
-
return localize(
|
|
130
|
+
return localize(15264, "supertypes of {0}", element.item.name);
|
|
131
131
|
} else {
|
|
132
|
-
return localize(
|
|
132
|
+
return localize(15265, "subtypes of {0}", element.item.name);
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Dimension } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/dom";
|
|
2
1
|
import { IMouseWheelEvent } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/mouseEvent";
|
|
3
2
|
import { CodeWindow } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/window";
|
|
4
3
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
@@ -41,6 +40,7 @@ export declare class OverlayWebview extends Disposable implements IOverlayWebvie
|
|
|
41
40
|
readonly providedViewType?: string;
|
|
42
41
|
origin: string;
|
|
43
42
|
private _overlayLayout;
|
|
43
|
+
private _anchorState;
|
|
44
44
|
constructor(initInfo: WebviewInitInfo, _layoutService: IWorkbenchLayoutService, _webviewService: IWebviewService, _baseContextKeyService: IContextKeyService);
|
|
45
45
|
get isFocused(): boolean;
|
|
46
46
|
private _isDisposed;
|
|
@@ -48,9 +48,10 @@ export declare class OverlayWebview extends Disposable implements IOverlayWebvie
|
|
|
48
48
|
readonly onDidDispose: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<void>;
|
|
49
49
|
dispose(): void;
|
|
50
50
|
get container(): HTMLElement;
|
|
51
|
+
private get overlayLayout();
|
|
51
52
|
claim(owner: unknown, targetWindow: CodeWindow, scopedContextKeyService: IContextKeyService | undefined): void;
|
|
52
53
|
release(owner: unknown): void;
|
|
53
|
-
|
|
54
|
+
setAnchorElement(anchorElement: HTMLElement, clippingContainer?: HTMLElement): void;
|
|
54
55
|
private _show;
|
|
55
56
|
setHtml(html: string): void;
|
|
56
57
|
setTitle(title: string): void;
|
|
@@ -80,13 +80,16 @@ let OverlayWebview = class OverlayWebview extends Disposable {
|
|
|
80
80
|
if (this._isDisposed) {
|
|
81
81
|
throw ( new Error(`OverlayWebview has been disposed`));
|
|
82
82
|
}
|
|
83
|
+
return this.overlayLayout.content;
|
|
84
|
+
}
|
|
85
|
+
get overlayLayout() {
|
|
83
86
|
if (!this._overlayLayout) {
|
|
84
87
|
this._overlayLayout = ( new OverlayLayoutElement());
|
|
85
88
|
this._overlayLayout.content.style.visibility = "hidden";
|
|
86
89
|
const root = this._layoutService.getContainer(this.window);
|
|
87
90
|
root.appendChild(this._overlayLayout.root);
|
|
88
91
|
}
|
|
89
|
-
return this._overlayLayout
|
|
92
|
+
return this._overlayLayout;
|
|
90
93
|
}
|
|
91
94
|
claim(owner, targetWindow, scopedContextKeyService) {
|
|
92
95
|
if (this._isDisposed) {
|
|
@@ -103,6 +106,11 @@ let OverlayWebview = class OverlayWebview extends Disposable {
|
|
|
103
106
|
this._owner = owner;
|
|
104
107
|
this._windowId = targetWindow.vscodeWindowId;
|
|
105
108
|
this._show(targetWindow);
|
|
109
|
+
if (this._anchorState) {
|
|
110
|
+
this.overlayLayout.setAnchorElement(this._anchorState.anchorElement, {
|
|
111
|
+
clippingContainer: this._anchorState.clippingContainer
|
|
112
|
+
});
|
|
113
|
+
}
|
|
106
114
|
if (oldOwner !== owner) {
|
|
107
115
|
const contextKeyService = (scopedContextKeyService || this._baseContextKeyService);
|
|
108
116
|
this._scopedContextKeyService.clear();
|
|
@@ -134,13 +142,13 @@ let OverlayWebview = class OverlayWebview extends Disposable {
|
|
|
134
142
|
this._webviewEvents.clear();
|
|
135
143
|
}
|
|
136
144
|
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
145
|
+
setAnchorElement(anchorElement, clippingContainer) {
|
|
146
|
+
this._anchorState = {
|
|
147
|
+
anchorElement,
|
|
148
|
+
clippingContainer
|
|
149
|
+
};
|
|
150
|
+
this.overlayLayout.setAnchorElement(anchorElement, {
|
|
151
|
+
clippingContainer
|
|
144
152
|
});
|
|
145
153
|
}
|
|
146
154
|
_show(targetWindow) {
|