private Command<Program> createCommand() throws CancelledException {

		Command<Program> cmd = null;
		if (isSignatureChanged() || isCallingConventionChanged() ||
			(function.getSignatureSource() == SourceType.DEFAULT)) {

			FunctionDefinitionDataType definition = parseSignature();
			if (definition == null) {
				return null;
			}
			cmd = new ApplyFunctionSignatureCmd(function.getEntryPoint(), definition,
				SourceType.USER_DEFINED, true, false, DataTypeConflictHandler.DEFAULT_HANDLER,
				FunctionRenameOption.RENAME);
		}

		CompoundCmd<Program> compoundCommand = new CompoundCmd<>("Update Function Signature");

		compoundCommand.add(new Command<Program>() {
			String errMsg = null;

			@Override
			public boolean applyTo(Program p) {
				try {
					String conventionName = getCallingConvention();
					function.setCallingConvention(conventionName);
					return true;
				}
				catch (InvalidInputException e) {
					errMsg = e.getMessage();
					Msg.error(this, "Unexpected Exception: " + e.getMessage(), e);
					return false;
				}
			}

			@Override
			public String getName() {
				return "Update Function Calling Convention";
			}

			@Override
			public String getStatusMsg() {
				return errMsg;
			}
		});
		if (allowInLine) {
			compoundCommand.add(new Command<Program>() {
				@Override
				public boolean applyTo(Program p) {
					function.setInline(isInlineSelected());
					return true;
				}

				@Override
				public String getName() {
					return "Update Function Inline Flag";
				}

				@Override
				public String getStatusMsg() {
					return null;
				}
			});
		}
		if (allowNoReturn) {
			compoundCommand.add(new Command<Program>() {
				@Override
				public boolean applyTo(Program p) {
					function.setNoReturn(hasNoReturnSelected());
					return true;
				}

				@Override
				public String getName() {
					return "Update Function No Return Flag";
				}

				@Override
				public String getStatusMsg() {
					return null;
				}
			});
		}
		if (allowCallFixup) {
			compoundCommand.add(new Command<Program>() {
				@Override
				public boolean applyTo(Program p) {
					function.setCallFixup(getCallFixupSelection());
					return true;
				}

				@Override
				public String getName() {
					return "Update Function Call-Fixup";
				}

				@Override
				public String getStatusMsg() {
					return null;
				}
			});
		}
		if (cmd != null) {
			compoundCommand.add(cmd);
		}
		return compoundCommand;
	}
Called when the user initiates changes that need to be put into a
command and executed.

@return true if the command was successfully created.
@throws CancelledException if operation cancelled by user
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/EditFunctionSignatureDialog.java