@Override
	public void actionPerformed(ActionContext context) {
		ProgramLocation location = null;
		Program program = null;
		if (context instanceof DecompilerActionContext) {
			DecompilerActionContext decompilerActionContext = (DecompilerActionContext) context;
			if (decompilerActionContext.isDecompiling()) {
				Msg.showInfo(getClass(), context.getComponentProvider().getComponent(),
					"Decompiler Action Blocked",
					"You cannot perform Decompiler actions while the Decompiler is busy");
				return;
			}

			location = decompilerActionContext.getLocation();
			program = decompilerActionContext.getProgram();
		}
		else if (context instanceof ListingActionContext) {
			ListingActionContext listingContext = (ListingActionContext) context;
			// get the data type at the location and see if it is OK
			// make sure what we are over can be mapped to decompiler
			// param, local, etc...

			location = listingContext.getLocation();
			program = listingContext.getProgram();
		}
		else {
			return;
		}

		DecompileOptions decompileOptions = DecompilerUtils.getDecompileOptions(tool, program);
		FillOutStructureCmd cmd = new FillOutStructureCmd(location, decompileOptions);
		tool.executeBackgroundCommand(cmd, program);
	}
Change the menu text for the create/fill structure action based on the current
data type at the location and whether the location is for a "this" parameter.
@param dt the current data type.
@param isThisParam true indicates the data type is for a "this" parameter.
Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/decompile/actions/CreateStructureVariableAction.java