@codingame/monaco-vscode-view-common-service-override 4.5.1 → 4.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/vscode/src/vs/base/browser/ui/grid/grid.js +12 -12
- package/vscode/src/vs/base/browser/ui/grid/gridview.js +26 -26
- package/vscode/src/vs/platform/languagePacks/common/localizedStrings.js +4 -3
- package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +127 -220
- package/vscode/src/vs/workbench/browser/actions/listCommands.js +43 -44
- package/vscode/src/vs/workbench/browser/actions/navigationActions.js +7 -30
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js +67 -138
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.js +21 -36
- package/vscode/src/vs/workbench/browser/parts/compositeBar.js +26 -27
- package/vscode/src/vs/workbench/browser/parts/compositePart.js +17 -31
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +215 -764
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +27 -42
- package/vscode/src/vs/workbench/browser/parts/editor/editorDropTarget.js +24 -23
- package/vscode/src/vs/workbench/browser/parts/editor/editorPart.js +3 -3
- package/vscode/src/vs/workbench/browser/parts/editor/editorParts.js +31 -33
- package/vscode/src/vs/workbench/browser/parts/paneCompositeBar.js +51 -54
- package/vscode/src/vs/workbench/browser/parts/paneCompositePart.js +38 -41
- package/vscode/src/vs/workbench/browser/parts/panel/panelPart.js +21 -24
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarActions.js +2 -5
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.js +17 -20
- package/vscode/src/vs/workbench/browser/window.js +41 -92
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +41 -78
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +23 -46
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +36 -27
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +14 -15
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +10 -11
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditorModelManager.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +25 -52
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js +55 -87
- package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.js +18 -48
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.js +61 -150
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.js +15 -70
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.js +9 -20
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/colors.js +14 -65
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/conflictActions.js +38 -113
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +12 -19
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +34 -75
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js +16 -37
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +40 -43
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +12 -11
- package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.js +24 -61
- package/vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.js +7 -6
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +37 -70
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +23 -46
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +26 -27
- package/vscode/src/vs/workbench/contrib/webview/browser/overlayWebview.js +2 -2
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +50 -52
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +18 -34
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +7 -10
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewService.js +2 -2
- package/vscode/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.js +45 -46
- package/vscode/src/vs/workbench/services/driver/browser/driver.js +8 -6
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +45 -68
- package/vscode/src/vs/workbench/services/history/browser/historyService.js +95 -98
- package/vscode/src/vs/workbench/services/progress/browser/progressService.js +34 -74
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +69 -67
- package/vscode/src/vs/workbench/services/views/common/viewContainerModel.js +52 -47
|
@@ -12,6 +12,7 @@ import { MergeEditor } from '../view/mergeEditor.js';
|
|
|
12
12
|
import { ctxMergeEditorLayout, ctxIsMergeEditor, ctxMergeEditorShowNonConflictingChanges, ctxMergeEditorShowBase, ctxMergeEditorShowBaseAtTop, StorageCloseWithConflicts } from 'vscode/vscode/vs/workbench/contrib/mergeEditor/common/mergeEditor';
|
|
13
13
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
14
14
|
|
|
15
|
+
const _moduleId = "vs/workbench/contrib/mergeEditor/browser/commands/commands";
|
|
15
16
|
class MergeEditorAction extends Action2 {
|
|
16
17
|
constructor(desc) {
|
|
17
18
|
super(desc);
|
|
@@ -54,11 +55,7 @@ class OpenMergeEditor extends Action2 {
|
|
|
54
55
|
constructor() {
|
|
55
56
|
super({
|
|
56
57
|
id: '_open.mergeEditor',
|
|
57
|
-
title: ( localize2WithPath(
|
|
58
|
-
'vs/workbench/contrib/mergeEditor/browser/commands/commands',
|
|
59
|
-
'title',
|
|
60
|
-
'Open Merge Editor'
|
|
61
|
-
)),
|
|
58
|
+
title: ( localize2WithPath(_moduleId, 0, 'Open Merge Editor')),
|
|
62
59
|
});
|
|
63
60
|
}
|
|
64
61
|
run(accessor, ...args) {
|
|
@@ -74,10 +71,10 @@ class OpenMergeEditor extends Action2 {
|
|
|
74
71
|
}
|
|
75
72
|
}
|
|
76
73
|
var IRelaxedOpenArgs;
|
|
77
|
-
( (function(IRelaxedOpenArgs) {
|
|
74
|
+
( ((function(IRelaxedOpenArgs) {
|
|
78
75
|
function validate(obj) {
|
|
79
76
|
if (!obj || typeof obj !== 'object') {
|
|
80
|
-
throw new TypeError('invalid argument');
|
|
77
|
+
throw ( (new TypeError('invalid argument')));
|
|
81
78
|
}
|
|
82
79
|
const o = obj;
|
|
83
80
|
const base = toUri(o.base);
|
|
@@ -89,29 +86,37 @@ var IRelaxedOpenArgs;
|
|
|
89
86
|
IRelaxedOpenArgs.validate = validate;
|
|
90
87
|
function toInputData(obj) {
|
|
91
88
|
if (typeof obj === 'string') {
|
|
92
|
-
return (
|
|
89
|
+
return (
|
|
90
|
+
(new MergeEditorInputData( (URI.parse(obj, true)), undefined, undefined, undefined))
|
|
91
|
+
);
|
|
93
92
|
}
|
|
94
93
|
if (!obj || typeof obj !== 'object') {
|
|
95
|
-
throw new TypeError('invalid argument');
|
|
94
|
+
throw ( (new TypeError('invalid argument')));
|
|
96
95
|
}
|
|
97
96
|
if (isUriComponents(obj)) {
|
|
98
|
-
return (
|
|
97
|
+
return (
|
|
98
|
+
(new MergeEditorInputData(URI.revive(obj), undefined, undefined, undefined))
|
|
99
|
+
);
|
|
99
100
|
}
|
|
100
101
|
const o = obj;
|
|
101
102
|
const title = o.title;
|
|
102
103
|
const uri = toUri(o.uri);
|
|
103
104
|
const detail = o.detail;
|
|
104
105
|
const description = o.description;
|
|
105
|
-
return (
|
|
106
|
+
return (
|
|
107
|
+
(new MergeEditorInputData(uri, title, detail, description))
|
|
108
|
+
);
|
|
106
109
|
}
|
|
107
110
|
function toUri(obj) {
|
|
108
111
|
if (typeof obj === 'string') {
|
|
109
|
-
return (
|
|
112
|
+
return (
|
|
113
|
+
(URI.parse(obj, true))
|
|
114
|
+
);
|
|
110
115
|
}
|
|
111
116
|
else if (obj && typeof obj === 'object') {
|
|
112
117
|
return URI.revive(obj);
|
|
113
118
|
}
|
|
114
|
-
throw new TypeError('invalid argument');
|
|
119
|
+
throw ( (new TypeError('invalid argument')));
|
|
115
120
|
}
|
|
116
121
|
function isUriComponents(obj) {
|
|
117
122
|
if (!obj || typeof obj !== 'object') {
|
|
@@ -124,17 +129,13 @@ var IRelaxedOpenArgs;
|
|
|
124
129
|
&& typeof o.query === 'string'
|
|
125
130
|
&& typeof o.fragment === 'string';
|
|
126
131
|
}
|
|
127
|
-
})(IRelaxedOpenArgs || (IRelaxedOpenArgs = {})));
|
|
132
|
+
})(IRelaxedOpenArgs || (IRelaxedOpenArgs = {}))));
|
|
128
133
|
class SetMixedLayout extends Action2 {
|
|
129
134
|
constructor() {
|
|
130
135
|
super({
|
|
131
136
|
id: 'merge.mixedLayout',
|
|
132
|
-
title: ( localize2WithPath(
|
|
133
|
-
|
|
134
|
-
'layout.mixed',
|
|
135
|
-
"Mixed Layout"
|
|
136
|
-
)),
|
|
137
|
-
toggled: ( ctxMergeEditorLayout.isEqualTo('mixed')),
|
|
137
|
+
title: ( localize2WithPath(_moduleId, 1, "Mixed Layout")),
|
|
138
|
+
toggled: ( (ctxMergeEditorLayout.isEqualTo('mixed'))),
|
|
138
139
|
menu: [
|
|
139
140
|
{
|
|
140
141
|
id: MenuId.EditorTitle,
|
|
@@ -157,12 +158,8 @@ class SetColumnLayout extends Action2 {
|
|
|
157
158
|
constructor() {
|
|
158
159
|
super({
|
|
159
160
|
id: 'merge.columnLayout',
|
|
160
|
-
title: ( localize2WithPath(
|
|
161
|
-
|
|
162
|
-
'layout.column',
|
|
163
|
-
'Column Layout'
|
|
164
|
-
)),
|
|
165
|
-
toggled: ( ctxMergeEditorLayout.isEqualTo('columns')),
|
|
161
|
+
title: ( localize2WithPath(_moduleId, 2, 'Column Layout')),
|
|
162
|
+
toggled: ( (ctxMergeEditorLayout.isEqualTo('columns'))),
|
|
166
163
|
menu: [{
|
|
167
164
|
id: MenuId.EditorTitle,
|
|
168
165
|
when: ctxIsMergeEditor,
|
|
@@ -183,12 +180,8 @@ class ShowNonConflictingChanges extends Action2 {
|
|
|
183
180
|
constructor() {
|
|
184
181
|
super({
|
|
185
182
|
id: 'merge.showNonConflictingChanges',
|
|
186
|
-
title: ( localize2WithPath(
|
|
187
|
-
|
|
188
|
-
'showNonConflictingChanges',
|
|
189
|
-
"Show Non-Conflicting Changes"
|
|
190
|
-
)),
|
|
191
|
-
toggled: ( ctxMergeEditorShowNonConflictingChanges.isEqualTo(true)),
|
|
183
|
+
title: ( localize2WithPath(_moduleId, 3, "Show Non-Conflicting Changes")),
|
|
184
|
+
toggled: ( (ctxMergeEditorShowNonConflictingChanges.isEqualTo(true))),
|
|
192
185
|
menu: [
|
|
193
186
|
{
|
|
194
187
|
id: MenuId.EditorTitle,
|
|
@@ -211,16 +204,15 @@ class ShowHideBase extends Action2 {
|
|
|
211
204
|
constructor() {
|
|
212
205
|
super({
|
|
213
206
|
id: 'merge.showBase',
|
|
214
|
-
title: ( localize2WithPath(
|
|
215
|
-
|
|
216
|
-
'layout.showBase',
|
|
217
|
-
"Show Base"
|
|
218
|
-
)),
|
|
219
|
-
toggled: ( ctxMergeEditorShowBase.isEqualTo(true)),
|
|
207
|
+
title: ( localize2WithPath(_moduleId, 4, "Show Base")),
|
|
208
|
+
toggled: ( (ctxMergeEditorShowBase.isEqualTo(true))),
|
|
220
209
|
menu: [
|
|
221
210
|
{
|
|
222
211
|
id: MenuId.EditorTitle,
|
|
223
|
-
when: ( ContextKeyExpr.and(
|
|
212
|
+
when: ( (ContextKeyExpr.and(
|
|
213
|
+
ctxIsMergeEditor,
|
|
214
|
+
(ctxMergeEditorLayout.isEqualTo('columns'))
|
|
215
|
+
))),
|
|
224
216
|
group: '2_merge',
|
|
225
217
|
order: 9,
|
|
226
218
|
},
|
|
@@ -238,16 +230,12 @@ class ShowHideTopBase extends Action2 {
|
|
|
238
230
|
constructor() {
|
|
239
231
|
super({
|
|
240
232
|
id: 'merge.showBaseTop',
|
|
241
|
-
title: ( localize2WithPath(
|
|
242
|
-
|
|
243
|
-
'layout.showBaseTop',
|
|
244
|
-
"Show Base Top"
|
|
245
|
-
)),
|
|
246
|
-
toggled: ( ContextKeyExpr.and(ctxMergeEditorShowBase, ctxMergeEditorShowBaseAtTop)),
|
|
233
|
+
title: ( localize2WithPath(_moduleId, 5, "Show Base Top")),
|
|
234
|
+
toggled: ( (ContextKeyExpr.and(ctxMergeEditorShowBase, ctxMergeEditorShowBaseAtTop))),
|
|
247
235
|
menu: [
|
|
248
236
|
{
|
|
249
237
|
id: MenuId.EditorTitle,
|
|
250
|
-
when: ( ContextKeyExpr.and(ctxIsMergeEditor,
|
|
238
|
+
when: ( (ContextKeyExpr.and(ctxIsMergeEditor, (ctxMergeEditorLayout.isEqualTo('mixed'))))),
|
|
251
239
|
group: '2_merge',
|
|
252
240
|
order: 10,
|
|
253
241
|
},
|
|
@@ -265,16 +253,15 @@ class ShowHideCenterBase extends Action2 {
|
|
|
265
253
|
constructor() {
|
|
266
254
|
super({
|
|
267
255
|
id: 'merge.showBaseCenter',
|
|
268
|
-
title: ( localize2WithPath(
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
)),
|
|
273
|
-
toggled: ( ContextKeyExpr.and(ctxMergeEditorShowBase, ( ctxMergeEditorShowBaseAtTop.negate()))),
|
|
256
|
+
title: ( localize2WithPath(_moduleId, 6, "Show Base Center")),
|
|
257
|
+
toggled: ( (ContextKeyExpr.and(
|
|
258
|
+
ctxMergeEditorShowBase,
|
|
259
|
+
(ctxMergeEditorShowBaseAtTop.negate())
|
|
260
|
+
))),
|
|
274
261
|
menu: [
|
|
275
262
|
{
|
|
276
263
|
id: MenuId.EditorTitle,
|
|
277
|
-
when: ( ContextKeyExpr.and(ctxIsMergeEditor,
|
|
264
|
+
when: ( (ContextKeyExpr.and(ctxIsMergeEditor, (ctxMergeEditorLayout.isEqualTo('mixed'))))),
|
|
278
265
|
group: '2_merge',
|
|
279
266
|
order: 11,
|
|
280
267
|
},
|
|
@@ -288,21 +275,13 @@ class ShowHideCenterBase extends Action2 {
|
|
|
288
275
|
}
|
|
289
276
|
}
|
|
290
277
|
}
|
|
291
|
-
const mergeEditorCategory = ( localize2WithPath(
|
|
292
|
-
'vs/workbench/contrib/mergeEditor/browser/commands/commands',
|
|
293
|
-
'mergeEditor',
|
|
294
|
-
"Merge Editor"
|
|
295
|
-
));
|
|
278
|
+
const mergeEditorCategory = ( localize2WithPath(_moduleId, 7, "Merge Editor"));
|
|
296
279
|
class OpenResultResource extends MergeEditorAction {
|
|
297
280
|
constructor() {
|
|
298
281
|
super({
|
|
299
282
|
id: 'merge.openResult',
|
|
300
283
|
icon: Codicon.goToFile,
|
|
301
|
-
title: ( localize2WithPath(
|
|
302
|
-
'vs/workbench/contrib/mergeEditor/browser/commands/commands',
|
|
303
|
-
'openfile',
|
|
304
|
-
"Open File"
|
|
305
|
-
)),
|
|
284
|
+
title: ( localize2WithPath(_moduleId, 8, "Open File")),
|
|
306
285
|
category: mergeEditorCategory,
|
|
307
286
|
menu: [{
|
|
308
287
|
id: MenuId.EditorTitle,
|
|
@@ -323,11 +302,7 @@ class GoToNextUnhandledConflict extends MergeEditorAction {
|
|
|
323
302
|
super({
|
|
324
303
|
id: 'merge.goToNextUnhandledConflict',
|
|
325
304
|
category: mergeEditorCategory,
|
|
326
|
-
title: ( localize2WithPath(
|
|
327
|
-
'vs/workbench/contrib/mergeEditor/browser/commands/commands',
|
|
328
|
-
'merge.goToNextUnhandledConflict',
|
|
329
|
-
"Go to Next Unhandled Conflict"
|
|
330
|
-
)),
|
|
305
|
+
title: ( localize2WithPath(_moduleId, 9, "Go to Next Unhandled Conflict")),
|
|
331
306
|
icon: Codicon.arrowDown,
|
|
332
307
|
menu: [
|
|
333
308
|
{
|
|
@@ -351,11 +326,7 @@ class GoToPreviousUnhandledConflict extends MergeEditorAction {
|
|
|
351
326
|
super({
|
|
352
327
|
id: 'merge.goToPreviousUnhandledConflict',
|
|
353
328
|
category: mergeEditorCategory,
|
|
354
|
-
title: ( localize2WithPath(
|
|
355
|
-
'vs/workbench/contrib/mergeEditor/browser/commands/commands',
|
|
356
|
-
'merge.goToPreviousUnhandledConflict',
|
|
357
|
-
"Go to Previous Unhandled Conflict"
|
|
358
|
-
)),
|
|
329
|
+
title: ( localize2WithPath(_moduleId, 10, "Go to Previous Unhandled Conflict")),
|
|
359
330
|
icon: Codicon.arrowUp,
|
|
360
331
|
menu: [
|
|
361
332
|
{
|
|
@@ -379,11 +350,7 @@ class ToggleActiveConflictInput1 extends MergeEditorAction {
|
|
|
379
350
|
super({
|
|
380
351
|
id: 'merge.toggleActiveConflictInput1',
|
|
381
352
|
category: mergeEditorCategory,
|
|
382
|
-
title: ( localize2WithPath(
|
|
383
|
-
'vs/workbench/contrib/mergeEditor/browser/commands/commands',
|
|
384
|
-
'merge.toggleCurrentConflictFromLeft',
|
|
385
|
-
"Toggle Current Conflict from Left"
|
|
386
|
-
)),
|
|
353
|
+
title: ( localize2WithPath(_moduleId, 11, "Toggle Current Conflict from Left")),
|
|
387
354
|
f1: true,
|
|
388
355
|
precondition: ctxIsMergeEditor,
|
|
389
356
|
});
|
|
@@ -397,11 +364,7 @@ class ToggleActiveConflictInput2 extends MergeEditorAction {
|
|
|
397
364
|
super({
|
|
398
365
|
id: 'merge.toggleActiveConflictInput2',
|
|
399
366
|
category: mergeEditorCategory,
|
|
400
|
-
title: ( localize2WithPath(
|
|
401
|
-
'vs/workbench/contrib/mergeEditor/browser/commands/commands',
|
|
402
|
-
'merge.toggleCurrentConflictFromRight',
|
|
403
|
-
"Toggle Current Conflict from Right"
|
|
404
|
-
)),
|
|
367
|
+
title: ( localize2WithPath(_moduleId, 12, "Toggle Current Conflict from Right")),
|
|
405
368
|
f1: true,
|
|
406
369
|
precondition: ctxIsMergeEditor,
|
|
407
370
|
});
|
|
@@ -415,16 +378,8 @@ class CompareInput1WithBaseCommand extends MergeEditorAction {
|
|
|
415
378
|
super({
|
|
416
379
|
id: 'mergeEditor.compareInput1WithBase',
|
|
417
380
|
category: mergeEditorCategory,
|
|
418
|
-
title: ( localize2WithPath(
|
|
419
|
-
|
|
420
|
-
'mergeEditor.compareInput1WithBase',
|
|
421
|
-
"Compare Input 1 With Base"
|
|
422
|
-
)),
|
|
423
|
-
shortTitle: ( localizeWithPath(
|
|
424
|
-
'vs/workbench/contrib/mergeEditor/browser/commands/commands',
|
|
425
|
-
'mergeEditor.compareWithBase',
|
|
426
|
-
'Compare With Base'
|
|
427
|
-
)),
|
|
381
|
+
title: ( localize2WithPath(_moduleId, 13, "Compare Input 1 With Base")),
|
|
382
|
+
shortTitle: ( localizeWithPath(_moduleId, 14, 'Compare With Base')),
|
|
428
383
|
f1: true,
|
|
429
384
|
precondition: ctxIsMergeEditor,
|
|
430
385
|
menu: { id: MenuId.MergeInput1Toolbar, group: 'primary' },
|
|
@@ -441,16 +396,8 @@ class CompareInput2WithBaseCommand extends MergeEditorAction {
|
|
|
441
396
|
super({
|
|
442
397
|
id: 'mergeEditor.compareInput2WithBase',
|
|
443
398
|
category: mergeEditorCategory,
|
|
444
|
-
title: ( localize2WithPath(
|
|
445
|
-
|
|
446
|
-
'mergeEditor.compareInput2WithBase',
|
|
447
|
-
"Compare Input 2 With Base"
|
|
448
|
-
)),
|
|
449
|
-
shortTitle: ( localizeWithPath(
|
|
450
|
-
'vs/workbench/contrib/mergeEditor/browser/commands/commands',
|
|
451
|
-
'mergeEditor.compareWithBase',
|
|
452
|
-
'Compare With Base'
|
|
453
|
-
)),
|
|
399
|
+
title: ( localize2WithPath(_moduleId, 15, "Compare Input 2 With Base")),
|
|
400
|
+
shortTitle: ( localizeWithPath(_moduleId, 14, 'Compare With Base')),
|
|
454
401
|
f1: true,
|
|
455
402
|
precondition: ctxIsMergeEditor,
|
|
456
403
|
menu: { id: MenuId.MergeInput2Toolbar, group: 'primary' },
|
|
@@ -486,11 +433,7 @@ class OpenBaseFile extends MergeEditorAction {
|
|
|
486
433
|
super({
|
|
487
434
|
id: 'merge.openBaseEditor',
|
|
488
435
|
category: mergeEditorCategory,
|
|
489
|
-
title: ( localize2WithPath(
|
|
490
|
-
'vs/workbench/contrib/mergeEditor/browser/commands/commands',
|
|
491
|
-
'merge.openBaseEditor',
|
|
492
|
-
"Open Base File"
|
|
493
|
-
)),
|
|
436
|
+
title: ( localize2WithPath(_moduleId, 16, "Open Base File")),
|
|
494
437
|
f1: true,
|
|
495
438
|
precondition: ctxIsMergeEditor,
|
|
496
439
|
});
|
|
@@ -505,11 +448,7 @@ class AcceptAllInput1 extends MergeEditorAction {
|
|
|
505
448
|
super({
|
|
506
449
|
id: 'merge.acceptAllInput1',
|
|
507
450
|
category: mergeEditorCategory,
|
|
508
|
-
title: ( localize2WithPath(
|
|
509
|
-
'vs/workbench/contrib/mergeEditor/browser/commands/commands',
|
|
510
|
-
'merge.acceptAllInput1',
|
|
511
|
-
"Accept All Changes from Left"
|
|
512
|
-
)),
|
|
451
|
+
title: ( localize2WithPath(_moduleId, 17, "Accept All Changes from Left")),
|
|
513
452
|
f1: true,
|
|
514
453
|
precondition: ctxIsMergeEditor,
|
|
515
454
|
menu: { id: MenuId.MergeInput1Toolbar, group: 'primary' },
|
|
@@ -525,11 +464,7 @@ class AcceptAllInput2 extends MergeEditorAction {
|
|
|
525
464
|
super({
|
|
526
465
|
id: 'merge.acceptAllInput2',
|
|
527
466
|
category: mergeEditorCategory,
|
|
528
|
-
title: ( localize2WithPath(
|
|
529
|
-
'vs/workbench/contrib/mergeEditor/browser/commands/commands',
|
|
530
|
-
'merge.acceptAllInput2',
|
|
531
|
-
"Accept All Changes from Right"
|
|
532
|
-
)),
|
|
467
|
+
title: ( localize2WithPath(_moduleId, 18, "Accept All Changes from Right")),
|
|
533
468
|
f1: true,
|
|
534
469
|
precondition: ctxIsMergeEditor,
|
|
535
470
|
menu: { id: MenuId.MergeInput2Toolbar, group: 'primary' },
|
|
@@ -545,16 +480,8 @@ class ResetToBaseAndAutoMergeCommand extends MergeEditorAction {
|
|
|
545
480
|
super({
|
|
546
481
|
id: 'mergeEditor.resetResultToBaseAndAutoMerge',
|
|
547
482
|
category: mergeEditorCategory,
|
|
548
|
-
title: ( localize2WithPath(
|
|
549
|
-
|
|
550
|
-
'mergeEditor.resetResultToBaseAndAutoMerge',
|
|
551
|
-
"Reset Result"
|
|
552
|
-
)),
|
|
553
|
-
shortTitle: ( localizeWithPath(
|
|
554
|
-
'vs/workbench/contrib/mergeEditor/browser/commands/commands',
|
|
555
|
-
'mergeEditor.resetResultToBaseAndAutoMerge.short',
|
|
556
|
-
'Reset'
|
|
557
|
-
)),
|
|
483
|
+
title: ( localize2WithPath(_moduleId, 19, "Reset Result")),
|
|
484
|
+
shortTitle: ( localizeWithPath(_moduleId, 20, 'Reset')),
|
|
558
485
|
f1: true,
|
|
559
486
|
precondition: ctxIsMergeEditor,
|
|
560
487
|
menu: { id: MenuId.MergeInputResultToolbar, group: 'primary' },
|
|
@@ -570,11 +497,7 @@ class ResetCloseWithConflictsChoice extends Action2 {
|
|
|
570
497
|
super({
|
|
571
498
|
id: 'mergeEditor.resetCloseWithConflictsChoice',
|
|
572
499
|
category: mergeEditorCategory,
|
|
573
|
-
title: ( localize2WithPath(
|
|
574
|
-
'vs/workbench/contrib/mergeEditor/browser/commands/commands',
|
|
575
|
-
'mergeEditor.resetChoice',
|
|
576
|
-
"Reset Choice for \'Close with Conflicts\'"
|
|
577
|
-
)),
|
|
500
|
+
title: ( localize2WithPath(_moduleId, 21, "Reset Choice for \'Close with Conflicts\'")),
|
|
578
501
|
f1: true,
|
|
579
502
|
});
|
|
580
503
|
}
|
|
@@ -587,11 +510,7 @@ class AcceptMerge extends MergeEditorAction2 {
|
|
|
587
510
|
super({
|
|
588
511
|
id: 'mergeEditor.acceptMerge',
|
|
589
512
|
category: mergeEditorCategory,
|
|
590
|
-
title: ( localize2WithPath(
|
|
591
|
-
'vs/workbench/contrib/mergeEditor/browser/commands/commands',
|
|
592
|
-
'mergeEditor.acceptMerge',
|
|
593
|
-
"Complete Merge"
|
|
594
|
-
)),
|
|
513
|
+
title: ( localize2WithPath(_moduleId, 22, "Complete Merge")),
|
|
595
514
|
f1: false,
|
|
596
515
|
precondition: ctxIsMergeEditor
|
|
597
516
|
});
|
|
@@ -602,21 +521,13 @@ class AcceptMerge extends MergeEditorAction2 {
|
|
|
602
521
|
if (viewModel.model.unhandledConflictsCount.get() > 0) {
|
|
603
522
|
const { confirmed } = await dialogService.confirm({
|
|
604
523
|
message: ( localizeWithPath(
|
|
605
|
-
|
|
606
|
-
|
|
524
|
+
_moduleId,
|
|
525
|
+
23,
|
|
607
526
|
"Do you want to complete the merge of {0}?",
|
|
608
527
|
basename(inputModel.resultUri)
|
|
609
528
|
)),
|
|
610
|
-
detail: ( localizeWithPath(
|
|
611
|
-
|
|
612
|
-
'mergeEditor.acceptMerge.unhandledConflicts.detail',
|
|
613
|
-
"The file contains unhandled conflicts."
|
|
614
|
-
)),
|
|
615
|
-
primaryButton: ( localizeWithPath(
|
|
616
|
-
'vs/workbench/contrib/mergeEditor/browser/commands/commands',
|
|
617
|
-
{ key: 'mergeEditor.acceptMerge.unhandledConflicts.accept', comment: ['&& denotes a mnemonic'] },
|
|
618
|
-
"&&Complete with Conflicts"
|
|
619
|
-
))
|
|
529
|
+
detail: ( localizeWithPath(_moduleId, 24, "The file contains unhandled conflicts.")),
|
|
530
|
+
primaryButton: ( localizeWithPath(_moduleId, 25, "&&Complete with Conflicts"))
|
|
620
531
|
});
|
|
621
532
|
if (!confirmed) {
|
|
622
533
|
return {
|
|
@@ -13,21 +13,14 @@ import { MergeEditor } from '../view/mergeEditor.js';
|
|
|
13
13
|
import { ctxIsMergeEditor } from 'vscode/vscode/vs/workbench/contrib/mergeEditor/common/mergeEditor';
|
|
14
14
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
15
15
|
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
'mergeEditor',
|
|
19
|
-
'Merge Editor (Dev)'
|
|
20
|
-
));
|
|
16
|
+
const _moduleId = "vs/workbench/contrib/mergeEditor/browser/commands/devCommands";
|
|
17
|
+
const MERGE_EDITOR_CATEGORY = ( localize2WithPath(_moduleId, 0, 'Merge Editor (Dev)'));
|
|
21
18
|
class MergeEditorCopyContentsToJSON extends Action2 {
|
|
22
19
|
constructor() {
|
|
23
20
|
super({
|
|
24
21
|
id: 'merge.dev.copyContentsJson',
|
|
25
22
|
category: MERGE_EDITOR_CATEGORY,
|
|
26
|
-
title: ( localize2WithPath(
|
|
27
|
-
'vs/workbench/contrib/mergeEditor/browser/commands/devCommands',
|
|
28
|
-
'merge.dev.copyState',
|
|
29
|
-
"Copy Merge Editor State as JSON"
|
|
30
|
-
)),
|
|
23
|
+
title: ( localize2WithPath(_moduleId, 1, "Copy Merge Editor State as JSON")),
|
|
31
24
|
icon: Codicon.layoutCentered,
|
|
32
25
|
f1: true,
|
|
33
26
|
precondition: ctxIsMergeEditor,
|
|
@@ -39,16 +32,8 @@ class MergeEditorCopyContentsToJSON extends Action2 {
|
|
|
39
32
|
const notificationService = accessor.get(INotificationService);
|
|
40
33
|
if (!(activeEditorPane instanceof MergeEditor)) {
|
|
41
34
|
notificationService.info({
|
|
42
|
-
name: ( localizeWithPath(
|
|
43
|
-
|
|
44
|
-
'mergeEditor.name',
|
|
45
|
-
'Merge Editor'
|
|
46
|
-
)),
|
|
47
|
-
message: ( localizeWithPath(
|
|
48
|
-
'vs/workbench/contrib/mergeEditor/browser/commands/devCommands',
|
|
49
|
-
'mergeEditor.noActiveMergeEditor',
|
|
50
|
-
"No active merge editor"
|
|
51
|
-
))
|
|
35
|
+
name: ( localizeWithPath(_moduleId, 2, 'Merge Editor')),
|
|
36
|
+
message: ( localizeWithPath(_moduleId, 3, "No active merge editor"))
|
|
52
37
|
});
|
|
53
38
|
return;
|
|
54
39
|
}
|
|
@@ -67,16 +52,8 @@ class MergeEditorCopyContentsToJSON extends Action2 {
|
|
|
67
52
|
const jsonStr = JSON.stringify(contents, undefined, 4);
|
|
68
53
|
clipboardService.writeText(jsonStr);
|
|
69
54
|
notificationService.info({
|
|
70
|
-
name: ( localizeWithPath(
|
|
71
|
-
|
|
72
|
-
'mergeEditor.name',
|
|
73
|
-
'Merge Editor'
|
|
74
|
-
)),
|
|
75
|
-
message: ( localizeWithPath(
|
|
76
|
-
'vs/workbench/contrib/mergeEditor/browser/commands/devCommands',
|
|
77
|
-
'mergeEditor.successfullyCopiedMergeEditorContents',
|
|
78
|
-
"Successfully copied merge editor state"
|
|
79
|
-
)),
|
|
55
|
+
name: ( localizeWithPath(_moduleId, 2, 'Merge Editor')),
|
|
56
|
+
message: ( localizeWithPath(_moduleId, 4, "Successfully copied merge editor state")),
|
|
80
57
|
});
|
|
81
58
|
}
|
|
82
59
|
}
|
|
@@ -85,11 +62,7 @@ class MergeEditorSaveContentsToFolder extends Action2 {
|
|
|
85
62
|
super({
|
|
86
63
|
id: 'merge.dev.saveContentsToFolder',
|
|
87
64
|
category: MERGE_EDITOR_CATEGORY,
|
|
88
|
-
title: ( localize2WithPath(
|
|
89
|
-
'vs/workbench/contrib/mergeEditor/browser/commands/devCommands',
|
|
90
|
-
'merge.dev.saveContentsToFolder',
|
|
91
|
-
"Save Merge Editor State to Folder"
|
|
92
|
-
)),
|
|
65
|
+
title: ( localize2WithPath(_moduleId, 5, "Save Merge Editor State to Folder")),
|
|
93
66
|
icon: Codicon.layoutCentered,
|
|
94
67
|
f1: true,
|
|
95
68
|
precondition: ctxIsMergeEditor,
|
|
@@ -103,16 +76,8 @@ class MergeEditorSaveContentsToFolder extends Action2 {
|
|
|
103
76
|
const languageService = accessor.get(ILanguageService);
|
|
104
77
|
if (!(activeEditorPane instanceof MergeEditor)) {
|
|
105
78
|
notificationService.info({
|
|
106
|
-
name: ( localizeWithPath(
|
|
107
|
-
|
|
108
|
-
'mergeEditor.name',
|
|
109
|
-
'Merge Editor'
|
|
110
|
-
)),
|
|
111
|
-
message: ( localizeWithPath(
|
|
112
|
-
'vs/workbench/contrib/mergeEditor/browser/commands/devCommands',
|
|
113
|
-
'mergeEditor.noActiveMergeEditor',
|
|
114
|
-
"No active merge editor"
|
|
115
|
-
))
|
|
79
|
+
name: ( localizeWithPath(_moduleId, 2, 'Merge Editor')),
|
|
80
|
+
message: ( localizeWithPath(_moduleId, 3, "No active merge editor"))
|
|
116
81
|
});
|
|
117
82
|
return;
|
|
118
83
|
}
|
|
@@ -124,11 +89,7 @@ class MergeEditorSaveContentsToFolder extends Action2 {
|
|
|
124
89
|
canSelectFiles: false,
|
|
125
90
|
canSelectFolders: true,
|
|
126
91
|
canSelectMany: false,
|
|
127
|
-
title: ( localizeWithPath(
|
|
128
|
-
'vs/workbench/contrib/mergeEditor/browser/commands/devCommands',
|
|
129
|
-
'mergeEditor.selectFolderToSaveTo',
|
|
130
|
-
'Select folder to save to'
|
|
131
|
-
))
|
|
92
|
+
title: ( localizeWithPath(_moduleId, 6, 'Select folder to save to'))
|
|
132
93
|
});
|
|
133
94
|
if (!result) {
|
|
134
95
|
return;
|
|
@@ -146,16 +107,8 @@ class MergeEditorSaveContentsToFolder extends Action2 {
|
|
|
146
107
|
write('initialResult', model.getInitialResultValue()),
|
|
147
108
|
]);
|
|
148
109
|
notificationService.info({
|
|
149
|
-
name: ( localizeWithPath(
|
|
150
|
-
|
|
151
|
-
'mergeEditor.name',
|
|
152
|
-
'Merge Editor'
|
|
153
|
-
)),
|
|
154
|
-
message: ( localizeWithPath(
|
|
155
|
-
'vs/workbench/contrib/mergeEditor/browser/commands/devCommands',
|
|
156
|
-
'mergeEditor.successfullySavedMergeEditorContentsToFolder',
|
|
157
|
-
"Successfully saved merge editor state to folder"
|
|
158
|
-
)),
|
|
110
|
+
name: ( localizeWithPath(_moduleId, 2, 'Merge Editor')),
|
|
111
|
+
message: ( localizeWithPath(_moduleId, 7, "Successfully saved merge editor state to folder")),
|
|
159
112
|
});
|
|
160
113
|
}
|
|
161
114
|
}
|
|
@@ -164,11 +117,7 @@ class MergeEditorLoadContentsFromFolder extends Action2 {
|
|
|
164
117
|
super({
|
|
165
118
|
id: 'merge.dev.loadContentsFromFolder',
|
|
166
119
|
category: MERGE_EDITOR_CATEGORY,
|
|
167
|
-
title: ( localize2WithPath(
|
|
168
|
-
'vs/workbench/contrib/mergeEditor/browser/commands/devCommands',
|
|
169
|
-
'merge.dev.loadContentsFromFolder',
|
|
170
|
-
"Load Merge Editor State from Folder"
|
|
171
|
-
)),
|
|
120
|
+
title: ( localize2WithPath(_moduleId, 8, "Load Merge Editor State from Folder")),
|
|
172
121
|
icon: Codicon.layoutCentered,
|
|
173
122
|
f1: true
|
|
174
123
|
});
|
|
@@ -187,11 +136,7 @@ class MergeEditorLoadContentsFromFolder extends Action2 {
|
|
|
187
136
|
canSelectFiles: false,
|
|
188
137
|
canSelectFolders: true,
|
|
189
138
|
canSelectMany: false,
|
|
190
|
-
title: ( localizeWithPath(
|
|
191
|
-
'vs/workbench/contrib/mergeEditor/browser/commands/devCommands',
|
|
192
|
-
'mergeEditor.selectFolderToSaveTo',
|
|
193
|
-
'Select folder to save to'
|
|
194
|
-
))
|
|
139
|
+
title: ( localizeWithPath(_moduleId, 6, 'Select folder to save to'))
|
|
195
140
|
});
|
|
196
141
|
if (!result) {
|
|
197
142
|
return;
|
|
@@ -12,31 +12,20 @@ import { MergeEditorInput } from 'vscode/vscode/vs/workbench/contrib/mergeEditor
|
|
|
12
12
|
import { MergeEditor, MergeEditorOpenHandlerContribution, MergeEditorResolverContribution } from './view/mergeEditor.js';
|
|
13
13
|
import { MergeEditorSerializer } from './mergeEditorSerializer.js';
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"Merge Editor"
|
|
19
|
-
))), [
|
|
20
|
-
( new SyncDescriptor(MergeEditorInput))
|
|
15
|
+
const _moduleId = "vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution";
|
|
16
|
+
( (Registry.as(EditorExtensions.EditorPane))).registerEditorPane(EditorPaneDescriptor.create(MergeEditor, MergeEditor.ID, ( localizeWithPath(_moduleId, 0, "Merge Editor"))), [
|
|
17
|
+
( (new SyncDescriptor(MergeEditorInput)))
|
|
21
18
|
]);
|
|
22
|
-
( Registry.as(EditorExtensions.EditorFactory)).registerEditorSerializer(MergeEditorInput.ID, MergeEditorSerializer);
|
|
23
|
-
( Registry.as(Extensions.Configuration)).registerConfiguration({
|
|
19
|
+
( (Registry.as(EditorExtensions.EditorFactory))).registerEditorSerializer(MergeEditorInput.ID, MergeEditorSerializer);
|
|
20
|
+
( (Registry.as(Extensions.Configuration))).registerConfiguration({
|
|
24
21
|
properties: {
|
|
25
22
|
'mergeEditor.diffAlgorithm': {
|
|
26
23
|
type: 'string',
|
|
27
24
|
enum: ['legacy', 'advanced'],
|
|
28
25
|
default: 'advanced',
|
|
29
26
|
markdownEnumDescriptions: [
|
|
30
|
-
( localizeWithPath(
|
|
31
|
-
|
|
32
|
-
'diffAlgorithm.legacy',
|
|
33
|
-
"Uses the legacy diffing algorithm."
|
|
34
|
-
)),
|
|
35
|
-
( localizeWithPath(
|
|
36
|
-
'vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution',
|
|
37
|
-
'diffAlgorithm.advanced',
|
|
38
|
-
"Uses the advanced diffing algorithm."
|
|
39
|
-
)),
|
|
27
|
+
( localizeWithPath(_moduleId, 1, "Uses the legacy diffing algorithm.")),
|
|
28
|
+
( localizeWithPath(_moduleId, 2, "Uses the advanced diffing algorithm.")),
|
|
40
29
|
]
|
|
41
30
|
},
|
|
42
31
|
'mergeEditor.showDeletionMarkers': {
|
|
@@ -69,7 +58,7 @@ registerAction2(ResetCloseWithConflictsChoice);
|
|
|
69
58
|
registerAction2(MergeEditorCopyContentsToJSON);
|
|
70
59
|
registerAction2(MergeEditorSaveContentsToFolder);
|
|
71
60
|
registerAction2(MergeEditorLoadContentsFromFolder);
|
|
72
|
-
( Registry
|
|
73
|
-
.as(Extensions$1.Workbench))
|
|
61
|
+
( (Registry
|
|
62
|
+
.as(Extensions$1.Workbench)))
|
|
74
63
|
.registerWorkbenchContribution(MergeEditorOpenHandlerContribution, 3 );
|
|
75
64
|
registerWorkbenchContribution2(MergeEditorResolverContribution.ID, MergeEditorResolverContribution, 1 );
|