src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.ts/InputCodeEditorView/constructor
class InputCodeEditorView:	constructor(
		public readonly inputNumber: 1 | 2,
		@IInstantiationService instantiationService: IInstantiationService,
		@IContextMenuService contextMenuService: IContextMenuService,
	) {
		super(instantiationService);

		this._register(applyObservableDecorations(this.editor, this.decorations));

		this._register(
			new EditorGutter(this.editor, this.htmlElements.gutterDiv, {
				getIntersectingGutterItems: (range, reader) => {
					const viewModel = this.viewModel.read(reader);
					if (!viewModel) { return []; }
					const model = viewModel.model;

					return model.modifiedBaseRanges.read(reader)
						.filter((r) => r.getInputDiffs(this.inputNumber).length > 0)
						.map<ModifiedBaseRangeGutterItemInfo>((baseRange, idx) => ({
							id: idx.toString(),
							range: baseRange.getInputRange(this.inputNumber),
							enabled: model.isUpToDate,
							toggleState: derivedObservable('toggle', (reader) => {
								const input = model
									.getState(baseRange)
									.read(reader)
									.getInput(this.inputNumber);
								return input === InputState.second && !baseRange.isOrderRelevant
									? InputState.first
									: input;
							}
							),
							setState: (value, tx) => viewModel.setState(
								baseRange,
								model
									.getState(baseRange)
									.get()
									.withInputValue(this.inputNumber, value),
								tx
							),
							getContextMenuActions: () => {
								const state = model.getState(baseRange).get();
								const handled = model.isHandled(baseRange).get();

								const update = (newState: ModifiedBaseRangeState) => {
									transaction(tx => viewModel.setState(baseRange, newState, tx));
								};

								function action(id: string, label: string, targetState: ModifiedBaseRangeState, checked: boolean) {
									const action = new Action(id, label, undefined, true, () => {
										update(targetState);
									});
									action.checked = checked;
									return action;
								}
								const both = state.input1 && state.input2;

								return [
									baseRange.input1Diffs.length > 0
										? action(
											'mergeEditor.acceptInput1',
											localize('mergeEditor.accept', 'Accept {0}', model.input1Title),
											state.toggle(1),
											state.input1
										)
										: undefined,
									baseRange.input2Diffs.length > 0
										? action(
											'mergeEditor.acceptInput2',
											localize('mergeEditor.accept', 'Accept {0}', model.input2Title),
											state.toggle(2),
											state.input2
										)
										: undefined,
									baseRange.isConflicting
										? setFields(
											action(
												'mergeEditor.acceptBoth',
												localize(
													'mergeEditor.acceptBoth',
													'Accept Both'
												),
												state.withInput1(!both).withInput2(!both),
												both
											),
											{ enabled: baseRange.canBeCombined }
										)
										: undefined,
									baseRange.isConflicting
										? setFields(
											action(
												'mergeEditor.swap',
												localize('mergeEditor.swap', 'Swap'),
												state.swap(),
												false
											),
											{ enabled: !state.isEmpty && (!both || baseRange.isOrderRelevant) }
										)
										: undefined,

									setFields(
										new Action(
											'mergeEditor.markAsHandled',
											localize('mergeEditor.markAsHandled', 'Mark as Handled'),
											undefined,
											true,
											() => {
												transaction((tx) => {
													model.setHandled(baseRange, !handled, tx);
												});
											}
										),
										{ checked: handled }
									),
								].filter(isDefined);
							}
						}));
				},
				createView: (item, target) => new MergeConflictGutterItemView(item, target, contextMenuService),
			})
		);
	}