"text/uri-list;class=java.lang.String");
if (t.isDataFlavorSupported(DataFlavor.javaFileListFlavor))
{
+ Cache.log.debug("Drop handled as javaFileListFlavor");
// Works on Windows and MacOSX
evt.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE);
files = (java.util.List) t
}
else if (t.isDataFlavorSupported(uriListFlavor))
{
+ Cache.log.debug("Drop handled as uriListFlavor");
// This is used by Unix drag system
evt.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE);
String data = (String) t.getTransferData(uriListFlavor);
if (data == null)
{
+ Cache.log.debug("standard URIListFlavor (" + uriListFlavor
+ + ") doesn't resolve. trying others.");
// try 'best' dataflavor
data = (String) t.getTransferData(DataFlavor
.selectBestTextFlavor(t.getTransferDataFlavors()));
+ Cache.log.debug("Dataflavor "
+ + DataFlavor.selectBestTextFlavor(t
+ .getTransferDataFlavors()) + " returned " + data);
}
files = new java.util.ArrayList(1);
for (java.util.StringTokenizer st = new java.util.StringTokenizer(
files.add(file.toString());
}
}
+ if (files.size() < 1)
+ {
+ Cache.log
+ .debug("Couldn't resolve drop data with 'best text'. Here are the supported flavors:");
+ if (data == null && Cache.log.isDebugEnabled())
+ {
+ for (DataFlavor fl : t.getTransferDataFlavors())
+ {
+ Cache.log.debug("Supported transfer dataflavor: "
+ + fl.toString());
+ Object df = t.getTransferData(fl);
+ if (df != null)
+ {
+ Cache.log.debug("Retrieves: " + df);
+ }
+ }
+ }
+ }
}
} catch (Exception e)
{