protected boolean doApplyTo(Program program, TaskMonitor taskMonitor)
			throws CancelledException {

		try {
			monitor = taskMonitor;
			monitor.checkCancelled();

			model = createModel(program);
			model.validate();

			// Are there any instructions in the way?
			try {
				if (model.isBlockedByInstructions()) {
					String message =
						"Cannot create data in " + program.getDomainFile().getPathname() +
							" using " + model.getName() + " from " + model.getAddress() + " to " +
							model.getEndAddress() + " since there are instructions in the way.";
					handleErrorMessage(program, model.getAddress(), message);
					return false;
				}
			}
			catch (InvalidDataTypeException e) {
				handleErrorMessage(program, model.getAddress(), e.getMessage());
				return false;
			}

			boolean dataWasCreated = createData();

			boolean success = true;

			// Create markup for the data just created.
			try {
				createMarkup();
			}
			catch (InvalidInputException e) {
				// Catch the exception and output the error, but still should create 
				// associated data if possible, even though markup failed.
				handleErrorMessage(program, name, address, address, e);
				success = false;
			}

			// If data type didn't exist (was created) and following data when applying,
			if (dataWasCreated && applyOptions.shouldFollowData()) {
				// create any data referred to by the data just created
				success = createAssociatedData();
			}
			setStatusMsg(getName() + " completed successfully!");
			return success;
		}
		catch (AddressOutOfBoundsException | CodeUnitInsertionException
				| InvalidDataTypeException e) {
			handleErrorMessage(program, name, address, address, e);
			return false;
		}
	}
Creates the data type for this command and may also create referred to data types. 
Also creates references, symbols, and functions as indicated by the options.
@param program the program where this command will create the data type.
@param taskMonitor a task monitor for cancelling or providing status information while 
creating the data type.
@return true if the data type creation completes successfully.
@throws CancelledException if the user cancels this task.
Ghidra/Features/MicrosoftCodeAnalyzer/src/main/java/ghidra/app/cmd/data/AbstractCreateDataBackgroundCmd.java