@Override
		public void run(TaskMonitor monitor) throws CancelledException {

			monitor.initialize(selection.getNumAddresses());

			InteriorSelection interiorSelection = selection.getInteriorSelection();
			if (interiorSelection == null) {
				DataIterator definedData = program.getListing().getDefinedData(selection, true);
				while (definedData.hasNext()) {
					monitor.checkCancelled();
					Data d = definedData.next();
					applySettingsToData(dlg, d);
					monitor.incrementProgress(d.getLength());
				}
				return;
			}

			int[] from = interiorSelection.getFrom().getComponentPath();
			int[] to = interiorSelection.getTo().getComponentPath();

			Data dataComp = DataPlugin.getDataUnit(program, selection.getMinAddress(), from);
			if (dataComp == null) {
				return;
			}
			Data parent = dataComp.getParent();
			int fromIndex = from[from.length - 1];
			int toIndex = to[to.length - 1];

			monitor.initialize(toIndex - fromIndex + 1);
			for (int i = fromIndex; i <= toIndex; i++) {
				monitor.checkCancelled();
				dataComp = parent.getComponent(i);
				if (dataComp == null) {
					break;
				}
				monitor.incrementProgress(dataComp.getLength());
				DataType dt = dataComp.getDataType();
				if (dt == DataType.DEFAULT) {
					continue;
				}
				applySettingsToData(dlg, dataComp);
			}
		}
Build an array of SettingsDefinitions which are shared across
all defined data constrained by an address set.

The presence of an instruction will result in the selectionContainsInstruction
flag being set.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/data/DataSettingsDialog.java