@Override
	protected boolean isEnabledForContext(SymbolTreeActionContext context) {

		LocationReferencesService locationReferencesService =
			tool.getService(LocationReferencesService.class);
		if (locationReferencesService == null) {
			return false;
		}

		TreePath[] selectionPaths = context.getSelectedSymbolTreePaths();
		if (selectionPaths.length != 1) {
			return false;
		}

		Object lastPathComponent = selectionPaths[0].getLastPathComponent();
		if (lastPathComponent instanceof CodeSymbolNode ||
			lastPathComponent instanceof FunctionSymbolNode ||
			lastPathComponent instanceof LibrarySymbolNode ||
			lastPathComponent instanceof LocalVariableSymbolNode ||
			lastPathComponent instanceof ParameterSymbolNode) {
			return true;
		}

		// TODO multi reference type
		// ClassSymbolNode - maybe could be both when classes are real things in Ghidra
		// NamespaceSymbolNode
		// FunctionSymbolNode - could be both

		return false;
	}
We need this when our plugin is loaded before the service we are using
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/symboltree/actions/ShowSymbolReferencesAction.java