@SuppressWarnings("unchecked") 	// our data; cast is OK
	private boolean checkForDrop(DataFlavor[] flavors, Transferable transferable)
			throws UnsupportedFlavorException, IOException {

		for (DataFlavor flavor : flavors) {
			if (flavor.equals(DataTreeDragNDropHandler.localDomainFileFlavor)) {
				Object draggedData =
					transferable.getTransferData(DataTreeDragNDropHandler.localDomainFileFlavor);
				return containsSupportedDataTypes((List<DomainFile>) draggedData);
			}
			else if (flavor.equals(ToolButtonTransferable.localToolButtonFlavor)) {
				Object draggedData =
					transferable.getTransferData(ToolButtonTransferable.localToolButtonFlavor);
				ToolButton draggedButton = (ToolButton) draggedData;
				if (draggedButton != null) {
					if (draggedButton.associatedRunningTool == associatedRunningTool) {
						// tool chest -> tool chest is not allowed (both runningTools are null).
						// runningTool -> same runningTool is not allowed.
						return false;
					}
					return true;
				}
			}
			else if (flavor.equals(VersionInfoTransferable.localVersionInfoFlavor)) {
				return true;
			}
		}
		return false;
	}
Construct a tool label that represents a running tool.
Ghidra/Framework/Project/src/main/java/ghidra/framework/main/ToolButton.java