Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Exception when doing drag-drop into a Texteditor
Exception when doing drag-drop into a Texteditor [message #333816] Wed, 07 January 2009 05:28 Go to next message
Eclipse UserFriend
[I apologise for the duplicate post, but I decided the SWT was probably the
wrong group for this.]

Hi,

I have a plain old TextEditor (org.eclipse.ui.editors.text) that I am using
in a multi-page editor within and RCP application. This is based on Eclipse
3.4 SR1. Drag and drop support is enabled. When I try to drop some text into
the editor I get the first exception below. When dragging text out I get the
second.

I am missing an initialisation step? I have read through the documentation
and Googled, but I find nothing relevant.

Many thhanks,
Joel

java.lang.NullPointerException
at
org.eclipse.ui.internal.EditorSiteDragAndDropServiceImpl$1.d ragLeave(EditorS
iteDragAndDropServiceImpl.java:104)
at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java :70)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1561)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1 360)
at
org.eclipse.swt.dnd.DropTarget.dragTrackingHandler(DropTarge t.java:435)
at
org.eclipse.swt.dnd.DropTarget.DragTrackingHandler(DropTarge t.java:260)
at org.eclipse.swt.internal.carbon.OS.ReceiveNextEvent(Native Method)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3048)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2382)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:21 98)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:488)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)


java.lang.NullPointerException
at
org.eclipse.ui.internal.EditorSiteDragAndDropServiceImpl$1.d ragLeave(EditorS
iteDragAndDropServiceImpl.java:104)
at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java :70)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1561)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1 360)
at
org.eclipse.swt.dnd.DropTarget.dragTrackingHandler(DropTarge t.java:435)
at
org.eclipse.swt.dnd.DropTarget.DragTrackingHandler(DropTarge t.java:251)
at org.eclipse.swt.internal.carbon.OS.TrackDrag(Native Method)
at org.eclipse.swt.dnd.DragSource.drag(DragSource.java:351)
at org.eclipse.swt.dnd.DragSource$1.handleEvent(DragSource.java :166)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1561)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1 360)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3482)
at org.eclipse.swt.widgets.Control.sendTrackEvents(Control.java :3024)
at org.eclipse.swt.widgets.Control.actionProc(Control.java:122)
at org.eclipse.swt.widgets.Display.actionProc(Display.java:362)
at org.eclipse.swt.internal.carbon.OS.CallNextEventHandler(Nati ve
Method)
at org.eclipse.swt.widgets.Widget.kEventControlTrack(Widget.jav a:1106)
at org.eclipse.swt.widgets.Control.kEventControlTrack(Control.j ava:2097)
at org.eclipse.swt.widgets.Widget.controlProc(Widget.java:375)
at org.eclipse.swt.widgets.Display.controlProc(Display.java:862 )
at org.eclipse.swt.internal.carbon.OS.SendEventToEventTarget(Na tive
Method)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3051)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2382)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:21 98)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:488)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)

--
Joel Rosi-Schwartz
Etish Limited [http://www.etish.org]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^...^
/ o,o \ The proud parents of Useme & ORMF
|) ::: (| Open Requirements Management Framework
====w=w==== [http://www.eclipse.org/ormf/]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Re: Exception when doing drag-drop into a Texteditor [message #333829 is a reply to message #333816] Wed, 07 January 2009 16:41 Go to previous messageGo to next message
Eclipse UserFriend
I have made some progress with narrowing this down.

1) In the Eclipse PDE Multi-page editor example the drag-n-drop works fine
in the text editor page.
2) In an RCP application using the standard standalone Texteditor the
drag-n-drop works fine.
3) Adding the MultiPageEditor class from the examaple into the RCP
application creates the problem. It throws the exceptions below.

I can open a bug and add my test plug-in to demonstrate this if this is an
Eclipse RCP bug.

The problem that I have is that I have a delivery date looming and this
functionality is central the application.

Assistance would be very much appreciated.

Many thanks,
Joel


On 07/01/2009 10:28, in article C58A3450.15371%Joel.Rosi-Schwartz@Etish.org,
"Joel Rosi-Schwartz" <Joel.Rosi-Schwartz@Etish.org> wrote:

