Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 352690 - [DND] EditorAreaDropAdapter should ignore empty events
Summary: [DND] EditorAreaDropAdapter should ignore empty events
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
: 352814 364878 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-07-20 22:50 EDT by Benjamin Muskalla CLA
Modified: 2019-11-27 07:27 EST (History)
6 users (show)

See Also:


Attachments
patch (965 bytes, patch)
2011-07-20 22:51 EDT, Benjamin Muskalla CLA
no flags Details | Diff
mylyn/context/zip (648 bytes, application/octet-stream)
2011-07-20 22:51 EDT, Benjamin Muskalla CLA
no flags Details
I faced the issue while was working on https://issues.jboss.org/browse/JBIDE-15499. (3.64 KB, patch)
2013-11-11 16:31 EST, Snjezana Peco CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Muskalla CLA 2011-07-20 22:50:13 EDT
EditorAreaDropAdapter should ignore the dropevent in case event.data is null. This can happend if other applications don't provide sufficient or no data at all in their events (eg. drag and drop a url from chromium on Linux).

Related bugs: 
349021: drag and drop does not work with Chrome on Linux
https://bugs.eclipse.org/bugs/show_bug.cgi?id=349021

95105: [DND] DBCS3.3: DBCS named file drag&drop not function
Comment 1 Benjamin Muskalla CLA 2011-07-20 22:51:04 EDT
Created attachment 200045 [details]
patch

.
Comment 2 Benjamin Muskalla CLA 2011-07-20 22:51:05 EDT
Created attachment 200046 [details]
mylyn/context/zip
Comment 3 Dani Megert CLA 2011-07-21 02:57:22 EDT
I agree to protect the code but then we should do it for all potential cases and not just 'null' ==> simply replace the assert with
    if (event.data instanceof String[]) { open editor code }

The bonus question is whether we should log this, as the source app is not behaving correctly. Reporting it could make it easier to detect the issue.
Comment 4 Benjamin Muskalla CLA 2011-07-22 10:27:50 EDT
*** Bug 352814 has been marked as a duplicate of this bug. ***
Comment 5 Benjamin Muskalla CLA 2011-07-22 10:31:46 EDT
About the bonus: I think we should rather let others participate in the dnd operation and delegate the event. But given the current infrastructure, I don't see a clean way to do this. See also comment #2 on bug 349021.
Comment 6 Benjamin Muskalla CLA 2011-12-13 08:27:53 EST
*** Bug 364878 has been marked as a duplicate of this bug. ***
Comment 7 Eric Moffatt CLA 2013-10-21 15:03:26 EDT
Dani, there's already an 'event.data instanceof String[]' there, does that mean that we can close this bug ?
Comment 8 Dani Megert CLA 2013-10-22 08:16:52 EDT
(In reply to Eric Moffatt from comment #7)
> Dani, there's already an 'event.data instanceof String[]' there, does that
> mean that we can close this bug ?

Nope. That code is in an Assert and fails if 'event.data' in 'null' (that's this bug).
Comment 9 Snjezana Peco CLA 2013-11-11 16:31:18 EST
Created attachment 237376 [details]
I faced the issue while was working on https://issues.jboss.org/browse/JBIDE-15499.
Comment 10 Snjezana Peco CLA 2013-11-11 16:38:35 EST
See also https://bugs.eclipse.org/bugs/show_bug.cgi?id=349021#c3
Comment 11 Lars Vogel CLA 2019-11-27 07:27:21 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.