Merge pull request #152986 from microsoft/3wm

This commit is contained in:
Henning Dieterichs
2022-06-23 17:51:17 +02:00
committed by GitHub
2 changed files with 16 additions and 9 deletions
@@ -137,7 +137,8 @@ export class GoToNextConflict extends Action2 {
constructor() {
super({
id: 'merge.goToNextConflict',
title: localize('merge.goToNextConflict', "Merge Editor: Go to Next Conflict"),
category: localize('mergeEditor', "Merge Editor"),
title: localize('merge.goToNextConflict', "Go to Next Conflict"),
icon: Codicon.arrowDown,
menu: [{
id: MenuId.EditorTitle,
@@ -160,7 +161,8 @@ export class GoToPreviousConflict extends Action2 {
constructor() {
super({
id: 'merge.goToPreviousConflict',
title: localize('merge.goToPreviousConflict', "Merge Editor: Go to Previous Conflict"),
category: localize('mergeEditor', "Merge Editor"),
title: localize('merge.goToPreviousConflict', "Go to Previous Conflict"),
icon: Codicon.arrowUp,
menu: [{
id: MenuId.EditorTitle,
@@ -183,7 +185,8 @@ export class ToggleActiveConflictInput1 extends Action2 {
constructor() {
super({
id: 'merge.toggleActiveConflictInput1',
title: localize('merge.toggleActiveConflictInput1', "Merge Editor: Toggle Active Conflict In Input 1"),
category: localize('mergeEditor', "Merge Editor"),
title: localize('merge.toggleActiveConflictInput1', "Toggle Active Conflict In Input 1"),
f1: true,
});
}
@@ -204,7 +207,8 @@ export class ToggleActiveConflictInput2 extends Action2 {
constructor() {
super({
id: 'merge.toggleActiveConflictInput2',
title: localize('merge.toggleActiveConflictInput2', "Merge Editor: Toggle Active Conflict In Input 2"),
category: localize('mergeEditor', "Merge Editor"),
title: localize('merge.toggleActiveConflictInput2', "Toggle Active Conflict In Input 2"),
f1: true,
});
}
@@ -225,7 +229,8 @@ export class CompareInput1WithBaseCommand extends Action2 {
constructor() {
super({
id: 'mergeEditor.compareInput1WithBase',
title: localize('mergeEditor.compareInput1WithBase', "Merge Editor: Compare Input 1 With Base"),
category: localize('mergeEditor', "Merge Editor"),
title: localize('mergeEditor.compareInput1WithBase', "Compare Input 1 With Base"),
f1: true,
});
}
@@ -240,7 +245,8 @@ export class CompareInput2WithBaseCommand extends Action2 {
constructor() {
super({
id: 'mergeEditor.compareInput2WithBase',
title: localize('mergeEditor.compareInput2WithBase', "Merge Editor: Compare Input 2 With Base"),
category: localize('mergeEditor', "Merge Editor"),
title: localize('mergeEditor.compareInput2WithBase', "Compare Input 2 With Base"),
f1: true,
});
}
@@ -60,9 +60,9 @@ export class MergeEditor extends AbstractTextEditor<any> {
private _grid!: Grid<IView>;
private readonly input1View = this.instantiation.createInstance(InputCodeEditorView, 1, { readonly: !this.inputsWritable });
private readonly input2View = this.instantiation.createInstance(InputCodeEditorView, 2, { readonly: !this.inputsWritable });
private readonly inputResultView = this.instantiation.createInstance(ResultCodeEditorView, { readonly: false });
private readonly input1View = this._register(this.instantiation.createInstance(InputCodeEditorView, 1, { readonly: !this.inputsWritable }));
private readonly input2View = this._register(this.instantiation.createInstance(InputCodeEditorView, 2, { readonly: !this.inputsWritable }));
private readonly inputResultView = this._register(this.instantiation.createInstance(ResultCodeEditorView, { readonly: false }));
private readonly _ctxIsMergeEditor: IContextKey<boolean>;
private readonly _ctxUsesColumnLayout: IContextKey<boolean>;
@@ -199,6 +199,7 @@ export class MergeEditor extends AbstractTextEditor<any> {
});
reset(parent, this._grid.element);
this._register(this._grid);
this._ctxUsesColumnLayout.set(false);
this.applyOptions(initialOptions);