@Override
	public boolean isEnabledForContext(ListingActionContext context) {
		if (context.hasSelection() || context.getAddress() == null) {
			return false;
		}
		ProgramLocation loc = context.getLocation();
		Program program = context.getProgram();

		if (!(loc instanceof VariableLocation) && !(loc instanceof VariableCommentFieldLocation)) {
			return false;
		}
		DataType dt = getDataType(program, (FunctionLocation) loc);
		if (dt != null && (dt instanceof Composite) && !(dt instanceof BuiltInDataType)) {
			return true;
		}
		return false;

	}
<CODE>EditStructureAction</CODE> allows the user to edit a structure.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/EditStructureAction.java