@Override
	public void actionPerformed(ListingActionContext context) {
		Program program = context.getProgram();
		FunctionLocation loc = (FunctionLocation) context.getLocation();
		DataType dt = getDataType(program, loc);
		if (dt instanceof Composite) {
			plugin.getDataTypeManagerService().edit(dt);
		}
	}
<CODE>EditStructureAction</CODE> allows the user to edit a structure.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/EditStructureAction.java