private AddressSet getDataRanges(AddressRange range) {
		AddressSet addresses = new AddressSet();
		Listing listing = program.getListing();
		Address end = range.getMaxAddress();

		for (Data data : listing.getDefinedData(range.getMinAddress(), true)) {
			if (data.getMinAddress().compareTo(end) > 0) {
				break;
			}
			addresses.add(data.getMinAddress(), data.getMaxAddress());
		}
		return addresses;
	}
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