private void dataTypeManagerChanged(DataTypeManager dtm) {

		if (lastPreviewNode == null || !(lastPreviewNode instanceof DataTypeNode)) {
			return;
		}

		DataTypeNode dtNode = (DataTypeNode) lastPreviewNode;
		DataType dt = dtNode.getDataType();
		DataTypeManager dtManager = dt.getDataTypeManager();

		// note: compare using name; an equality check will fail if the manager is reloaded
		if (dtm.getName().equals(dtManager.getName())) {
			lastPreviewNode = null;
		}
	}
Returns a list of all the data types selected in the data types tree
@return a list of all the data types selected in the data types tree
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/DataTypesProvider.java