> [I apologise for the duplicate post, but I decided the SWT was probably the
> wrong group for this.]
>
> Hi,
>
> I have a plain old TextEditor (org.eclipse.ui.editors.text) that I am using
> in a multi-page editor within and RCP application. This is based on Eclipse
> 3.4 SR1. Drag and drop support is enabled. When I try to drop some text into
> the editor I get the first exception below. When dragging text out I get the
> second.
>
> I am missing an initialisation step? I have read through the documentation
> and Googled, but I find nothing relevant.
>
> Many thhanks,
> Joel
>
> java.lang.NullPointerException
> at
> org.eclipse.ui.internal.EditorSiteDragAndDropServiceImpl$1.d ragLeave(EditorS
> iteDragAndDropServiceImpl.java:104)
> at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java :70)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1561)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570)
> at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1 360)
> at
> org.eclipse.swt.dnd.DropTarget.dragTrackingHandler(DropTarge t.java:435)
> at
> org.eclipse.swt.dnd.DropTarget.DragTrackingHandler(DropTarge t.java:260)
> at org.eclipse.swt.internal.carbon.OS.ReceiveNextEvent(Native Method)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3048)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2382)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:21 98)
> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:488)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
>
>
> java.lang.NullPointerException
> at
> org.eclipse.ui.internal.EditorSiteDragAndDropServiceImpl$1.d ragLeave(EditorS
> iteDragAndDropServiceImpl.java:104)
> at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java :70)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1561)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570)
> at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1 360)
> at
> org.eclipse.swt.dnd.DropTarget.dragTrackingHandler(DropTarge t.java:435)
> at
> org.eclipse.swt.dnd.DropTarget.DragTrackingHandler(DropTarge t.java:251)
> at org.eclipse.swt.internal.carbon.OS.TrackDrag(Native Method)
> at org.eclipse.swt.dnd.DragSource.drag(DragSource.java:351)
> at org.eclipse.swt.dnd.DragSource$1.handleEvent(DragSource.java :166)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1561)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570)
> at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1 360)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3482)
> at org.eclipse.swt.widgets.Control.sendTrackEvents(Control.java :3024)
> at org.eclipse.swt.widgets.Control.actionProc(Control.java:122)
> at org.eclipse.swt.widgets.Display.actionProc(Display.java:362)
> at org.eclipse.swt.internal.carbon.OS.CallNextEventHandler(Nati ve
> Method)
> at org.eclipse.swt.widgets.Widget.kEventControlTrack(Widget.jav a:1106)
> at org.eclipse.swt.widgets.Control.kEventControlTrack(Control.j ava:2097)
> at org.eclipse.swt.widgets.Widget.controlProc(Widget.java:375)
> at org.eclipse.swt.widgets.Display.controlProc(Display.java:862 )
> at org.eclipse.swt.internal.carbon.OS.SendEventToEventTarget(Na tive
> Method)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3051)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2382)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:21 98)
> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:488)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)

--
Joel Rosi-Schwartz
Etish Limited [http://www.etish.org]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^...^
/ o,o \ The proud parents of Useme & ORMF
|) ::: (| Open Requirements Management Framework
====w=w==== [http://www.eclipse.org/ormf/]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Re: Exception when doing drag-drop into a Texteditor [message #333831 is a reply to message #333829] Wed, 07 January 2009 16:57 Go to previous messageGo to next message
Eclipse UserFriend
[Sorry I forgot to add RCP into the distribution list].


On 07/01/2009 21:41, in article C58AD218.163BE%Joel.Rosi-Schwartz@Etish.org,
"Joel Rosi-Schwartz" <Joel.Rosi-Schwartz@Etish.org> wrote:


I have made some progress with narrowing this down.

1) In the Eclipse PDE Multi-page editor example the drag-n-drop works fine
in the text editor page.
2) In an RCP application using the standard standalone Texteditor the
drag-n-drop works fine.
3) Adding the MultiPageEditor class from the examaple into the RCP
application creates the problem. It throws the exceptions below.

I can open a bug and add my test plug-in to demonstrate this if this is an
Eclipse RCP bug.

The problem that I have is that I have a delivery date looming and this
functionality is central the application.

