[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools.gef] Re: Drag & Drop in GEF
|
Please open a bug report.
"Sami Lakka" <sami.lakka@xxxxxx> wrote in message
news:dilq8i$4qi$1@xxxxxxxxxxxxxxxxxxx
> The following code in the article :
>
> getGraphicalViewer().addDropTargetListener(
> new FileTransferDropTargetListener(getGraphicalViewer()));should be
> replaced with:
>
> getGraphicalViewer().addDropTargetListener(
> new
>
FileTransferDropTargetListener(getGraphicalViewer(),FileTransfer.getInstance
()));
>
>
>
> "Sami Lakka" <sami.lakka@xxxxxx> kirjoitti
> viestissä:dij5tn$rnk$1@xxxxxxxxxxxxxxxxxxx
> > Hello,
> >
> > I'm trying to implement D&D functionality from package explorer to my
GEF
> > diagram. I'm following the article in :
> > http://www.eclipse.org/articles/Article-GEF-dnd/GEF-dnd.html and somehow
> > I'm getting following exception when I'm dragging a file from package
> > explorer to the diagram:
> >
> > java.lang.NullPointerException
> > at org.eclipse.swt.dnd.DropTarget.setEventData(DropTarget.java:628)
> > at org.eclipse.swt.dnd.DropTarget.DragEnter(DropTarget.java:253)
> > at org.eclipse.swt.dnd.DropTarget.access$4(DropTarget.java:247)
> > at org.eclipse.swt.dnd.DropTarget$3.method3(DropTarget.java:233)
> > at
> >
org.eclipse.swt.internal.ole.win32.COMObject.callback3(COMObject.java:90)
> > at org.eclipse.swt.internal.ole.win32.COM.DoDragDrop(Native Method)
> > at org.eclipse.swt.dnd.DragSource.drag(DragSource.java:277)
> > at org.eclipse.swt.dnd.DragSource.access$0(DragSource.java:267)
> > at org.eclipse.swt.dnd.DragSource$1.handleEvent(DragSource.java:161)
> > at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
> > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
> > at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3080)
> > at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2713)
> > at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699)
> > at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
> > at
> >
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367)
> > at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
> > at
org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103)
> > at
> >
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.
java:226)
> > at
> >
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
> > at
> >
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
> >
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
> > at
> >
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
> > at java.lang.reflect.Method.invoke(Method.java:324)
> > at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334)
> > at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
> > at org.eclipse.core.launcher.Main.run(Main.java:973)
> > at org.eclipse.core.launcher.Main.main(Main.java:948)
> >
> > This exception comes immeaditely when the mouse enters the diagram area.
> > What is going wrong?
> >
> >
> > Best Regards,
> > - Sami
> >
>
>