Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Drag and Drop from view to editor
Drag and Drop from view to editor [message #506383] Thu, 07 January 2010 11:22 Go to next message
Florent Metral is currently offline Florent MetralFriend
Messages: 10
Registered: January 2010
Junior Member
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
Re: Drag and Drop from view to editor [message #506409 is a reply to message #506383] Thu, 07 January 2010 13:06 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2427
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Florent,

it looks like a bug. Please file a bugzilla [1] with a small snippet to
reproduce it.

[1] http://eclipse.org/rap/bugs.php

Best,
Ivan

On 1/7/2010 1:22 PM, fmetral@sopragroup.com wrote:
> 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
Re: Drag and Drop from view to editor [message #506419 is a reply to message #506409] Thu, 07 January 2010 13:29 Go to previous message
Florent Metral is currently offline Florent MetralFriend
Messages: 10
Registered: January 2010
Junior Member
Thanks a lot Ivan.
I've filed the bug 299034
Regards,
Florent Métral
Previous Topic:Problem with TableViewer in Column/Table/Browser resizing and scroll bar event.
Next Topic:Design implementation issue [Fancy, Business]
Goto Forum:
  


Current Time: Wed Sep 25 16:27:14 GMT 2024

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

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

Back to the top