Assistance would be very much appreciated.

Many thanks,
Joel


> On 07/01/2009 10:28, in article C58A3450.15371%Joel.Rosi-Schwartz@Etish.org,
> "Joel Rosi-Schwartz" <Joel.Rosi-Schwartz@Etish.org> wrote:
>
>> [I apologise for the duplicate post, but I decided the SWT was probably the
>> wrong group for this.]
>>
>> Hi,
>>
>> I have a plain old TextEditor (org.eclipse.ui.editors.text) that I am using
>> in a multi-page editor within and RCP application. This is based on Eclipse
>> 3.4 SR1. Drag and drop support is enabled. When I try to drop some text into
>> the editor I get the first exception below. When dragging text out I get the
>> second.
>>
>> I am missing an initialisation step? I have read through the documentation
>> and Googled, but I find nothing relevant.
>>
>> Many thhanks,
>> Joel
>>
>> java.lang.NullPointerException
>> at
>> org.eclipse.ui.internal.EditorSiteDragAndDropServiceImpl$1.d ragLeave(EditorS
>> iteDragAndDropServiceImpl.java:104)
>> at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java :70)
>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1561)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570)
>> at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1 360)
>> at
>> org.eclipse.swt.dnd.DropTarget.dragTrackingHandler(DropTarge t.java:435)
>> at
>> org.eclipse.swt.dnd.DropTarget.DragTrackingHandler(DropTarge t.java:260)
>> at org.eclipse.swt.internal.carbon.OS.ReceiveNextEvent(Native Method)
>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3048)
>> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2382)
>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
>> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:21 98)
>> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
>> at
>> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
>> at
>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:488)
>> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
>>
>>
>> java.lang.NullPointerException
>> at
>> org.eclipse.ui.internal.EditorSiteDragAndDropServiceImpl$1.d ragLeave(EditorS
>> iteDragAndDropServiceImpl.java:104)
>> at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java :70)
>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1561)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570)
>> at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1 360)
>> at
>> org.eclipse.swt.dnd.DropTarget.dragTrackingHandler(DropTarge t.java:435)
>> at
>> org.eclipse.swt.dnd.DropTarget.DragTrackingHandler(DropTarge t.java:251)
>> at org.eclipse.swt.internal.carbon.OS.TrackDrag(Native Method)
>> at org.eclipse.swt.dnd.DragSource.drag(DragSource.java:351)
>> at org.eclipse.swt.dnd.DragSource$1.handleEvent(DragSource.java :166)
>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1561)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570)
>> at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1 360)
>> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3482)
>> at org.eclipse.swt.widgets.Control.sendTrackEvents(Control.java :3024)
>> at org.eclipse.swt.widgets.Control.actionProc(Control.java:122)
>> at org.eclipse.swt.widgets.Display.actionProc(Display.java:362)
>> at org.eclipse.swt.internal.carbon.OS.CallNextEventHandler(Nati ve
>> Method)
>> at org.eclipse.swt.widgets.Widget.kEventControlTrack(Widget.jav a:1106)
>> at org.eclipse.swt.widgets.Control.kEventControlTrack(Control.j ava:2097)
>> at org.eclipse.swt.widgets.Widget.controlProc(Widget.java:375)
>> at org.eclipse.swt.widgets.Display.controlProc(Display.java:862 )
>> at org.eclipse.swt.internal.carbon.OS.SendEventToEventTarget(Na tive
>> Method)
>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3051)
>> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2382)
>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
>> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:21 98)
>> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
>> at
>> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
>> at
>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:488)
>> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)

