src/vs/workbench/contrib/search/browser/searchView.ts/SearchView/open
class SearchView:	async open(element: FileMatchOrMatch, preserveFocus?: boolean, sideBySide?: boolean, pinned?: boolean): Promise<void> {
		const selection = this.getSelectionFrom(element);
		const resource = element instanceof Match ? element.parent().resource : (<FileMatch>element).resource;

		let editor: IEditorPane | undefined;
		try {
			editor = await this.editorService.openEditor({
				resource: resource,
				options: {
					preserveFocus,
					pinned,
					selection,
					revealIfVisible: true
				}
			}, sideBySide ? SIDE_GROUP : ACTIVE_GROUP);

			const editorControl = editor?.getControl();
			if (element instanceof Match && preserveFocus && isCodeEditor(editorControl)) {
				this.viewModel.searchResult.rangeHighlightDecorations.highlightRange(
					editorControl.getModel()!,
					element.range()
				);
			} else {
				this.viewModel.searchResult.rangeHighlightDecorations.removeHighlightRange();
			}
		} catch (err) {
			errors.onUnexpectedError(err);
			return;
		}

		if (editor instanceof NotebookEditor) {
			const controller = editor.getControl()?.getContribution<NotebookFindWidget>(NotebookFindWidget.id);
			const matchIndex = element instanceof Match ? element.parent().matches().findIndex(e => e.id() === element.id()) : undefined;
			controller?.show(this.searchWidget.searchInput.getValue(), { matchIndex, focus: false });
		}
	}