Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 267849 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/equinox/internal/p2/ui/dialogs/TextURLDropAdapter.java (-3 / +15 lines)
Lines 11-17 Link Here
11
11
12
package org.eclipse.equinox.internal.p2.ui.dialogs;
12
package org.eclipse.equinox.internal.p2.ui.dialogs;
13
13
14
15
import org.eclipse.swt.dnd.DND;
14
import org.eclipse.swt.dnd.DND;
16
import org.eclipse.swt.dnd.DropTargetEvent;
15
import org.eclipse.swt.dnd.DropTargetEvent;
17
import org.eclipse.swt.widgets.Text;
16
import org.eclipse.swt.widgets.Text;
Lines 29-40 Link Here
29
		this.text = text;
28
		this.text = text;
30
	}
29
	}
31
30
31
	public void dragEnter(DropTargetEvent e) {
32
		if (e.detail == DND.DROP_NONE)
33
			e.detail = DND.DROP_LINK;
34
	}
35
36
	public void dragOperationChanged(DropTargetEvent e) {
37
		if (e.detail == DND.DROP_NONE)
38
			e.detail = DND.DROP_LINK;
39
	}
40
32
	/* (non-Javadoc)
41
	/* (non-Javadoc)
33
	 * @see org.eclipse.equinox.internal.provisional.p2.ui.dialogs.URLDropAdapter#handleURLString(java.lang.String, org.eclipse.swt.dnd.DropTargetEvent)
42
	 * @see org.eclipse.equinox.internal.provisional.p2.ui.dialogs.URLDropAdapter#handleURLString(java.lang.String, org.eclipse.swt.dnd.DropTargetEvent)
34
	 */
43
	 */
35
	protected void handleDrop(String urlText, DropTargetEvent event) {
44
	protected void handleDrop(String urlText, DropTargetEvent event) {
36
		text.setText(urlText);
45
		if (event.data == null) {
37
		event.detail = DND.DROP_LINK;
46
			event.detail = DND.DROP_NONE;
47
			return;
48
		}
49
		text.setText(((String) event.data));
38
	}
50
	}
39
51
40
}
52
}

Return to bug 267849