--
Joel Rosi-Schwartz
Etish Limited [http://www.etish.org]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^...^
/ o,o \ The proud parents of Useme & ORMF
|) ::: (| Open Requirements Management Framework
====w=w==== [http://www.eclipse.org/ormf/]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Re: Exception when doing drag-drop into a Texteditor [message #333844 is a reply to message #333829] Thu, 08 January 2009 13:37 Go to previous messageGo to next message
Eclipse UserFriend
Would you be able to file a bug against Platform UI with an attached example
plugin to reproduce?

Boris

"Joel Rosi-Schwartz" <Joel.Rosi-Schwartz@Etish.org> wrote in message
news:C58AD218.163BE%Joel.Rosi-Schwartz@Etish.org...
>
> I have made some progress with narrowing this down.
>
> 1) In the Eclipse PDE Multi-page editor example the drag-n-drop works
> fine
> in the text editor page.
> 2) In an RCP application using the standard standalone Texteditor the
> drag-n-drop works fine.
> 3) Adding the MultiPageEditor class from the examaple into the RCP
> application creates the problem. It throws the exceptions below.
>
> I can open a bug and add my test plug-in to demonstrate this if this is an
> Eclipse RCP bug.
>
> The problem that I have is that I have a delivery date looming and this
> functionality is central the application.
>
> Assistance would be very much appreciated.
>
> Many thanks,
> Joel
>
>
> On 07/01/2009 10:28, in article
> C58A3450.15371%Joel.Rosi-Schwartz@Etish.org,
> "Joel Rosi-Schwartz" <Joel.Rosi-Schwartz@Etish.org> wrote:
>
>> [I apologise for the duplicate post, but I decided the SWT was probably
>> the
>> wrong group for this.]
>>
>> Hi,
>>
>> I have a plain old TextEditor (org.eclipse.ui.editors.text) that I am
>> using
>> in a multi-page editor within and RCP application. This is based on
>> Eclipse
>> 3.4 SR1. Drag and drop support is enabled. When I try to drop some text
>> into
>> the editor I get the first exception below. When dragging text out I get
>> the
>> second.
>>
>> I am missing an initialisation step? I have read through the
>> documentation
>> and Googled, but I find nothing relevant.
>>
>> Many thhanks,
>> Joel
>>
>> java.lang.NullPointerException
>> at
>> org.eclipse.ui.internal.EditorSiteDragAndDropServiceImpl$1.d ragLeave(EditorS
>> iteDragAndDropServiceImpl.java:104)
>> at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java :70)
>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1561)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570)
>> at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1 360)
>> at
>> org.eclipse.swt.dnd.DropTarget.dragTrackingHandler(DropTarge t.java:435)
>> at
>> org.eclipse.swt.dnd.DropTarget.DragTrackingHandler(DropTarge t.java:260)
>> at org.eclipse.swt.internal.carbon.OS.ReceiveNextEvent(Native Method)
>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3048)
>> at
>> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2382)
>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
>> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:21 98)
>> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
>> at
>> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
>> at
>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:488)
>> at
>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
>>
>>
>> java.lang.NullPointerException
>> at
>> org.eclipse.ui.internal.EditorSiteDragAndDropServiceImpl$1.d ragLeave(EditorS
>> iteDragAndDropServiceImpl.java:104)
>> at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java :70)
>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1561)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570)
>> at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1 360)
>> at
>> org.eclipse.swt.dnd.DropTarget.dragTrackingHandler(DropTarge t.java:435)
>> at
>> org.eclipse.swt.dnd.DropTarget.DragTrackingHandler(DropTarge t.java:251)
>> at org.eclipse.swt.internal.carbon.OS.TrackDrag(Native Method)
>> at org.eclipse.swt.dnd.DragSource.drag(DragSource.java:351)
>> at org.eclipse.swt.dnd.DragSource$1.handleEvent(DragSource.java :166)
>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1561)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570)
>> at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1 360)
>> at
>> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3482)
>> at org.eclipse.swt.widgets.Control.sendTrackEvents(Control.java :3024)
>> at org.eclipse.swt.widgets.Control.actionProc(Control.java:122)
>> at org.eclipse.swt.widgets.Display.actionProc(Display.java:362)
>> at org.eclipse.swt.internal.carbon.OS.CallNextEventHandler(Nati ve
>> Method)
>> at
>> org.eclipse.swt.widgets.Widget.kEventControlTrack(Widget.jav a:1106)
>> at
>> org.eclipse.swt.widgets.Control.kEventControlTrack(Control.j ava:2097)
>> at org.eclipse.swt.widgets.Widget.controlProc(Widget.java:375)
>> at org.eclipse.swt.widgets.Display.controlProc(Display.java:862 )
>> at org.eclipse.swt.internal.carbon.OS.SendEventToEventTarget(Na tive
>> Method)
>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3051)
>> at
>> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2382)
>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
>> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:21 98)
>> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
>> at
>> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
>> at
>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:488)
>> at
>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
>
> --
> Joel Rosi-Schwartz
> Etish Limited [http://www.etish.org]
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ^...^
> / o,o \ The proud parents of Useme & ORMF
> |) ::: (| Open Requirements Management Framework
> ====w=w==== [http://www.eclipse.org/ormf/]
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
Re: Exception when doing drag-drop into a Texteditor [message #333851 is a reply to message #333831] Fri, 09 January 2009 07:50 Go to previous messageGo to next message
Eclipse UserFriend
I have diagnosed the cause of the problem. Adding the org.eclipse.ui.editors
bundle into an RCP application prevents the Texteditor from functioning
properly in regards to DND.

A workaround is to add the following to ApplicationWorkbenchWindowAdvisor

public void preWindowOpen() {

IWorkbenchWindowConfigurer configurer = getWindowConfigurer();


...

configurer.configureEditorAreaDropListener(
new EditorAreaDropAdapter(
configurer.getWindow()));

}

I will file a bug report over the weekend and add a link to in this thread.

Joel

On 07/01/2009 21:57, in article C58AD5E6.169A1%Joel.Rosi-Schwartz@Etish.org,
"Joel Rosi-Schwartz" <Joel.Rosi-Schwartz@Etish.org> wrote:

> [Sorry I forgot to add RCP into the distribution list].
>
>
> On 07/01/2009 21:41, in article C58AD218.163BE%Joel.Rosi-Schwartz@Etish.org,
> "Joel Rosi-Schwartz" <Joel.Rosi-Schwartz@Etish.org> wrote:
>
>
> I have made some progress with narrowing this down.
>
> 1) In the Eclipse PDE Multi-page editor example the drag-n-drop works fine
> in the text editor page.
> 2) In an RCP application using the standard standalone Texteditor the
> drag-n-drop works fine.
> 3) Adding the MultiPageEditor class from the examaple into the RCP
> application creates the problem. It throws the exceptions below.
>
> I can open a bug and add my test plug-in to demonstrate this if this is an
> Eclipse RCP bug.
>
> The problem that I have is that I have a delivery date looming and this
> functionality is central the application.
>
> Assistance would be very much appreciated.
>
> Many thanks,
> Joel
>
>
>> On 07/01/2009 10:28, in article C58A3450.15371%Joel.Rosi-Schwartz@Etish.org,
>> "Joel Rosi-Schwartz" <Joel.Rosi-Schwartz@Etish.org> wrote:
>>
>>> [I apologise for the duplicate post, but I decided the SWT was probably the
>>> wrong group for this.]
>>>
>>> Hi,
>>>
>>> I have a plain old TextEditor (org.eclipse.ui.editors.text) that I am using
>>> in a multi-page editor within and RCP application. This is based on Eclipse
>>> 3.4 SR1. Drag and drop support is enabled. When I try to drop some text into
>>> the editor I get the first exception below. When dragging text out I get the
>>> second.
>>>
>>> I am missing an initialisation step? I have read through the documentation
>>> and Googled, but I find nothing relevant.
>>>
>>> Many thhanks,
>>> Joel
>>>
>>> java.lang.NullPointerException
>>> at
>>> org.eclipse.ui.internal.EditorSiteDragAndDropServiceImpl$1.d ragLeave(EditorS
>>> iteDragAndDropServiceImpl.java:104)
>>> at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java :70)
>>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1561)
>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585)
>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570)
>>> at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1 360)
>>> at
>>> org.eclipse.swt.dnd.DropTarget.dragTrackingHandler(DropTarge t.java:435)
>>> at
>>> org.eclipse.swt.dnd.DropTarget.DragTrackingHandler(DropTarge t.java:260)
>>> at org.eclipse.swt.internal.carbon.OS.ReceiveNextEvent(Native Method)
>>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3048)
>>> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2382)
>>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
>>> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:21 98)
>>> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
>>> at
>>> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
>>> at
>>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:488)
>>> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
>>>
>>>
>>> java.lang.NullPointerException
>>> at
>>> org.eclipse.ui.internal.EditorSiteDragAndDropServiceImpl$1.d ragLeave(EditorS
>>> iteDragAndDropServiceImpl.java:104)
>>> at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java :70)
>>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1561)
>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585)
>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570)
>>> at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1 360)
>>> at
>>> org.eclipse.swt.dnd.DropTarget.dragTrackingHandler(DropTarge t.java:435)
>>> at
>>> org.eclipse.swt.dnd.DropTarget.DragTrackingHandler(DropTarge t.java:251)
>>> at org.eclipse.swt.internal.carbon.OS.TrackDrag(Native Method)
>>> at org.eclipse.swt.dnd.DragSource.drag(DragSource.java:351)
>>> at org.eclipse.swt.dnd.DragSource$1.handleEvent(DragSource.java :166)
>>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1561)
>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585)
>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570)
>>> at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1 360)
>>> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3482)
>>> at org.eclipse.swt.widgets.Control.sendTrackEvents(Control.java :3024)
>>> at org.eclipse.swt.widgets.Control.actionProc(Control.java:122)
>>> at org.eclipse.swt.widgets.Display.actionProc(Display.java:362)
>>> at org.eclipse.swt.internal.carbon.OS.CallNextEventHandler(Nati ve
>>> Method)
>>> at org.eclipse.swt.widgets.Widget.kEventControlTrack(Widget.jav a:1106)
>>> at org.eclipse.swt.widgets.Control.kEventControlTrack(Control.j ava:2097)
>>> at org.eclipse.swt.widgets.Widget.controlProc(Widget.java:375)
>>> at org.eclipse.swt.widgets.Display.controlProc(Display.java:862 )
>>> at org.eclipse.swt.internal.carbon.OS.SendEventToEventTarget(Na tive
>>> Method)
>>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3051)
>>> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2382)
>>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
>>> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:21 98)
>>> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
>>> at
>>> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
>>> at
>>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:488)
>>> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)

