@Override
	public boolean isEnabledForContext(ActionContext actionContext) {
		if (!(actionContext.getContextObject() instanceof ListingActionContext)) {
			return false;
		}

		ListingActionContext context = (ListingActionContext) actionContext.getContextObject();
		if (context.hasSelection()) {
			return false;
		}

		ProgramLocation location = context.getLocation();
		if (plugin.isValidDataLocation(location)) {
			return true;
		}
		if (location instanceof VariableLocation) {
			return true;
		}
		return false;
	}
An action that allows the user to change or select a data type.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/ChooseDataTypeAction.java