Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-dev] Clipboard: understand late-cut

Hi Rolf,

Sorry, I don't understand how this answers my question. The normal text copy-paste I understand. I also understand how to retrieve the copied file paths (FileTransfer), but how to find out whether an application has cut or copied it? For drag and drop operations this information is stored in the DropTargetEvent.detail, but the Clipboard does not have this information. Neither a listener is missing to tell the process which puts the file into the clipboard that it was pasted.

--
Best regards,
Thomas Singer


On 2021-01-26 19:35, Rolf Theunissen wrote:
Hi Thomas,

The copy-past behavior is implemented with the drag-and-drop API of SWT.
Specifically, the Clipboard and FileTransfer are of interest for the
copy-pasting of files.
Have a look at this article as a starter:
https://www.eclipse.org/articles/Article-SWT-DND/DND-in-SWT.html#_Using_the_Clipboard

Best Regards,
Rolf

Op di 26 jan. 2021 om 11:29 schreef Thomas Singer <ts-swt@xxxxxxxxxxx>:

Hi,

For text everything works as expected. Cutting a text immediately
removes it from the text control (it is stored in the clipboard) and on
paste it will be inserted.

But I'm trying to understand how to handle a typical file manager
workflow: a user selects a file in the Windows Explorer, invokes Cut
(Ctrl+X) and in an SWT-based application pastes the file. How can the
SWT-based application find out whether the file was cut or copied?

--
Best regards,
Thomas Singer
_______________________________________________
platform-dev mailing list
platform-dev@xxxxxxxxxxx
To unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/platform-dev



_______________________________________________
platform-dev mailing list
platform-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/platform-dev



Back to the top