src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCell.ts/CodeCell/constructor
class CodeCell:	constructor(
		private readonly notebookEditor: IActiveNotebookEditorDelegate,
		private readonly viewCell: CodeCellViewModel,
		private readonly templateData: CodeCellRenderTemplate,
		@IInstantiationService private readonly instantiationService: IInstantiationService,
		@INotebookCellStatusBarService readonly notebookCellStatusBarService: INotebookCellStatusBarService,
		@IKeybindingService readonly keybindingService: IKeybindingService,
		@IOpenerService readonly openerService: IOpenerService,
		@ILanguageService readonly languageService: ILanguageService,
		@IConfigurationService private configurationService: IConfigurationService,
		@INotebookExecutionStateService notebookExecutionStateService: INotebookExecutionStateService
	) {
		super();

		const cellEditorOptions = this._register(new CellEditorOptions(this.notebookEditor.getBaseCellEditorOptions(viewCell.language), this.notebookEditor.notebookOptions, this.configurationService));
		this._outputContainerRenderer = this.instantiationService.createInstance(CellOutputContainer, notebookEditor, viewCell, templateData, { limit: 500 });
		this.cellParts = [...templateData.cellParts, cellEditorOptions, this._outputContainerRenderer];

		const editorHeight = this.calculateInitEditorHeight();
		this.initializeEditor(editorHeight);

		this.registerViewCellLayoutChange();
		this.registerCellEditorEventListeners();
		this.registerDecorations();
		this.registerMouseListener();

		this._register(notebookExecutionStateService.onDidChangeCellExecution(e => {
			if (e.affectsCell(this.viewCell.uri)) {
				this.cellParts.forEach(cellPart => {
					cellPart.updateForExecutionState(this.viewCell, e);
				});
			}
		}));

		this._register(this.viewCell.onDidChangeState(e => {
			this.cellParts.forEach(cellPart => {
				cellPart.updateState(this.viewCell, e);
			});

			if (e.outputIsHoveredChanged) {
				this.updateForOutputHover();
			}

			if (e.outputIsFocusedChanged) {
				this.updateForOutputFocus();
			}

			if (e.metadataChanged || e.internalMetadataChanged) {
				this.updateEditorOptions();
			}

			if (e.inputCollapsedChanged || e.outputCollapsedChanged) {
				this.viewCell.pauseLayout();
				const updated = this.updateForCollapseState();
				this.viewCell.resumeLayout();
				if (updated) {
					this.relayoutCell();
				}
			}

			if (e.focusModeChanged) {
				this.updateEditorForFocusModeChange();
			}
		}));

		this.cellParts.forEach(cellPart => cellPart.renderCell(this.viewCell));
		this._register(toDisposable(() => {
			this.cellParts.forEach(cellPart => cellPart.unrenderCell(this.viewCell));
		}));

		this.updateEditorOptions();
		this.updateEditorForFocusModeChange();
		this.updateForOutputHover();
		this.updateForOutputFocus();

		// Render Outputs
		this._outputContainerRenderer.render(editorHeight);
		// Need to do this after the intial renderOutput
		if (this.viewCell.isOutputCollapsed === undefined && this.viewCell.isInputCollapsed === undefined) {
			this.initialViewUpdateExpanded();
			this.viewCell.layoutChange({});
		}

		this._register(this.viewCell.onLayoutInfoRead(() => {
			this.cellParts.forEach(cellPart => cellPart.prepareLayout());
		}));

		const executionItemElement = DOM.append(this.templateData.cellInputCollapsedContainer, DOM.$('.collapsed-execution-icon'));
		this._register(toDisposable(() => {
			executionItemElement.parentElement?.removeChild(executionItemElement);
		}));
		this._collapsedExecutionIcon = this._register(this.instantiationService.createInstance(CollapsedCodeCellExecutionIcon, this.notebookEditor, this.viewCell, executionItemElement));
		this.updateForCollapseState();

		this._register(Event.runAndSubscribe(viewCell.onDidChangeOutputs, this.updateForOutputs.bind(this)));
		this._register(Event.runAndSubscribe(viewCell.onDidChangeLayout, this.updateForLayout.bind(this)));

		this._register(cellEditorOptions.onDidChange(() => templateData.editor.updateOptions(cellEditorOptions.getUpdatedValue(this.viewCell.internalMetadata, this.viewCell.uri))));
		templateData.editor.updateOptions(cellEditorOptions.getUpdatedValue(this.viewCell.internalMetadata, this.viewCell.uri));
		cellEditorOptions.setLineNumbers(this.viewCell.lineNumbers);
	}