void doSetFunction(Function function) {
		if (function == null) {
			return;
		}

		if (currentProgram == null) {
			// This can happen when we were created to lock onto one location and then the program
			// for that location was closed.  Then, the user pressed the button to track location
			// changes, which means we will get here while setting the location, but our program
			// will have been null'ed out.
			currentProgram = plugin.getCurrentProgram();
			currentProgram.addListener(domainObjectListener);
		}

		if (function.equals(currentFunction)) {
			return;
		}

		currentFunction = function;
		updateUiForFunction(function);
	}
A variable used to restrict open-ended operations, like expanding all nodes or filtering.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/calltree/CallTreeProvider.java