Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 197965

Summary: [DND] Allow ViewerDropAdapter to set the default operation
Product: [Eclipse Project] Platform Reporter: Benno Baumgartner <benno.baumgartner>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, tom.schindl
Version: 3.3Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug
Attachments:
Description Flags
fix
none
fix
none
fix none

Description Benno Baumgartner CLA 2007-07-26 09:59:05 EDT
I20070724-0800

This is a fup of Bug 101993

I try to adopt ViewerDropAdapter in JDT but it lacks an important feature: it is not possible to set the default operation using the ViewerDropAdapter. This is important for us because we change the drop affordance to copy/link even if the copy/link modifier key was not pressed by the user. We do this if a move is not possible (i.e. drop a type into the Type Hierarchy). This is much better then showing the 'no-park' sign and let the user find out, that he has to press a modifier key.

I will attach a patch. I guess this will better explain what I mean;-)
Comment 1 Benno Baumgartner CLA 2007-07-26 10:00:38 EDT
Created attachment 74689 [details]
fix

None breaking API change in ViewerDropAdapter
Comment 2 Eric Moffatt CLA 2007-07-26 13:52:08 EDT
The whole DnD story is going to get some scrutiny during 3.4...including upgrades to at least the ViewDropAdapter. I'm working with STW to ensure that I have the infrastructure to, for example, allow -discreet- additions to the drop handling to take place (i.e. letting me at least create a proper delegating adapter with perhaps some of the work done by SWT).
Comment 3 Dani Megert CLA 2007-07-30 03:24:22 EDT
I see. JDT UI just went through its code to get rid of copied classes. The attached patch would allow us to finish that work no matter what you guys plan to do with 3.4. Did you look at the patch? Is something wrong with it? You could still add the usual disclaimer that the API is provisional until 3.4 API freeze.
Comment 4 Benno Baumgartner CLA 2007-07-30 04:02:59 EDT
Created attachment 74905 [details]
fix

Better method name and better javadoc.
Comment 5 Benno Baumgartner CLA 2007-07-30 04:10:23 EDT
Erich, I'm in the process of bringing JDTs DnD support up-to-date. I'm therefor very interested in the changes SWT/Platform are going to make in 3.4. Let me know if I can help/early adopt. For the moment the proposed patch is what I would need because I want to have as much code as possible in the platform, for obvious reasons. Would it be possible to review/release this patch? Thanks
Comment 6 Benno Baumgartner CLA 2007-07-30 11:39:01 EDT
There is also a bug in ViewerDropAdapter:
The line
currentLocation = determineLocation(event);
should be added to dragEnter, before doDropValidation
otherwise getCurrentLocation can return 0 when called in the drop validation code, which is not a valid value. 
Comment 7 Benno Baumgartner CLA 2007-08-15 03:23:56 EDT
Created attachment 76108 [details]
fix

Newest patch containing the bug fix and the drag sources supported operations are now passed into determineOperation. See Bug 199023 for the reason.
Comment 8 Eric Moffatt CLA 2007-09-28 14:56:34 EDT
Thanks Benno, this is one of the first areas that I'll be attacking (since it involves API changes).
Comment 9 Eclipse Webmaster CLA 2019-09-06 15:32:55 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.

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.
Comment 10 Eclipse Webmaster CLA 2019-09-06 15:36:30 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.

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.
Comment 11 Eclipse Genie CLA 2021-12-09 17:58:29 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. 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.