Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 358407 - Clarify Javadoc for DND#DROP_MOVE
Summary: Clarify Javadoc for DND#DROP_MOVE
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.8   Edit
Hardware: All All
: P3 trivial (vote)
Target Milestone: 4.4 M4   Edit
Assignee: Markus Keller CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 408523
  Show dependency tree
 
Reported: 2011-09-21 08:39 EDT by Markus Keller CLA
Modified: 2013-12-05 13:48 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2011-09-21 08:39:05 EDT
Follow-up to bug 30543 et al.

The Javadoc for DND#DROP_MOVE should tell explicitly who is responsible for which actions (similar to DROP_TARGET_MOVE).

Here's my suggestion, which also includes a very important warning about potential data loss:

/**
 * Drag and Drop Operation: a copy of the data is added to the drop target and 
 * the drag source removes the original data and any references to the data,
 * and updates its display (value is 1 << 1).
 * <p>
 * <b>Warning:</b> Some applications (most notably the Mozilla suite) return
 * {@link DND#DROP_MOVE} even if they just open the file and don't copy
 * anything, see
 * <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=30543">bug 30543</a>.
 * To avoid data loss, you may want to not remove the original data
 * when you handle a {@link DND#DragEnd} for a {@link FileTransfer} whose
 * {@link org.eclipse.swt.widgets.Event#detail} is {@link #DROP_MOVE}. 
 * </p>
 */
public final static int DROP_MOVE = 1 << 1;
Comment 1 Markus Keller CLA 2013-05-28 13:46:39 EDT
The Javadoc needs to spell out Firefox, Thunderbird, and Safari as being broken (this was just verified again in bug 408523).