problem pasting resources from clipboard [message #699912] |
Fri, 22 July 2011 11:09  |
Eclipse User |
|
|
|
Hi,
I do this:
clipboard = new Clipboard(HandlerUtil.getActivePart(event).getSite().getShell().getDisplay());
IResource[] resourceArray = (IResource[]) resources.toArray(new IResource[resources.size()]);
clipboard.setContents(resourceArray, new Transfer[] {ResourceTransfer.getInstance()});
Which works a treat (event is an ExecutionEvent passed in from the command handler)
But when I then do:
IResource[] resources = (IResource[])clipboard.getContents(ResourceTransfer.getInstance());
resources comes back as null!
If I breakpoint on 'getContents' I can see the clipboard data contains a file resource - as I would expect, but it isn't returned from getContents.
Any help would be awesome, thanks.
Ta,
Mark.
|
|
|
|
Powered by
FUDForum. Page generated in 0.20874 seconds