@codingame/monaco-vscode-view-common-service-override 15.0.2 → 16.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/assets/{index-no-csp.html → webview/index-no-csp.html} +1 -1
- package/assets/{index.html → webview/index.html} +2 -2
- package/index.js +5 -5
- package/package.json +42 -40
- package/vscode/src/vs/platform/webview/common/webviewPortMapping.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +60 -60
- package/vscode/src/vs/workbench/browser/actions/listCommands.js +3 -3
- package/vscode/src/vs/workbench/browser/actions/navigationActions.js +7 -7
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +162 -159
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +10 -9
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +12 -12
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +7 -7
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +3 -3
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/media/callHierarchy.css +47 -0
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/browser/media/customEditor.css +3 -0
- 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/externalUriOpener/common/externalUriOpener.contribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.js +8 -8
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/media/languageStatus.css +90 -0
- 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 +6 -3
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorAccessibilityHelp.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorAccessibilityHelp.js +46 -0
- 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/media/mergeEditor.css +235 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.d.ts +1 -6
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +18 -25
- 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/typeHierarchy/browser/media/typeHierarchy.css +47 -0
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +10 -10
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +7 -7
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +3 -3
- package/vscode/src/vs/workbench/contrib/webview/browser/overlayWebview.d.ts +1 -1
- package/{assets → vscode/src/vs/workbench/contrib/webview/browser/pre}/service-worker.js +34 -3
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +1 -1
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewFindWidget.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewFindWidget.js +1 -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/contrib/webviewView/browser/webviewViewPane.d.ts +1 -1
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.d.ts +1 -4
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +13 -22
- package/vscode/src/vs/workbench/services/history/browser/historyService.d.ts +0 -1
- package/vscode/src/vs/workbench/services/history/browser/historyService.js +29 -30
- package/vscode/src/vs/workbench/services/progress/browser/media/progressService.css +15 -0
- package/vscode/src/vs/workbench/services/progress/browser/progressService.js +29 -42
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +6 -6
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/media/callHierarchy.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/customEditor/browser/media/customEditor.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/media/languageStatus.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/media/mergeEditor.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/media/typeHierarchy.css.js +0 -6
- package/vscode/src/vs/workbench/services/progress/browser/media/progressService.css.js +0 -6
- /package/{assets → vscode/src/vs/workbench/contrib/webview/browser/pre}/fake.html +0 -0
|
@@ -56,7 +56,7 @@ class OpenMergeEditor extends Action2 {
|
|
|
56
56
|
constructor() {
|
|
57
57
|
super({
|
|
58
58
|
id: '_open.mergeEditor',
|
|
59
|
-
title: ( localize2(
|
|
59
|
+
title: ( localize2(7676, 'Open Merge Editor')),
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
62
|
run(accessor, ...args) {
|
|
@@ -127,7 +127,7 @@ class SetMixedLayout extends Action2 {
|
|
|
127
127
|
constructor() {
|
|
128
128
|
super({
|
|
129
129
|
id: 'merge.mixedLayout',
|
|
130
|
-
title: ( localize2(
|
|
130
|
+
title: ( localize2(7677, "Mixed Layout")),
|
|
131
131
|
toggled: ( ctxMergeEditorLayout.isEqualTo('mixed')),
|
|
132
132
|
menu: [
|
|
133
133
|
{
|
|
@@ -151,7 +151,7 @@ class SetColumnLayout extends Action2 {
|
|
|
151
151
|
constructor() {
|
|
152
152
|
super({
|
|
153
153
|
id: 'merge.columnLayout',
|
|
154
|
-
title: ( localize2(
|
|
154
|
+
title: ( localize2(7678, 'Column Layout')),
|
|
155
155
|
toggled: ( ctxMergeEditorLayout.isEqualTo('columns')),
|
|
156
156
|
menu: [{
|
|
157
157
|
id: MenuId.EditorTitle,
|
|
@@ -173,7 +173,7 @@ class ShowNonConflictingChanges extends Action2 {
|
|
|
173
173
|
constructor() {
|
|
174
174
|
super({
|
|
175
175
|
id: 'merge.showNonConflictingChanges',
|
|
176
|
-
title: ( localize2(
|
|
176
|
+
title: ( localize2(7679, "Show Non-Conflicting Changes")),
|
|
177
177
|
toggled: ( ctxMergeEditorShowNonConflictingChanges.isEqualTo(true)),
|
|
178
178
|
menu: [
|
|
179
179
|
{
|
|
@@ -197,7 +197,7 @@ class ShowHideBase extends Action2 {
|
|
|
197
197
|
constructor() {
|
|
198
198
|
super({
|
|
199
199
|
id: 'merge.showBase',
|
|
200
|
-
title: ( localize2(
|
|
200
|
+
title: ( localize2(7680, "Show Base")),
|
|
201
201
|
toggled: ( ctxMergeEditorShowBase.isEqualTo(true)),
|
|
202
202
|
menu: [
|
|
203
203
|
{
|
|
@@ -220,7 +220,7 @@ class ShowHideTopBase extends Action2 {
|
|
|
220
220
|
constructor() {
|
|
221
221
|
super({
|
|
222
222
|
id: 'merge.showBaseTop',
|
|
223
|
-
title: ( localize2(
|
|
223
|
+
title: ( localize2(7681, "Show Base Top")),
|
|
224
224
|
toggled: ( ContextKeyExpr.and(ctxMergeEditorShowBase, ctxMergeEditorShowBaseAtTop)),
|
|
225
225
|
menu: [
|
|
226
226
|
{
|
|
@@ -243,7 +243,7 @@ class ShowHideCenterBase extends Action2 {
|
|
|
243
243
|
constructor() {
|
|
244
244
|
super({
|
|
245
245
|
id: 'merge.showBaseCenter',
|
|
246
|
-
title: ( localize2(
|
|
246
|
+
title: ( localize2(7682, "Show Base Center")),
|
|
247
247
|
toggled: ( ContextKeyExpr.and(ctxMergeEditorShowBase, ( ctxMergeEditorShowBaseAtTop.negate()))),
|
|
248
248
|
menu: [
|
|
249
249
|
{
|
|
@@ -262,13 +262,13 @@ class ShowHideCenterBase extends Action2 {
|
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
|
-
const mergeEditorCategory = ( localize2(
|
|
265
|
+
const mergeEditorCategory = ( localize2(7683, "Merge Editor"));
|
|
266
266
|
class OpenResultResource extends MergeEditorAction {
|
|
267
267
|
constructor() {
|
|
268
268
|
super({
|
|
269
269
|
id: 'merge.openResult',
|
|
270
270
|
icon: Codicon.goToFile,
|
|
271
|
-
title: ( localize2(
|
|
271
|
+
title: ( localize2(7684, "Open File")),
|
|
272
272
|
category: mergeEditorCategory,
|
|
273
273
|
menu: [{
|
|
274
274
|
id: MenuId.EditorTitle,
|
|
@@ -289,7 +289,7 @@ class GoToNextUnhandledConflict extends MergeEditorAction {
|
|
|
289
289
|
super({
|
|
290
290
|
id: 'merge.goToNextUnhandledConflict',
|
|
291
291
|
category: mergeEditorCategory,
|
|
292
|
-
title: ( localize2(
|
|
292
|
+
title: ( localize2(7685, "Go to Next Unhandled Conflict")),
|
|
293
293
|
icon: Codicon.arrowDown,
|
|
294
294
|
menu: [
|
|
295
295
|
{
|
|
@@ -313,7 +313,7 @@ class GoToPreviousUnhandledConflict extends MergeEditorAction {
|
|
|
313
313
|
super({
|
|
314
314
|
id: 'merge.goToPreviousUnhandledConflict',
|
|
315
315
|
category: mergeEditorCategory,
|
|
316
|
-
title: ( localize2(
|
|
316
|
+
title: ( localize2(7686, "Go to Previous Unhandled Conflict")),
|
|
317
317
|
icon: Codicon.arrowUp,
|
|
318
318
|
menu: [
|
|
319
319
|
{
|
|
@@ -337,7 +337,7 @@ class ToggleActiveConflictInput1 extends MergeEditorAction {
|
|
|
337
337
|
super({
|
|
338
338
|
id: 'merge.toggleActiveConflictInput1',
|
|
339
339
|
category: mergeEditorCategory,
|
|
340
|
-
title: ( localize2(
|
|
340
|
+
title: ( localize2(7687, "Toggle Current Conflict from Left")),
|
|
341
341
|
f1: true,
|
|
342
342
|
precondition: ctxIsMergeEditor,
|
|
343
343
|
});
|
|
@@ -351,7 +351,7 @@ class ToggleActiveConflictInput2 extends MergeEditorAction {
|
|
|
351
351
|
super({
|
|
352
352
|
id: 'merge.toggleActiveConflictInput2',
|
|
353
353
|
category: mergeEditorCategory,
|
|
354
|
-
title: ( localize2(
|
|
354
|
+
title: ( localize2(7688, "Toggle Current Conflict from Right")),
|
|
355
355
|
f1: true,
|
|
356
356
|
precondition: ctxIsMergeEditor,
|
|
357
357
|
});
|
|
@@ -365,8 +365,8 @@ class CompareInput1WithBaseCommand extends MergeEditorAction {
|
|
|
365
365
|
super({
|
|
366
366
|
id: 'mergeEditor.compareInput1WithBase',
|
|
367
367
|
category: mergeEditorCategory,
|
|
368
|
-
title: ( localize2(
|
|
369
|
-
shortTitle: ( localize(
|
|
368
|
+
title: ( localize2(7689, "Compare Input 1 With Base")),
|
|
369
|
+
shortTitle: ( localize(7690, 'Compare With Base')),
|
|
370
370
|
f1: true,
|
|
371
371
|
precondition: ctxIsMergeEditor,
|
|
372
372
|
menu: { id: MenuId.MergeInput1Toolbar, group: 'primary' },
|
|
@@ -383,8 +383,8 @@ class CompareInput2WithBaseCommand extends MergeEditorAction {
|
|
|
383
383
|
super({
|
|
384
384
|
id: 'mergeEditor.compareInput2WithBase',
|
|
385
385
|
category: mergeEditorCategory,
|
|
386
|
-
title: ( localize2(
|
|
387
|
-
shortTitle: ( localize(
|
|
386
|
+
title: ( localize2(7691, "Compare Input 2 With Base")),
|
|
387
|
+
shortTitle: ( localize(7690, 'Compare With Base')),
|
|
388
388
|
f1: true,
|
|
389
389
|
precondition: ctxIsMergeEditor,
|
|
390
390
|
menu: { id: MenuId.MergeInput2Toolbar, group: 'primary' },
|
|
@@ -420,7 +420,7 @@ class OpenBaseFile extends MergeEditorAction {
|
|
|
420
420
|
super({
|
|
421
421
|
id: 'merge.openBaseEditor',
|
|
422
422
|
category: mergeEditorCategory,
|
|
423
|
-
title: ( localize2(
|
|
423
|
+
title: ( localize2(7692, "Open Base File")),
|
|
424
424
|
f1: true,
|
|
425
425
|
precondition: ctxIsMergeEditor,
|
|
426
426
|
});
|
|
@@ -435,7 +435,7 @@ class AcceptAllInput1 extends MergeEditorAction {
|
|
|
435
435
|
super({
|
|
436
436
|
id: 'merge.acceptAllInput1',
|
|
437
437
|
category: mergeEditorCategory,
|
|
438
|
-
title: ( localize2(
|
|
438
|
+
title: ( localize2(7693, "Accept All Changes from Left")),
|
|
439
439
|
f1: true,
|
|
440
440
|
precondition: ctxIsMergeEditor,
|
|
441
441
|
menu: { id: MenuId.MergeInput1Toolbar, group: 'primary' },
|
|
@@ -451,7 +451,7 @@ class AcceptAllInput2 extends MergeEditorAction {
|
|
|
451
451
|
super({
|
|
452
452
|
id: 'merge.acceptAllInput2',
|
|
453
453
|
category: mergeEditorCategory,
|
|
454
|
-
title: ( localize2(
|
|
454
|
+
title: ( localize2(7694, "Accept All Changes from Right")),
|
|
455
455
|
f1: true,
|
|
456
456
|
precondition: ctxIsMergeEditor,
|
|
457
457
|
menu: { id: MenuId.MergeInput2Toolbar, group: 'primary' },
|
|
@@ -467,8 +467,8 @@ class ResetToBaseAndAutoMergeCommand extends MergeEditorAction {
|
|
|
467
467
|
super({
|
|
468
468
|
id: 'mergeEditor.resetResultToBaseAndAutoMerge',
|
|
469
469
|
category: mergeEditorCategory,
|
|
470
|
-
title: ( localize2(
|
|
471
|
-
shortTitle: ( localize(
|
|
470
|
+
title: ( localize2(7695, "Reset Result")),
|
|
471
|
+
shortTitle: ( localize(7696, 'Reset')),
|
|
472
472
|
f1: true,
|
|
473
473
|
precondition: ctxIsMergeEditor,
|
|
474
474
|
menu: { id: MenuId.MergeInputResultToolbar, group: 'primary' },
|
|
@@ -484,7 +484,7 @@ class ResetCloseWithConflictsChoice extends Action2 {
|
|
|
484
484
|
super({
|
|
485
485
|
id: 'mergeEditor.resetCloseWithConflictsChoice',
|
|
486
486
|
category: mergeEditorCategory,
|
|
487
|
-
title: ( localize2(
|
|
487
|
+
title: ( localize2(7697, "Reset Choice for \'Close with Conflicts\'")),
|
|
488
488
|
f1: true,
|
|
489
489
|
});
|
|
490
490
|
}
|
|
@@ -497,7 +497,7 @@ class AcceptMerge extends MergeEditorAction2 {
|
|
|
497
497
|
super({
|
|
498
498
|
id: 'mergeEditor.acceptMerge',
|
|
499
499
|
category: mergeEditorCategory,
|
|
500
|
-
title: ( localize2(
|
|
500
|
+
title: ( localize2(7698, "Complete Merge")),
|
|
501
501
|
f1: false,
|
|
502
502
|
precondition: ctxIsMergeEditor
|
|
503
503
|
});
|
|
@@ -508,12 +508,12 @@ class AcceptMerge extends MergeEditorAction2 {
|
|
|
508
508
|
if (viewModel.model.unhandledConflictsCount.get() > 0) {
|
|
509
509
|
const { confirmed } = await dialogService.confirm({
|
|
510
510
|
message: ( localize(
|
|
511
|
-
|
|
511
|
+
7699,
|
|
512
512
|
"Do you want to complete the merge of {0}?",
|
|
513
513
|
basename(inputModel.resultUri)
|
|
514
514
|
)),
|
|
515
|
-
detail: ( localize(
|
|
516
|
-
primaryButton: ( localize(
|
|
515
|
+
detail: ( localize(7700, "The file contains unhandled conflicts.")),
|
|
516
|
+
primaryButton: ( localize(7701, "&&Complete with Conflicts"))
|
|
517
517
|
});
|
|
518
518
|
if (!confirmed) {
|
|
519
519
|
return {
|
|
@@ -14,13 +14,13 @@ import { MergeEditor } from '../view/mergeEditor.js';
|
|
|
14
14
|
import { ctxIsMergeEditor } from '@codingame/monaco-vscode-897bebad-39df-57cb-8a57-36a271d038be-common/vscode/vs/workbench/contrib/mergeEditor/common/mergeEditor';
|
|
15
15
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
16
16
|
|
|
17
|
-
const MERGE_EDITOR_CATEGORY = ( localize2(
|
|
17
|
+
const MERGE_EDITOR_CATEGORY = ( localize2(7702, 'Merge Editor (Dev)'));
|
|
18
18
|
class MergeEditorCopyContentsToJSON extends Action2 {
|
|
19
19
|
constructor() {
|
|
20
20
|
super({
|
|
21
21
|
id: 'merge.dev.copyContentsJson',
|
|
22
22
|
category: MERGE_EDITOR_CATEGORY,
|
|
23
|
-
title: ( localize2(
|
|
23
|
+
title: ( localize2(7703, "Copy Merge Editor State as JSON")),
|
|
24
24
|
icon: Codicon.layoutCentered,
|
|
25
25
|
f1: true,
|
|
26
26
|
precondition: ctxIsMergeEditor,
|
|
@@ -32,8 +32,8 @@ class MergeEditorCopyContentsToJSON extends Action2 {
|
|
|
32
32
|
const notificationService = accessor.get(INotificationService);
|
|
33
33
|
if (!(activeEditorPane instanceof MergeEditor)) {
|
|
34
34
|
notificationService.info({
|
|
35
|
-
name: ( localize(
|
|
36
|
-
message: ( localize(
|
|
35
|
+
name: ( localize(7704, 'Merge Editor')),
|
|
36
|
+
message: ( localize(7705, "No active merge editor"))
|
|
37
37
|
});
|
|
38
38
|
return;
|
|
39
39
|
}
|
|
@@ -52,8 +52,8 @@ class MergeEditorCopyContentsToJSON extends Action2 {
|
|
|
52
52
|
const jsonStr = JSON.stringify(contents, undefined, 4);
|
|
53
53
|
clipboardService.writeText(jsonStr);
|
|
54
54
|
notificationService.info({
|
|
55
|
-
name: ( localize(
|
|
56
|
-
message: ( localize(
|
|
55
|
+
name: ( localize(7704, 'Merge Editor')),
|
|
56
|
+
message: ( localize(7706, "Successfully copied merge editor state")),
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
}
|
|
@@ -62,7 +62,7 @@ class MergeEditorSaveContentsToFolder extends Action2 {
|
|
|
62
62
|
super({
|
|
63
63
|
id: 'merge.dev.saveContentsToFolder',
|
|
64
64
|
category: MERGE_EDITOR_CATEGORY,
|
|
65
|
-
title: ( localize2(
|
|
65
|
+
title: ( localize2(7707, "Save Merge Editor State to Folder")),
|
|
66
66
|
icon: Codicon.layoutCentered,
|
|
67
67
|
f1: true,
|
|
68
68
|
precondition: ctxIsMergeEditor,
|
|
@@ -76,8 +76,8 @@ class MergeEditorSaveContentsToFolder extends Action2 {
|
|
|
76
76
|
const languageService = accessor.get(ILanguageService);
|
|
77
77
|
if (!(activeEditorPane instanceof MergeEditor)) {
|
|
78
78
|
notificationService.info({
|
|
79
|
-
name: ( localize(
|
|
80
|
-
message: ( localize(
|
|
79
|
+
name: ( localize(7704, 'Merge Editor')),
|
|
80
|
+
message: ( localize(7705, "No active merge editor"))
|
|
81
81
|
});
|
|
82
82
|
return;
|
|
83
83
|
}
|
|
@@ -89,7 +89,7 @@ class MergeEditorSaveContentsToFolder extends Action2 {
|
|
|
89
89
|
canSelectFiles: false,
|
|
90
90
|
canSelectFolders: true,
|
|
91
91
|
canSelectMany: false,
|
|
92
|
-
title: ( localize(
|
|
92
|
+
title: ( localize(7708, 'Select folder to save to'))
|
|
93
93
|
});
|
|
94
94
|
if (!result) {
|
|
95
95
|
return;
|
|
@@ -107,8 +107,8 @@ class MergeEditorSaveContentsToFolder extends Action2 {
|
|
|
107
107
|
write('initialResult', model.getInitialResultValue()),
|
|
108
108
|
]);
|
|
109
109
|
notificationService.info({
|
|
110
|
-
name: ( localize(
|
|
111
|
-
message: ( localize(
|
|
110
|
+
name: ( localize(7704, 'Merge Editor')),
|
|
111
|
+
message: ( localize(7709, "Successfully saved merge editor state to folder")),
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
114
|
}
|
|
@@ -117,7 +117,7 @@ class MergeEditorLoadContentsFromFolder extends Action2 {
|
|
|
117
117
|
super({
|
|
118
118
|
id: 'merge.dev.loadContentsFromFolder',
|
|
119
119
|
category: MERGE_EDITOR_CATEGORY,
|
|
120
|
-
title: ( localize2(
|
|
120
|
+
title: ( localize2(7710, "Load Merge Editor State from Folder")),
|
|
121
121
|
icon: Codicon.layoutCentered,
|
|
122
122
|
f1: true
|
|
123
123
|
});
|
|
@@ -136,7 +136,7 @@ class MergeEditorLoadContentsFromFolder extends Action2 {
|
|
|
136
136
|
canSelectFiles: false,
|
|
137
137
|
canSelectFolders: true,
|
|
138
138
|
canSelectMany: false,
|
|
139
|
-
title: ( localize(
|
|
139
|
+
title: ( localize(7708, 'Select folder to save to'))
|
|
140
140
|
});
|
|
141
141
|
if (!result) {
|
|
142
142
|
return;
|
|
@@ -13,8 +13,10 @@ import { MergeEditorInput } from '@codingame/monaco-vscode-8ccb7637-50ea-5359-97
|
|
|
13
13
|
import { MergeEditor, MergeEditorOpenHandlerContribution, MergeEditorResolverContribution } from './view/mergeEditor.js';
|
|
14
14
|
import { LifecyclePhase } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
15
15
|
import { MergeEditorSerializer } from './mergeEditorSerializer.js';
|
|
16
|
+
import { AccessibleViewRegistry } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleViewRegistry';
|
|
17
|
+
import { MergeEditorAccessibilityHelpProvider } from './mergeEditorAccessibilityHelp.js';
|
|
16
18
|
|
|
17
|
-
( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(EditorPaneDescriptor.create(MergeEditor, MergeEditor.ID, ( localize(
|
|
19
|
+
( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(EditorPaneDescriptor.create(MergeEditor, MergeEditor.ID, ( localize(7711, "Merge Editor"))), [
|
|
18
20
|
( new SyncDescriptor(MergeEditorInput))
|
|
19
21
|
]);
|
|
20
22
|
( Registry.as(EditorExtensions.EditorFactory)).registerEditorSerializer(MergeEditorInput.ID, MergeEditorSerializer);
|
|
@@ -25,8 +27,8 @@ import { MergeEditorSerializer } from './mergeEditorSerializer.js';
|
|
|
25
27
|
enum: ['legacy', 'advanced'],
|
|
26
28
|
default: 'advanced',
|
|
27
29
|
markdownEnumDescriptions: [
|
|
28
|
-
( localize(
|
|
29
|
-
( localize(
|
|
30
|
+
( localize(7712, "Uses the legacy diffing algorithm.")),
|
|
31
|
+
( localize(7713, "Uses the advanced diffing algorithm.")),
|
|
30
32
|
]
|
|
31
33
|
},
|
|
32
34
|
'mergeEditor.showDeletionMarkers': {
|
|
@@ -63,3 +65,4 @@ registerAction2(MergeEditorLoadContentsFromFolder);
|
|
|
63
65
|
.as(Extensions$1.Workbench))
|
|
64
66
|
.registerWorkbenchContribution(MergeEditorOpenHandlerContribution, LifecyclePhase.Restored);
|
|
65
67
|
registerWorkbenchContribution2(MergeEditorResolverContribution.ID, MergeEditorResolverContribution, WorkbenchPhase.BlockStartup );
|
|
68
|
+
AccessibleViewRegistry.register(( new MergeEditorAccessibilityHelpProvider()));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AccessibleContentProvider, AccessibleViewType } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleView";
|
|
2
|
+
import { IAccessibleViewImplementation } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleViewRegistry";
|
|
3
|
+
import { ServicesAccessor } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
4
|
+
export declare class MergeEditorAccessibilityHelpProvider implements IAccessibleViewImplementation {
|
|
5
|
+
readonly name = "mergeEditor";
|
|
6
|
+
readonly type = AccessibleViewType.Help;
|
|
7
|
+
readonly priority = 125;
|
|
8
|
+
readonly when: import("@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey").ContextKeyExpression;
|
|
9
|
+
getProvider(accessor: ServicesAccessor): AccessibleContentProvider | undefined;
|
|
10
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
|
|
2
|
+
import { ICodeEditorService } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/codeEditorService.service';
|
|
3
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
4
|
+
import { AccessibleViewType, AccessibleContentProvider, AccessibleViewProviderId } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleView';
|
|
5
|
+
import { ContextKeyEqualsExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
6
|
+
import { AccessibilityVerbositySettingId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
|
|
7
|
+
|
|
8
|
+
class MergeEditorAccessibilityHelpProvider {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.name = 'mergeEditor';
|
|
11
|
+
this.type = AccessibleViewType.Help;
|
|
12
|
+
this.priority = 125;
|
|
13
|
+
this.when = ContextKeyEqualsExpr.create('isMergeEditor', true);
|
|
14
|
+
}
|
|
15
|
+
getProvider(accessor) {
|
|
16
|
+
const codeEditorService = accessor.get(ICodeEditorService);
|
|
17
|
+
const codeEditor = codeEditorService.getActiveCodeEditor() || codeEditorService.getFocusedCodeEditor();
|
|
18
|
+
if (!codeEditor) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
const content = [
|
|
22
|
+
( localize(7714, "You are in a merge editor.")),
|
|
23
|
+
( localize(
|
|
24
|
+
7715,
|
|
25
|
+
"Navigate between merge conflicts using the commands Go to Next Unhandled Conflict{0} and Go to Previous Unhandled Conflict{1}.",
|
|
26
|
+
'<keybinding:merge.goToNextUnhandledConflict>',
|
|
27
|
+
'<keybinding:merge.goToPreviousUnhandledConflict>'
|
|
28
|
+
)),
|
|
29
|
+
( localize(
|
|
30
|
+
7716,
|
|
31
|
+
"Run the command Merge Editor: Accept All Changes from the Left{0} and Merge Editor: Accept All Changes from the Right{1}",
|
|
32
|
+
'<keybinding:merge.acceptAllInput1>',
|
|
33
|
+
'<keybinding:merge.acceptAllInput2>'
|
|
34
|
+
)),
|
|
35
|
+
];
|
|
36
|
+
return ( new AccessibleContentProvider(
|
|
37
|
+
AccessibleViewProviderId.MergeEditor,
|
|
38
|
+
{ type: AccessibleViewType.Help },
|
|
39
|
+
() => content.join('\n'),
|
|
40
|
+
() => codeEditor.focus(),
|
|
41
|
+
AccessibilityVerbositySettingId.MergeEditor
|
|
42
|
+
));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export { MergeEditorAccessibilityHelpProvider };
|
|
@@ -12,19 +12,19 @@ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/misc
|
|
|
12
12
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/quickpickColors';
|
|
13
13
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/searchColors';
|
|
14
14
|
|
|
15
|
-
registerColor('mergeEditor.change.background', '#9bb95533', ( localize(
|
|
16
|
-
registerColor('mergeEditor.change.word.background', { dark: '#9ccc2c33', light: '#9ccc2c66', hcDark: '#9ccc2c33', hcLight: '#9ccc2c66', }, ( localize(
|
|
17
|
-
registerColor('mergeEditor.changeBase.background', { dark: '#4B1818FF', light: '#FFCCCCFF', hcDark: '#4B1818FF', hcLight: '#FFCCCCFF', }, ( localize(
|
|
18
|
-
registerColor('mergeEditor.changeBase.word.background', { dark: '#6F1313FF', light: '#FFA3A3FF', hcDark: '#6F1313FF', hcLight: '#FFA3A3FF', }, ( localize(
|
|
19
|
-
registerColor('mergeEditor.conflict.unhandledUnfocused.border', { dark: '#ffa6007a', light: '#ffa600FF', hcDark: '#ffa6007a', hcLight: '#ffa6007a', }, ( localize(
|
|
20
|
-
registerColor('mergeEditor.conflict.unhandledFocused.border', '#ffa600', ( localize(
|
|
21
|
-
registerColor('mergeEditor.conflict.handledUnfocused.border', '#86868649', ( localize(
|
|
22
|
-
registerColor('mergeEditor.conflict.handledFocused.border', '#c1c1c1cc', ( localize(
|
|
23
|
-
const handledConflictMinimapOverViewRulerColor = registerColor('mergeEditor.conflict.handled.minimapOverViewRuler', '#adaca8ee', ( localize(
|
|
24
|
-
const unhandledConflictMinimapOverViewRulerColor = registerColor('mergeEditor.conflict.unhandled.minimapOverViewRuler', '#fcba03FF', ( localize(
|
|
25
|
-
registerColor('mergeEditor.conflictingLines.background', '#ffea0047', ( localize(
|
|
15
|
+
registerColor('mergeEditor.change.background', '#9bb95533', ( localize(7749, 'The background color for changes.')));
|
|
16
|
+
registerColor('mergeEditor.change.word.background', { dark: '#9ccc2c33', light: '#9ccc2c66', hcDark: '#9ccc2c33', hcLight: '#9ccc2c66', }, ( localize(7750, 'The background color for word changes.')));
|
|
17
|
+
registerColor('mergeEditor.changeBase.background', { dark: '#4B1818FF', light: '#FFCCCCFF', hcDark: '#4B1818FF', hcLight: '#FFCCCCFF', }, ( localize(7751, 'The background color for changes in base.')));
|
|
18
|
+
registerColor('mergeEditor.changeBase.word.background', { dark: '#6F1313FF', light: '#FFA3A3FF', hcDark: '#6F1313FF', hcLight: '#FFA3A3FF', }, ( localize(7752, 'The background color for word changes in base.')));
|
|
19
|
+
registerColor('mergeEditor.conflict.unhandledUnfocused.border', { dark: '#ffa6007a', light: '#ffa600FF', hcDark: '#ffa6007a', hcLight: '#ffa6007a', }, ( localize(7753, 'The border color of unhandled unfocused conflicts.')));
|
|
20
|
+
registerColor('mergeEditor.conflict.unhandledFocused.border', '#ffa600', ( localize(7754, 'The border color of unhandled focused conflicts.')));
|
|
21
|
+
registerColor('mergeEditor.conflict.handledUnfocused.border', '#86868649', ( localize(7755, 'The border color of handled unfocused conflicts.')));
|
|
22
|
+
registerColor('mergeEditor.conflict.handledFocused.border', '#c1c1c1cc', ( localize(7756, 'The border color of handled focused conflicts.')));
|
|
23
|
+
const handledConflictMinimapOverViewRulerColor = registerColor('mergeEditor.conflict.handled.minimapOverViewRuler', '#adaca8ee', ( localize(7757, 'The foreground color for changes in input 1.')));
|
|
24
|
+
const unhandledConflictMinimapOverViewRulerColor = registerColor('mergeEditor.conflict.unhandled.minimapOverViewRuler', '#fcba03FF', ( localize(7758, 'The foreground color for changes in input 1.')));
|
|
25
|
+
registerColor('mergeEditor.conflictingLines.background', '#ffea0047', ( localize(7759, 'The background of the "Conflicting Lines" text.')));
|
|
26
26
|
const contentTransparency = 0.4;
|
|
27
|
-
registerColor('mergeEditor.conflict.input1.background', ( transparent(mergeCurrentHeaderBackground, contentTransparency)), ( localize(
|
|
28
|
-
registerColor('mergeEditor.conflict.input2.background', ( transparent(mergeIncomingHeaderBackground, contentTransparency)), ( localize(
|
|
27
|
+
registerColor('mergeEditor.conflict.input1.background', ( transparent(mergeCurrentHeaderBackground, contentTransparency)), ( localize(7760, 'The background color of decorations in input 1.')));
|
|
28
|
+
registerColor('mergeEditor.conflict.input2.background', ( transparent(mergeIncomingHeaderBackground, contentTransparency)), ( localize(7761, 'The background color of decorations in input 2.')));
|
|
29
29
|
|
|
30
30
|
export { handledConflictMinimapOverViewRulerColor, unhandledConflictMinimapOverViewRulerColor };
|
package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js
CHANGED
|
@@ -114,16 +114,16 @@ let BaseCodeEditorView = class BaseCodeEditorView extends CodeEditorView {
|
|
|
114
114
|
return;
|
|
115
115
|
}
|
|
116
116
|
this.editor.setModel(vm.model.base);
|
|
117
|
-
reset(this.htmlElements.title, ...renderLabelWithIcons(( localize(
|
|
117
|
+
reset(this.htmlElements.title, ...renderLabelWithIcons(( localize(7780, 'Base'))));
|
|
118
118
|
const baseShowDiffAgainst = vm.baseShowDiffAgainst.read(reader);
|
|
119
119
|
let node = undefined;
|
|
120
120
|
if (baseShowDiffAgainst) {
|
|
121
121
|
const label = ( localize(
|
|
122
|
-
|
|
122
|
+
7781,
|
|
123
123
|
'Comparing with {0}',
|
|
124
124
|
baseShowDiffAgainst === 1 ? vm.model.input1.title : vm.model.input2.title
|
|
125
125
|
));
|
|
126
|
-
const tooltip = ( localize(
|
|
126
|
+
const tooltip = ( localize(7782, 'Differences are highlighted with a background color.'));
|
|
127
127
|
node = h('span', { title: tooltip }, [label]).root;
|
|
128
128
|
}
|
|
129
129
|
reset(this.htmlElements.description, ...(node ? [node] : []));
|
package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js
CHANGED
|
@@ -154,8 +154,8 @@ let InputCodeEditorView = class InputCodeEditorView extends CodeEditorView {
|
|
|
154
154
|
}
|
|
155
155
|
this.editor.setModel(this.inputNumber === 1 ? vm.model.input1.textModel : vm.model.input2.textModel);
|
|
156
156
|
const title = this.inputNumber === 1
|
|
157
|
-
? vm.model.input1.title || ( localize(
|
|
158
|
-
: vm.model.input2.title || ( localize(
|
|
157
|
+
? vm.model.input1.title || ( localize(7783, 'Input 1'))
|
|
158
|
+
: vm.model.input2.title || ( localize(7784, 'Input 2'));
|
|
159
159
|
const description = this.inputNumber === 1
|
|
160
160
|
? vm.model.input1.description
|
|
161
161
|
: vm.model.input2.description;
|
|
@@ -237,19 +237,19 @@ class ModifiedBaseRangeGutterItemModel {
|
|
|
237
237
|
const both = state.includesInput1 && state.includesInput2;
|
|
238
238
|
return [
|
|
239
239
|
this.baseRange.input1Diffs.length > 0
|
|
240
|
-
? action('mergeEditor.acceptInput1', ( localize(
|
|
240
|
+
? action('mergeEditor.acceptInput1', ( localize(7785, 'Accept {0}', this.model.input1.title)), state.toggle(1), state.includesInput1)
|
|
241
241
|
: undefined,
|
|
242
242
|
this.baseRange.input2Diffs.length > 0
|
|
243
|
-
? action('mergeEditor.acceptInput2', ( localize(
|
|
243
|
+
? action('mergeEditor.acceptInput2', ( localize(7785, 'Accept {0}', this.model.input2.title)), state.toggle(2), state.includesInput2)
|
|
244
244
|
: undefined,
|
|
245
245
|
this.baseRange.isConflicting
|
|
246
|
-
? setFields(action('mergeEditor.acceptBoth', ( localize(
|
|
246
|
+
? setFields(action('mergeEditor.acceptBoth', ( localize(7786, 'Accept Both')), state.withInputValue(1, !both).withInputValue(2, !both), both), { enabled: this.baseRange.canBeCombined })
|
|
247
247
|
: undefined,
|
|
248
248
|
( new Separator()),
|
|
249
249
|
this.baseRange.isConflicting
|
|
250
|
-
? setFields(action('mergeEditor.swap', ( localize(
|
|
250
|
+
? setFields(action('mergeEditor.swap', ( localize(7787, 'Swap')), state.swap(), false), { enabled: !state.kind && (!both || this.baseRange.isOrderRelevant) })
|
|
251
251
|
: undefined,
|
|
252
|
-
setFields(( new Action('mergeEditor.markAsHandled', ( localize(
|
|
252
|
+
setFields(( new Action('mergeEditor.markAsHandled', ( localize(7788, 'Mark as Handled')), undefined, true, () => {
|
|
253
253
|
transaction((tx) => {
|
|
254
254
|
this.model.setHandled(this.baseRange, !handled, tx);
|
|
255
255
|
});
|
|
@@ -292,10 +292,10 @@ class MergeConflictGutterItemView extends Disposable {
|
|
|
292
292
|
const item = this.item.read(reader);
|
|
293
293
|
const value = item.toggleState.read(reader);
|
|
294
294
|
const iconMap = {
|
|
295
|
-
[InputState.excluded]: { icon: undefined, checked: false, title: ( localize(
|
|
296
|
-
[InputState.unrecognized]: { icon: Codicon.circleFilled, checked: false, title: ( localize(
|
|
297
|
-
[InputState.first]: { icon: Codicon.check, checked: true, title: ( localize(
|
|
298
|
-
[InputState.second]: { icon: Codicon.checkAll, checked: true, title: ( localize(
|
|
295
|
+
[InputState.excluded]: { icon: undefined, checked: false, title: ( localize(7789, "Accept")) },
|
|
296
|
+
[InputState.unrecognized]: { icon: Codicon.circleFilled, checked: false, title: ( localize(7790, "Accept (result is dirty)")) },
|
|
297
|
+
[InputState.first]: { icon: Codicon.check, checked: true, title: ( localize(7791, "Undo accept")) },
|
|
298
|
+
[InputState.second]: { icon: Codicon.checkAll, checked: true, title: ( localize(7792, "Undo accept (currently second)")) },
|
|
299
299
|
};
|
|
300
300
|
const state = iconMap[value];
|
|
301
301
|
checkBox.setIcon(state.icon);
|
package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js
CHANGED
|
@@ -131,7 +131,7 @@ let ResultCodeEditorView = class ResultCodeEditorView extends CodeEditorView {
|
|
|
131
131
|
return;
|
|
132
132
|
}
|
|
133
133
|
this.editor.setModel(vm.model.resultTextModel);
|
|
134
|
-
reset(this.htmlElements.title, ...renderLabelWithIcons(( localize(
|
|
134
|
+
reset(this.htmlElements.title, ...renderLabelWithIcons(( localize(7793, 'Result'))));
|
|
135
135
|
reset(this.htmlElements.description, ...renderLabelWithIcons(this._labelService.getUriLabel(vm.model.resultTextModel.uri, { relative: true })));
|
|
136
136
|
}));
|
|
137
137
|
const remainingConflictsActionBar = this._register(( new ActionBar(this.htmlElements.detail)));
|
|
@@ -146,8 +146,8 @@ let ResultCodeEditorView = class ResultCodeEditorView extends CodeEditorView {
|
|
|
146
146
|
}
|
|
147
147
|
const count = model.unhandledConflictsCount.read(reader);
|
|
148
148
|
const text = count === 1
|
|
149
|
-
? ( localize(
|
|
150
|
-
: ( localize(
|
|
149
|
+
? ( localize(7794, '{0} Conflict Remaining', count))
|
|
150
|
+
: ( localize(7795, '{0} Conflicts Remaining ', count));
|
|
151
151
|
remainingConflictsActionBar.clear();
|
|
152
152
|
remainingConflictsActionBar.push({
|
|
153
153
|
class: undefined,
|
|
@@ -159,8 +159,8 @@ let ResultCodeEditorView = class ResultCodeEditorView extends CodeEditorView {
|
|
|
159
159
|
vm.goToNextModifiedBaseRange(m => !model.isHandled(m).get());
|
|
160
160
|
},
|
|
161
161
|
tooltip: count > 0
|
|
162
|
-
? ( localize(
|
|
163
|
-
: ( localize(
|
|
162
|
+
? ( localize(7796, 'Go to next conflict'))
|
|
163
|
+
: ( localize(7797, 'All conflicts handled, the merge can be completed now.')),
|
|
164
164
|
});
|
|
165
165
|
}));
|
|
166
166
|
this._register(applyObservableDecorations(this.editor, this.decorations));
|