Drag and Drop from view to editor [message #506383] |
Thu, 07 January 2010 06:22  |
Eclipse User |
|
|
|
Hi all,
I'm doing a POC to convert an existing RCP application to RAP.
The drag and drop feature works well when I drag elements from a view and drop some to an other view but it doesn't work when I drop them to an editor.
The code responsible of drop is the same in the view and the editor.
Table t = new Table(parent, SWT.NONE);
TableViewer tViewer = new TableViewer(t);
tViewer.addDropSupport(DND.DROP_MOVE | DND.DROP_COPY, new Transfer[] { ObjectTransfer.getInstance() }, new DefaultDropTargetListener());
And I get the following exception:
java.lang.ArrayIndexOutOfBoundsException: 0
at org.eclipse.swt.internal.widgets.displaykit.DNDSupport.proce ssDragEnter(DNDSupport.java:161)
at org.eclipse.swt.internal.widgets.displaykit.DNDSupport.acces s$3(DNDSupport.java:147)
at org.eclipse.swt.internal.widgets.displaykit.DNDSupport$1.run (DNDSupport.java:119)
at org.eclipse.rwt.lifecycle.ProcessActionRunner.executeNext(Pr ocessActionRunner.java:57)
at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.readAndDispa tch(RWTLifeCycle.java:238)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :982)
I'm using eclipse 3.6M3 and RAP 1.3M4.
Has somebody tried to drag and drop elements from view to editor?
Do you have any idea about my bug?
Thanks in advance
Florent Métral
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03281 seconds