if (cdn != null && cdn.allowsNodeAddition())
{
Transferable transferable = ClipboardMgr.getInstance().getCurrentEntry();
if (transferable != null)
{
CollectionDescriptor cd = cdn.getCollectionDescriptor();
Class elementClass = cd.getSafeTypeClass();
DataFlavor elementFlavor = new DataFlavor(elementClass, elementClass.getName());
canPaste = transferable.isDataFlavorSupported(elementFlavor);
}
}
actions [ACTION_INDEX_PASTE].setEnabled(canPaste);