Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Project Explorer Drop problem
Project Explorer Drop problem [message #333371] Sat, 06 December 2008 08:23 Go to next message
Keshavrao  is currently offline Keshavrao Friend
Messages: 34
Registered: July 2009
Member
Hi,

I am facing a very strange behaviour during the drop on project
explorer. I have registered a dropassistant with only one
possibleDropTarget as the project node, and I am using a
SingleSelectionTransfer during the drag from some another tree.
I accept the drop in validateDrop method if its DND.DROP_MOVE.

When i drag an object first on the project node the status is shown
properly and i am able to drop the object properly. But if i first move my
dragged object on some other node e.g. folder then i am not allowed to
drop which is OK because i havent defined IFolder in possibleDropTargets,
but now if slowly move my dragged object to the project node then it
doesnt allow me to drop though its one of my possibleDropTargets. Then
when i move the dragged object out of ProjectExplorer and again take it to
the project node at the enter only this works again.

I have also debugged this and i found that the issue lies in
ViewerDropAdapter.doDropValidation(DropTargetEvent event) method which is
below

private void doDropValidation(DropTargetEvent event) {
//update last valid operation
if (event.detail != DND.DROP_NONE) {
lastValidOperation = event.detail;
}
//valid drop and set event detail accordingly
if (validateDrop(currentTarget, event.detail,
event.currentDataType)) {
currentOperation = lastValidOperation;
} else {
currentOperation = DND.DROP_NONE;
}
event.detail = currentOperation;
}

here in the second if statement if the validateDrop is false then the
event.detail is set to DND.DROP_NONE, and this is never reset when i move
from the folder nodes to the project node.

the control to above method is reached from
CommonDropAdapter.dragEnter - line::super.dragEnter(event) ->
ViewerDropAdapter.dragEnter - line::doDropValidation(event)

Thanks and regards,
Keshav Veerapaneni.
Re: Project Explorer Drop problem [message #333533 is a reply to message #333371] Tue, 16 December 2008 21:16 Go to previous messageGo to next message
Francis Upton IV is currently offline Francis Upton IVFriend
Messages: 472
Registered: July 2009
Location: Oakland, CA
Senior Member
Please file a bug about this:

https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform

Select the UI component and put [CommonNavigator] first in the subject line.

Thanks!
Francis

Keshavrao wrote:
> Hi,
>
> I am facing a very strange behaviour during the drop on project
> explorer. I have registered a dropassistant with only one
> possibleDropTarget as the project node, and I am using a
> SingleSelectionTransfer during the drag from some another tree.
> I accept the drop in validateDrop method if its DND.DROP_MOVE.
>
> When i drag an object first on the project node the status is shown
> properly and i am able to drop the object properly. But if i first move
> my dragged object on some other node e.g. folder then i am not allowed
> to drop which is OK because i havent defined IFolder in
> possibleDropTargets, but now if slowly move my dragged object to the
> project node then it doesnt allow me to drop though its one of my
> possibleDropTargets. Then when i move the dragged object out of
> ProjectExplorer and again take it to the project node at the enter only
> this works again.
>
> I have also debugged this and i found that the issue lies in
> ViewerDropAdapter.doDropValidation(DropTargetEvent event) method which
> is below
> private void doDropValidation(DropTargetEvent event) {
> //update last valid operation
> if (event.detail != DND.DROP_NONE) {
> lastValidOperation = event.detail;
> }
> //valid drop and set event detail accordingly
> if (validateDrop(currentTarget, event.detail,
> event.currentDataType)) {
> currentOperation = lastValidOperation;
> } else {
> currentOperation = DND.DROP_NONE;
> }
> event.detail = currentOperation;
> }
>
> here in the second if statement if the validateDrop is false then the
> event.detail is set to DND.DROP_NONE, and this is never reset when i
> move from the folder nodes to the project node.
>
> the control to above method is reached from
> CommonDropAdapter.dragEnter - line::super.dragEnter(event) ->
> ViewerDropAdapter.dragEnter - line::doDropValidation(event)
>
> Thanks and regards,
> Keshav Veerapaneni.
>
>
>
>
>


--
*new* Common Navigator Framework section in:
3.4RC4 Platform Plugin Developer Guide (Programmer's Guide)
http://help.eclipse.org/ganymede/topic/org.eclipse.platform. doc.isv/guide/cnf.htm
http://dev.eclipse.org/blogs/francis
http://wiki.eclipse.org/Common_Navigator_Framework
http://wiki.eclipse.org/Common_Navigator_Framework_Use_Cases


You have brains in your head.
You have feet in your shoes.
- Dr Seuss, Oh the Places You'll Go


Re: Project Explorer Drop problem [message #333600 is a reply to message #333533] Thu, 18 December 2008 10:05 Go to previous message
Keshavrao  is currently offline Keshavrao Friend
Messages: 34
Registered: July 2009
Member
Hello Francis,

I have already created this.

Please find below the link for the same -


https://bugs.eclipse.org/bugs/show_bug.cgi?id=258017

Thanks and regards,
Keshav Veerapaneni.
Previous Topic:suppress warnings about @SuppressWarnings("PMD")
Next Topic:Error not displayed in the console (Mac OS X Leopard)
Goto Forum:
  


Current Time: Fri Apr 26 02:55:04 GMT 2024

Powered by FUDForum. Page generated in 1.23357 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top