Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Drag & Drop not working on Windows
Drag & Drop not working on Windows [message #209721] Tue, 28 October 2008 14:44 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 #209765 is a reply to message #209728] Tue, 28 October 2008 17:11 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Kalin,

Is it something like: https://bugs.eclipse.org/bugs/show_bug.cgi?id=249718?

-----------------
Alex Shatalin
Re: Drag & Drop not working on Windows [message #209812 is a reply to message #209765] Wed, 29 October 2008 07:25 Go to previous messageGo to next message
Eclipse UserFriend
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
>
>
Re: Drag & Drop not working on Windows [message #209825 is a reply to message #209812] Wed, 29 October 2008 09:36 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Kalin,

What is the difference between your DropTargetListener and one generated
by GMF? (you can see example of GMF-generated DropTargetListener in ecore
diagram editor - org.eclipse.gmf.ecore.part.EcoreDiagramEditor.DropTargetList ener
class.

-----------------
Alex Shatalin
Previous Topic:Customize Figures and Layouts
Next Topic:how I customize my Outline View
Goto Forum:
  


Current Time: Sat Apr 20 03:51:31 GMT 2024

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

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

Back to the top