Drag & Drop not working on Windows [message #209721] |
Tue, 28 October 2008 14:44 |
Eclipse User |
|
|
|
Originally posted by: knakov.scopeset.de
Hi,
On my linux box I can successfully drag an item from the project
explorer to the canvas. But on windows the
DragDropEditPolicy.getDropObjectsCommand() is not invoked at all. What
could be the reason?
Cheers,
Kalin
|
|
|
Re: Drag & Drop not working on Windows [message #209728 is a reply to message #209721] |
Tue, 28 October 2008 15:12 |
Eclipse User |
|
|
|
Originally posted by: knakov.scopeset.de
I have traced this exception:
java.lang.ClassCastException: org.eclipse.jface.viewers.TreeSelection
cannot be cast to org.eclipse.emf.ecore.EObject
at
org.eclipse.gmf.runtime.diagram.ui.editpolicies.DiagramDragD ropEditPolicy.getDropObjectsCommand(DiagramDragDropEditPolic y.java:78)
at
org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEdit Policy.getCommand(DragDropEditPolicy.java:80)
at
org.eclipse.gef.editparts.AbstractEditPart.getCommand(Abstra ctEditPart.java:473)
This problem appears on windows only.
Kalin Nakov wrote:
> Hi,
>
> On my linux box I can successfully drag an item from the project
> explorer to the canvas. But on windows the
> DragDropEditPolicy.getDropObjectsCommand() is not invoked at all. What
> could be the reason?
>
> Cheers,
> Kalin
|
|
|
|
Re: Drag & Drop not working on Windows [message #209812 is a reply to message #209765] |
Wed, 29 October 2008 07:25 |
Eclipse User |
|
|
|
Originally posted by: knakov.scopeset.de
Hi,
Yes, could be the same issue. The problem occurs only when dragging an
item from a domain model. Dragging files works fine. The reason is that
the drag&drop operation does not fill in the objects being dragged. I
have solved the issue both on windows and on linux by adding a new drop
target listener to the diagram editor, filling-in the content in
getObjectsBeingDropped() using
LocalSelectionTransfer.getTransfer().getSelection() and converting the
selection to EObjects using getAdapter().
Cheers,
Kalin
Alex Shatalin wrote:
> Hello Kalin,
>
> Is it something like: https://bugs.eclipse.org/bugs/show_bug.cgi?id=249718?
>
> -----------------
> Alex Shatalin
>
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.05560 seconds