src/vs/workbench/contrib/notebook/browser/contrib/find/findController.ts/NotebookFindWidget/replaceAll
class NotebookFindWidget:	protected replaceAll() {
		if (!this._notebookEditor.hasModel()) {
			return;
		}

		this._progressBar.infinite().show(PROGRESS_BAR_DELAY);

		const replacePattern = this.replacePattern;

		const cellFindMatches = this._findModel.findMatches;
		const replaceStrings: string[] = [];
		cellFindMatches.forEach(cellFindMatch => {
			const findMatches = cellFindMatch.matches;
			findMatches.forEach((findMatch, index) => {
				if (index < cellFindMatch.modelMatchCount) {
					const match = findMatch as FindMatch;
					const matches = match.matches;
					replaceStrings.push(replacePattern.buildReplaceString(matches, this._state.preserveCase));
				}
			});
		});

		const viewModel = this._notebookEditor._getViewModel();
		viewModel.replaceAll(this._findModel.findMatches, replaceStrings).then(() => {
			this._progressBar.stop();
		});
	}