Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 357551 - [dnd] Folder/package dragging onto editor area should be disallowed
Summary: [dnd] Folder/package dragging onto editor area should be disallowed
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-13 15:52 EDT by Remy Suen CLA
Modified: 2019-11-14 03:51 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Remy Suen CLA 2011-09-13 15:52:44 EDT
I20110809-0800

I can drag packages onto the editor area from the 'Package Explorer' view although it seems to do nothing. If the drop will not do anything it should simply be disallowed.
Comment 1 Raksha Vasisht CLA 2011-09-16 07:40:29 EDT
Moving to Platform -UI as the problem lies there.

Also does not work for folders in Navigator. The problem is in the listener

org.eclipse.ui.internal.ide.EditorAreaDropAdapter.dragEnter(...)
 which always sets the event.detail = DND.DROP_COPY;, hence we see the '+' as soon as we drag any element onto the editor area.

There needs to be a check for the event.currentDataType to be one of the supported types in the dragEnter(..) and dragOver(..) as it already exists in the org.eclipse.ui.internal.ide.EditorAreaDropAdapter.asyncDrop(...) but the problem is that event.data is still not set at this point and is only set on 'drop' in 

org.eclipse.jdt.internal.ui.dnd.ResourceTransferDragAdapter.dragSetData(...)
Comment 2 Raksha Vasisht CLA 2011-09-16 07:50:08 EDT
(In reply to comment #1)
 Pl also see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=74724#c4
Comment 3 Markus Keller CLA 2011-09-16 08:15:12 EDT
Yeah, bug 74724 comment 4 and the Javadoc of org.eclipse.swt.dnd.DropTargetListener#dragEnter(DropTargetEvent) indicate that this may not be solvable in all cases, since the dragged items are only available during the drop operation.
Comment 4 Lars Vogel CLA 2019-11-14 03:51:27 EST
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.

If you have further information on the current state of the bug, please add it. 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.

If the bug is still relevant, please remove the "stalebug" whiteboard tag.