Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 325600 - [CommonNavigator] Exception when dropping non-resource object on editor
Summary: [CommonNavigator] Exception when dropping non-resource object on editor
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-17 10:26 EDT by Christian Georgi CLA
Modified: 2020-06-30 17:49 EDT (History)
4 users (show)

See Also:


Attachments
Exception while dropping (2.61 KB, text/plain)
2010-09-17 10:27 EDT, Christian Georgi CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Georgi CLA 2010-09-17 10:26:42 EDT
Build Identifier: 3.6

Any DnD of a non-resource object from Project Explorer to an editor leads to the exception attached.  EditorAreaDropAdapter detects a ResourceTransfer type but no data.

Reproducible: Always

Steps to Reproduce:
1. Create a Java project
2. In Project Explorer drag the "JRE System Library" tree node to an editor, e.g. a text editor
3. The exception is logged
Comment 1 Christian Georgi CLA 2010-09-17 10:27:29 EDT
Created attachment 179119 [details]
Exception while dropping
Comment 2 Remy Suen CLA 2011-04-07 09:35:02 EDT
Note that when the source is the 'Package Explorer' view, the drop is denied.
Comment 3 Manuel Bork CLA 2011-09-13 08:06:58 EDT
Hi Remy,

no, that's not true for referenced class files (e.g. class files included in the JRE System Library or in other jars contained in the Referenced Libraries container).

When DnD these files from the Package Explorer a Class File Editor is opened. When DnD from the Project Explorer the exception is thrown.

It seems that unpacking the event's data is not possible.
Comment 4 Remy Suen CLA 2011-09-13 08:20:06 EDT
(In reply to comment #3)
> no, that's not true for referenced class files (e.g. class files included in
> the JRE System Library or in other jars contained in the Referenced Libraries
> container).

Manuel, my comment 2 was referring to the drag of the 'JRE System Library' tree node, which Christian mentions in the provided steps of comment 0, not the class files.
Comment 5 Manuel Bork CLA 2011-09-13 09:14:04 EDT
(In reply to comment #4)

> Manuel, my comment 2 was referring to the drag of the 'JRE System Library' tree
> node, which Christian mentions in the provided steps of comment 0, not the
> class files.

Ah, I see. Yes, dropping the JRE System Library is not allowed when using the Package Explorer :).
Comment 6 Paul Webster CLA 2013-09-18 10:39:35 EDT
When dragging the "JRE System Library" or a class from in it from the Project explorer, in Kepler org.eclipse.ui.internal.ide.EditorAreaDropAdapter.asyncDrop(DropTargetEvent, IWorkbenchPage) the event.currentDataType is set to 0 even though the event.dataTypes includes at least 3 (and one of them is the ResourcesTransfer).

So it does nothing in Kepler, no longer assert/fail

PW
Comment 7 Dani Megert CLA 2013-10-14 09:21:57 EDT
(In reply to Paul Webster from comment #6)
> When dragging the "JRE System Library" or a class from in it from the
> Project explorer, in Kepler
> org.eclipse.ui.internal.ide.EditorAreaDropAdapter.asyncDrop(DropTargetEvent,
> IWorkbenchPage) the event.currentDataType is set to 0 even though the
> event.dataTypes includes at least 3 (and one of them is the
> ResourcesTransfer).
> 
> So it does nothing in Kepler, no longer assert/fail
> 
> PW

Yes, it does nothing, even in older versions, but it logs an exception (also in Kepler or 4.4 M3).
Comment 8 Eclipse Genie CLA 2020-06-30 17:49:33 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.