Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 285142

Summary: [DND] differing behaviors when dragging files from Eclipse to Trash / Recycle Bin
Product: [Eclipse Project] Platform Reporter: Markus Keller <markus.kell.r>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED WONTFIX QA Contact: Kevin Barnes <cocoakevin>
Severity: normal    
Priority: P3 CC: daniel_megert, eclipse.felipe
Version: 3.6Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug
Bug Depends on: 70810    
Bug Blocks:    

Description Markus Keller CLA 2009-07-30 08:33:12 EDT
HEAD (including released 'new patch' from bug 277454)

SWT's behavior is in different ways odd when I drag files from Eclipse to the Trash (Cocoa) or to the Recycle Bin (Win32). I would expect the same behavior & events on all platforms, or at least behavior that is consistent with the SWT APIs.

On WinXP, is doesn't matter whether I move the file to the Recycle Bin or into an Explorer window that shows the Recycle Bin's content:
Either way, the OS moves the file and SWT sends out the DragEnd event with DND.DROP_NONE.
Expected: SWT.DROP_TARGET_MOVE.

On Cocoa, there are 2 scenarios:

1. User drags file from SWT to Trash icon in the dock:
The OS sends NSDragOperationDelete but does *not* perform any operation. As explained in bug 277454 comment 22, it's the client's job to actually delete the file. But SWT translates this into DND.DROP_TARGET_MOVE, which is wrong. The SWT client should see DND.MOVE, or even better a new DND.DELETE, since files dragged to the trash should ideally end up in the trash and not just be deleted.

2. User drags file from SWT into a Finder window that shows the Trash:
The OS sends NSDragOperationGeneric and moves the file. SWT checks for file existence and translates into DND.DROP_TARGET_MOVE. That's good.
Comment 1 Leo Ufimtsev CLA 2017-08-03 12:26:29 EDT
This is a one-off bulk update. (The last one in the triage migration).

Moving bugs from swt-triaged@eclipse to platform-swt-inbox@eclipse.org and adding "triaged" keyword as per new triage process:
https://wiki.eclipse.org/SWT/Devel/Triage

See Bug 518478 for details.

Tag for notification/mail filters:
@TriageBulkUpdate
Comment 2 Eclipse Genie CLA 2020-06-04 18:25:25 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.