private boolean doApplyWithCancel()
			throws CancelledException {

		if (monitor == null) {
			monitor = TaskMonitor.DUMMY;
		}

		if (options.shouldClear(EQUATES)) {
			clearEquates(view);
		}
		if (options.shouldClear(INSTRUCTIONS) || options.shouldClear(DATA)) {
			clearInstructionsAndOrData(view);
		}
		if (options.shouldClear(COMMENTS)) {
			clearComments(view);
		}
		if (options.shouldClear(FUNCTIONS)) {
			clearFunctions(view);
		}
		if (options.shouldClear(SYMBOLS)) {
			clearSymbols(view);
		}
		if (options.shouldClear(PROPERTIES)) {
			clearProperties(view);
		}
		if (options.shouldClear(REGISTERS)) {
			clearRegisters(view);
		}
		if (options.shouldClear(BOOKMARKS)) {
			clearBookmarks(view);
		}

		// if clearing instructions and data, no need to handle references separately
		if (options.shouldClear(INSTRUCTIONS) && options.shouldClear(DATA)) {
			return true;
		}

		Set<SourceType> referenceSourceTypesToClear = options.getReferenceSourceTypesToClear();
		if (!referenceSourceTypesToClear.isEmpty()) {
			clearReferences(view, referenceSourceTypesToClear);
		}
		return true;
	}
Clears over the given range, <b>clearing only code</b>.  To clear other items,
use {@link #ClearCmd(AddressSetView,ClearOptions)}.

@param view the addresses over which to clear
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/clear/ClearCmd.java