[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform] Re: Drag File out a View to Package Explorer


You could check FileTransfer checkFile only accept String array. So, you set data = new String[]{thefilename...} is ok


Andy åé:
I want to drag an item from my View to the Package Explorer as a file. The code below doesn't do the job. Does anyone know how to correct it ?

class MyDragSource implements DragSourceListener
{ .
.
.
public void dragSetData(DragSourceEvent event)
{
if (FileTransfer.getInstance().isSupportedType(event.dataType))
{
event.data = new File("c:\\abc.txt"); } }
}