@Override
	public void dataTypeRemoved(DataTypeManager dtm, DataTypePath path) {

		if (dtm != originalDTM) {
			throw new AssertException("Listener only supports original DTM");
		}

		if (!isLoaded()) {
			return;
		}

		DataType dataType = viewDTM.getDataType(path);
		if (dataType == null) {
			return;
		}

		if (!path.equals(originalDataTypePath)) {
			if (!viewDTM.isViewDataTypeFromOriginalDTM(dataType)) {
				return;
			}
			if (hasSubDt(viewComposite, path)) {
				String msg = "Removed sub-component data type \"" + path;
				setStatus(msg, true);
			}
			viewDTM.withTransaction("Removed Dependency", () -> {
				viewDTM.clearUndoOnChange();
				viewDTM.remove(dataType);
			});
			fireTableDataChanged();
			componentDataChanged();
			return;
		}

		if (originalCompositeId == DataTypeManager.NULL_DATATYPE_ID) {
			return;
		}

		consideringReplacedDataType = true;
		try {
			provider.show();
			// The user has modified the structure so prompt for whether or
			// not to close the structure.
			String question =
				"The " + getOriginType() + " \"" + originalDTM.getName() + "\" has changed and \n" +
					"\"" + getCompositeName() + "\" no longer exists outside the editor.\n" +
					"Discard edits and close the " + getTypeName() + " editor?";
			String title = "Close " + getTypeName() + " Editor?";
			int response = OptionDialog
					.showYesNoDialogWithNoAsDefaultButton(provider.getComponent(), title, question);
			if (response == OptionDialog.YES_OPTION) {
				provider.closeComponent(true); // Close editor
				return;
			}

			reloadFromView();
		}
		finally {
			consideringReplacedDataType = false;
		}
	}
Returns whether the selected component(s) can be moved down (to the next higher index).
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/compositeeditor/CompEditorModel.java