--
Joel Rosi-Schwartz
Etish Limited [http://www.etish.org]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^...^
/ o,o \ The proud parents of Useme & ORMF
|) ::: (| Open Requirements Management Framework
====w=w==== [http://www.eclipse.org/ormf/]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Re: Exception when doing drag-drop into a Texteditor [message #333855 is a reply to message #333844] Fri, 09 January 2009 11:52 Go to previous message
Eclipse UserFriend
Yes, I will do it over the weekend and post the Bug # back to the newsgroup.

Joel


On 08/01/2009 18:37, in article gk5h5d$jgc$1@build.eclipse.org, "Boris
Bokowski" <Boris_Bokowski@ca.ibm.com> wrote:

> Would you be able to file a bug against Platform UI with an attached example
> plugin to reproduce?
>
> Boris
>
> "Joel Rosi-Schwartz" <Joel.Rosi-Schwartz@Etish.org> wrote in message
> news:C58AD218.163BE%Joel.Rosi-Schwartz@Etish.org...
>>
>> I have made some progress with narrowing this down.
>>
>> 1) In the Eclipse PDE Multi-page editor example the drag-n-drop works
>> fine
>> in the text editor page.
>> 2) In an RCP application using the standard standalone Texteditor the
>> drag-n-drop works fine.
>> 3) Adding the MultiPageEditor class from the examaple into the RCP
>> application creates the problem. It throws the exceptions below.
>>
>> I can open a bug and add my test plug-in to demonstrate this if this is an
>> Eclipse RCP bug.
>>
>> The problem that I have is that I have a delivery date looming and this
>> functionality is central the application.
>>
>> Assistance would be very much appreciated.
>>
>> Many thanks,
>> Joel
>>
>>
>> On 07/01/2009 10:28, in article
>> C58A3450.15371%Joel.Rosi-Schwartz@Etish.org,
>> "Joel Rosi-Schwartz" <Joel.Rosi-Schwartz@Etish.org> wrote:
>>
>>> [I apologise for the duplicate post, but I decided the SWT was probably
>>> the
>>> wrong group for this.]
>>>
>>> Hi,
>>>
>>> I have a plain old TextEditor (org.eclipse.ui.editors.text) that I am
>>> using
>>> in a multi-page editor within and RCP application. This is based on
>>> Eclipse
>>> 3.4 SR1. Drag and drop support is enabled. When I try to drop some text
>>> into
>>> the editor I get the first exception below. When dragging text out I get
>>> the
>>> second.
>>>
>>> I am missing an initialisation step? I have read through the
>>> documentation
>>> and Googled, but I find nothing relevant.
>>>
>>> Many thhanks,
>>> Joel
>>>
>>> java.lang.NullPointerException
>>> at
>>> org.eclipse.ui.internal.EditorSiteDragAndDropServiceImpl$1.d ragLeave(EditorS
>>> iteDragAndDropServiceImpl.java:104)
>>> at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java :70)
>>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1561)
>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585)
>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570)
>>> at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1 360)
>>> at
>>> org.eclipse.swt.dnd.DropTarget.dragTrackingHandler(DropTarge t.java:435)
>>> at
>>> org.eclipse.swt.dnd.DropTarget.DragTrackingHandler(DropTarge t.java:260)
>>> at org.eclipse.swt.internal.carbon.OS.ReceiveNextEvent(Native Method)
>>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3048)
>>> at
>>> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2382)
>>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
>>> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:21 98)
>>> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
>>> at
>>> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
>>> at
>>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:488)
>>> at
>>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
>>>
>>>
>>> java.lang.NullPointerException
>>> at
>>> org.eclipse.ui.internal.EditorSiteDragAndDropServiceImpl$1.d ragLeave(EditorS
>>> iteDragAndDropServiceImpl.java:104)
>>> at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java :70)
>>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1561)
>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585)
>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570)
>>> at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1 360)
>>> at
>>> org.eclipse.swt.dnd.DropTarget.dragTrackingHandler(DropTarge t.java:435)
>>> at
>>> org.eclipse.swt.dnd.DropTarget.DragTrackingHandler(DropTarge t.java:251)
>>> at org.eclipse.swt.internal.carbon.OS.TrackDrag(Native Method)
>>> at org.eclipse.swt.dnd.DragSource.drag(DragSource.java:351)
>>> at org.eclipse.swt.dnd.DragSource$1.handleEvent(DragSource.java :166)
>>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1561)
>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585)
>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570)
>>> at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1 360)
>>> at
>>> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3482)
>>> at org.eclipse.swt.widgets.Control.sendTrackEvents(Control.java :3024)
>>> at org.eclipse.swt.widgets.Control.actionProc(Control.java:122)
>>> at org.eclipse.swt.widgets.Display.actionProc(Display.java:362)
>>> at org.eclipse.swt.internal.carbon.OS.CallNextEventHandler(Nati ve
>>> Method)
>>> at
>>> org.eclipse.swt.widgets.Widget.kEventControlTrack(Widget.jav a:1106)
>>> at
>>> org.eclipse.swt.widgets.Control.kEventControlTrack(Control.j ava:2097)
>>> at org.eclipse.swt.widgets.Widget.controlProc(Widget.java:375)
>>> at org.eclipse.swt.widgets.Display.controlProc(Display.java:862 )
>>> at org.eclipse.swt.internal.carbon.OS.SendEventToEventTarget(Na tive
>>> Method)
>>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3051)
>>> at
>>> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2382)
>>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
>>> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:21 98)
>>> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
>>> at
>>> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
>>> at
>>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:488)
>>> at
>>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
>>
>> --
>> Joel Rosi-Schwartz
>> Etish Limited [http://www.etish.org]
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> ^...^
>> / o,o \ The proud parents of Useme & ORMF
>> |) ::: (| Open Requirements Management Framework
>> ====w=w==== [http://www.eclipse.org/ormf/]
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>>
>
>

--
Joel Rosi-Schwartz
Etish Limited [http://www.etish.org]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^...^
/ o,o \ The proud parents of Useme & ORMF
|) ::: (| Open Requirements Management Framework
====w=w==== [http://www.eclipse.org/ormf/]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Previous Topic:object contribution action and key shortcut ...
Next Topic:How do I add toolbar actions to a specific ContentOutline page
Goto Forum:
  


Current Time: Thu May 01 08:14:46 EDT 2025

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

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

Back to the top