protected final void search() {
		// Skip if the panel has been disabled (occurs when closing it).
		// Sometimes the delay between searching and the user closing will initiate a search after closing.
		if (isDisabled()) return;

		// Must have a current workspace to search in.
		if (!workspaceManager.hasCurrentWorkspace())
			return;

		// Create a new root.
		Workspace workspace = workspaceManager.getCurrent();
		PathNodeTree tree = liveResults.get() ? liveResultsTree : newTree();
		WorkspaceTreeNode root = new WorkspaceTreeNode(PathNodes.workspacePath(workspace));
		root.setExpanded(true);
		tree.setRoot(root);

		// Cancel last search before we start a new one.
		cancelLastSearch();

		// Skip if the query couldn't be built (invalid inputs most likely)
		Query query = buildQuery();
		if (query == null)
			return;

		// Run new search.
		CancellableSearchFeedback feedback;
		if (liveResults.get()) {
			feedback = new LiveOnlySearchFeedback(result -> {
				WorkspaceTreeNode node = WorkspaceTreeNode.getOrInsertIntoTree(root, result.getPath(), false);
				TreeItems.expandParents(node);
			});
			CompletableFuture.runAsync(() -> searchService.search(workspace, query, feedback));
		} else {
			feedback = new CancellableSearchFeedback();
			CompletableFuture.supplyAsync(() -> searchService.search(workspace, query, feedback))
					.thenAccept(this::handleSearchResults);
		}
		lastSearchFeedback = feedback;
	}
Initiates the search with current search inputs. Updates the output display.
recaf-ui/src/main/java/software/coley/recaf/ui/pane/search/AbstractSearchPane.java