@Override
	protected boolean isEnabledForDecompilerContext(DecompilerActionContext context) {
		Function function = context.getFunction();
		if (function == null || function instanceof UndefinedFunction) {
			return false;
		}

		ClangToken tokenAtCursor = context.getTokenAtCursor();
		if (!(tokenAtCursor instanceof ClangFieldToken)) {
			return false;
		}
		Composite composite = getCompositeDataType(tokenAtCursor);
		return (composite instanceof Union);
	}
An action to force the use of a particular field on the access of a union.
The user selects particular field name token in the decompiler window and is presented
with a list of other possible fields the access can be changed to.
Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/decompile/actions/ForceUnionAction.java