Skip to main content



      Home
Home » Eclipse Projects » GEF » DnD: UI freezes when after drop
DnD: UI freezes when after drop [message #95128] Tue, 23 September 2003 17:47 Go to next message
Eclipse UserFriend
Originally posted by: dlemmermann.rcn.com

Hi there,

I have a problem with drag and drop in GEF. I am just getting started on GEF
and I managed to create a graphical viewer with some edit parts and figures
inside of it. All I am trying to do now is add a drop listener to the viewer
and print out some message that tells me that a drop has occurred.
Unfortunately I don't even get this to work. After dragging a file (or
anything else) from the Navigator to the editor the UI just hangs and I need
to kill the runtime workbench process in order to continue working. My code
is nothing more than this:

protected void initializeGraphicalViewer() {
GraphicalViewer viewer = getGraphicalViewer();
viewer.setContents(myModel); // PSEUDO
viewer.addDropTargetListener(new MyDropListener(viewer));
}

class MyDropListener extends AbstractTransferDropListener {
public MyDropListener(GraphicalViewer viewer) {
super(viewer);
}

protected void updateTargetRequest() {
System.out.println("Updating request....");
}
}

Am I missing something? Any help much appreciated.....

Dirk

P.S.: the main thread seems to be hanging in a native method call to
COM.DoDragDrop. All other threads are either in sleep() or in wait().
Re: UI freezes when after drop [message #95143 is a reply to message #95128] Tue, 23 September 2003 21:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Which version of Eclpise/SWT are you using?

"Dirk Lemmermann" <dlemmermann@rcn.com> wrote in message
news:BB968C1B.1645%dlemmermann@rcn.com...
> Hi there,
>
> I have a problem with drag and drop in GEF. I am just getting started on
GEF
> and I managed to create a graphical viewer with some edit parts and
figures
> inside of it. All I am trying to do now is add a drop listener to the
viewer
> and print out some message that tells me that a drop has occurred.
> Unfortunately I don't even get this to work. After dragging a file (or
> anything else) from the Navigator to the editor the UI just hangs and I
need
> to kill the runtime workbench process in order to continue working. My
code
> is nothing more than this:
>
> protected void initializeGraphicalViewer() {
> GraphicalViewer viewer = getGraphicalViewer();
> viewer.setContents(myModel); // PSEUDO
> viewer.addDropTargetListener(new MyDropListener(viewer));
> }
>
> class MyDropListener extends AbstractTransferDropListener {
> public MyDropListener(GraphicalViewer viewer) {
> super(viewer);
> }
>
> protected void updateTargetRequest() {
> System.out.println("Updating request....");
> }
> }
>
> Am I missing something? Any help much appreciated.....
>
> Dirk
>
> P.S.: the main thread seems to be hanging in a native method call to
> COM.DoDragDrop. All other threads are either in sleep() or in wait().
>
>
>
Re: UI freezes when after drop [message #95233 is a reply to message #95143] Wed, 24 September 2003 13:24 Go to previous messageGo to next message
Eclipse UserFriend
Yes, version information would help, I guess :-) .... Sorry about that!

Eclipse 2.1.1
SWT 2.1.1
GEF 2.1.1

Dirk




On 9/24/03 3:46 AM, in article bkqsvc$g1a$1@eclipse.org, "Randy Hudson"
<none@us.ibm.com> wrote:

> Which version of Eclpise/SWT are you using?
>
> "Dirk Lemmermann" <dlemmermann@rcn.com> wrote in message
> news:BB968C1B.1645%dlemmermann@rcn.com...
>> Hi there,
>>
>> I have a problem with drag and drop in GEF. I am just getting started on
> GEF
>> and I managed to create a graphical viewer with some edit parts and
> figures
>> inside of it. All I am trying to do now is add a drop listener to the
> viewer
>> and print out some message that tells me that a drop has occurred.
>> Unfortunately I don't even get this to work. After dragging a file (or
>> anything else) from the Navigator to the editor the UI just hangs and I
> need
>> to kill the runtime workbench process in order to continue working. My
> code
>> is nothing more than this:
>>
>> protected void initializeGraphicalViewer() {
>> GraphicalViewer viewer = getGraphicalViewer();
>> viewer.setContents(myModel); // PSEUDO
>> viewer.addDropTargetListener(new MyDropListener(viewer));
>> }
>>
>> class MyDropListener extends AbstractTransferDropListener {
>> public MyDropListener(GraphicalViewer viewer) {
>> super(viewer);
>> }
>>
>> protected void updateTargetRequest() {
>> System.out.println("Updating request....");
>> }
>> }
>>
>> Am I missing something? Any help much appreciated.....
>>
>> Dirk
>>
>> P.S.: the main thread seems to be hanging in a native method call to
>> COM.DoDragDrop. All other threads are either in sleep() or in wait().
>>
>>
>>
>
>
Re: UI freezes when after drop [message #95289 is a reply to message #95233] Wed, 24 September 2003 16:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Actually, I was hoping you were using something less stable, like 3.0. We
have not seen this problem before. Are any plugins being activated during
the DND process?

Can you open a bugzilla with steps to reproduce. Platform/window manager is
also important info.

"Dirk Lemmermann" <dirk@dlsc.com> wrote in message
news:BB979FD9.18BB%dirk@dlsc.com...
> Yes, version information would help, I guess :-) .... Sorry about that!
>
> Eclipse 2.1.1
> SWT 2.1.1
> GEF 2.1.1
>
> Dirk
>
>
>
>
> On 9/24/03 3:46 AM, in article bkqsvc$g1a$1@eclipse.org, "Randy Hudson"
> <none@us.ibm.com> wrote:
>
> > Which version of Eclpise/SWT are you using?
> >
> > "Dirk Lemmermann" <dlemmermann@rcn.com> wrote in message
> > news:BB968C1B.1645%dlemmermann@rcn.com...
> >> Hi there,
> >>
> >> I have a problem with drag and drop in GEF. I am just getting started
on
> > GEF
> >> and I managed to create a graphical viewer with some edit parts and
> > figures
> >> inside of it. All I am trying to do now is add a drop listener to the
> > viewer
> >> and print out some message that tells me that a drop has occurred.
> >> Unfortunately I don't even get this to work. After dragging a file (or
> >> anything else) from the Navigator to the editor the UI just hangs and I
> > need
> >> to kill the runtime workbench process in order to continue working. My
> > code
> >> is nothing more than this:
> >>
> >> protected void initializeGraphicalViewer() {
> >> GraphicalViewer viewer = getGraphicalViewer();
> >> viewer.setContents(myModel); // PSEUDO
> >> viewer.addDropTargetListener(new MyDropListener(viewer));
> >> }
> >>
> >> class MyDropListener extends AbstractTransferDropListener {
> >> public MyDropListener(GraphicalViewer viewer) {
> >> super(viewer);
> >> }
> >>
> >> protected void updateTargetRequest() {
> >> System.out.println("Updating request....");
> >> }
> >> }
> >>
> >> Am I missing something? Any help much appreciated.....
> >>
> >> Dirk
> >>
> >> P.S.: the main thread seems to be hanging in a native method call to
> >> COM.DoDragDrop. All other threads are either in sleep() or in wait().
> >>
> >>
> >>
> >
> >
>
Re: UI freezes when after drop [message #95303 is a reply to message #95289] Wed, 24 September 2003 16:51 Go to previous messageGo to next message
Eclipse UserFriend
How can I find out which plugins get activated? I tried activating the
GEF.debug methods but it doesn't even get to the point where those debug
infos get printed.

I'll invest this problem a little bit more. I don't think that I can provide
any meaningful input to bugzilla (at this point in time) that would allow
you to recreate this problem.

I'll be back!

Dirk



On 9/24/03 10:19 PM, in article bksu6b$g62$1@eclipse.org, "Randy Hudson"
<none@us.ibm.com> wrote:

> Actually, I was hoping you were using something less stable, like 3.0. We
> have not seen this problem before. Are any plugins being activated during
> the DND process?
>
> Can you open a bugzilla with steps to reproduce. Platform/window manager is
> also important info.
>
> "Dirk Lemmermann" <dirk@dlsc.com> wrote in message
> news:BB979FD9.18BB%dirk@dlsc.com...
>> Yes, version information would help, I guess :-) .... Sorry about that!
>>
>> Eclipse 2.1.1
>> SWT 2.1.1
>> GEF 2.1.1
>>
>> Dirk
>>
>>
>>
>>
>> On 9/24/03 3:46 AM, in article bkqsvc$g1a$1@eclipse.org, "Randy Hudson"
>> <none@us.ibm.com> wrote:
>>
>>> Which version of Eclpise/SWT are you using?
>>>
>>> "Dirk Lemmermann" <dlemmermann@rcn.com> wrote in message
>>> news:BB968C1B.1645%dlemmermann@rcn.com...
>>>> Hi there,
>>>>
>>>> I have a problem with drag and drop in GEF. I am just getting started
> on
>>> GEF
>>>> and I managed to create a graphical viewer with some edit parts and
>>> figures
>>>> inside of it. All I am trying to do now is add a drop listener to the
>>> viewer
>>>> and print out some message that tells me that a drop has occurred.
>>>> Unfortunately I don't even get this to work. After dragging a file (or
>>>> anything else) from the Navigator to the editor the UI just hangs and I
>>> need
>>>> to kill the runtime workbench process in order to continue working. My
>>> code
>>>> is nothing more than this:
>>>>
>>>> protected void initializeGraphicalViewer() {
>>>> GraphicalViewer viewer = getGraphicalViewer();
>>>> viewer.setContents(myModel); // PSEUDO
>>>> viewer.addDropTargetListener(new MyDropListener(viewer));
>>>> }
>>>>
>>>> class MyDropListener extends AbstractTransferDropListener {
>>>> public MyDropListener(GraphicalViewer viewer) {
>>>> super(viewer);
>>>> }
>>>>
>>>> protected void updateTargetRequest() {
>>>> System.out.println("Updating request....");
>>>> }
>>>> }
>>>>
>>>> Am I missing something? Any help much appreciated.....
>>>>
>>>> Dirk
>>>>
>>>> P.S.: the main thread seems to be hanging in a native method call to
>>>> COM.DoDragDrop. All other threads are either in sleep() or in wait().
>>>>
>>>>
>>>>
>>>
>>>
>>
>
>
Re: DnD: UI freezes when after drop [message #95348 is a reply to message #95128] Thu, 25 September 2003 03:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: andreas.rummler.tu-ilmenau.de

Dirk Lemmermann schrieb:

> Unfortunately I don't even get this to work. After dragging a file (or
> anything else) from the Navigator to the editor the UI just hangs and I need
> to kill the runtime workbench process in order to continue working. My code

I'm not sure, if my problem is really related, but ...

I've got a quite similiar situation. Dragging from my own view to
a GraphicalEditor will not only hang the main thread, but crash the
whole VM.
The error message looks like this:

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x77B13E23
Function=DllDebugObjectRPCHook+0x421
Library=C:\WINNT\system32\ole32.dll


Regards,

Andreas


P.S. I'm still at Version 2.1.0 ...


--
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++
+ Andreas Rummler +
+ Technical University of Ilmenau, Germany (__) +
+ Department Of Electronic Circuits & Systems (oo) +
+ \/-------\ +
+ MAIL: mailto:arummler@acm.org || | \ +
+ MAIL: mailto:andreas.rummler@tu-ilmenau.de ||----|| * +
+ WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ +
+ PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs and the universe trying
to produce bigger and better idiots. So far, the universe is winning."
Richard Cook
Re: DnD: UI freezes when after drop [message #95377 is a reply to message #95348] Thu, 25 September 2003 04:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: andreas.rummler.tu-ilmenau.de

Andreas Rummler schrieb:

> I've got a quite similiar situation. Dragging from my own view to
> a GraphicalEditor will not only hang the main thread, but crash the
> whole VM.

I have prepared a small plugin to reproduce the problem, you can
get it at http://www.evolvica.org/dragdrop.zip

Instructions: Create a file with the extension .drag - an editor will
open. Now open the "Drag Drop View" from "Show View"-Menu, Category Other.
Drag one of the items from the View to the Editor and the whole VM
will hang and (after 15 seconds) crash.

The plugin "works" with Eclipse/GEF 2.1.0 and 2.1.1. I'm using JDK 1.4.1
(build 1.4.1_03-b02) under Win2K SP 4.

Regards,

Andreas


--
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++
+ Andreas Rummler +
+ Technical University of Ilmenau, Germany (__) +
+ Department Of Electronic Circuits & Systems (oo) +
+ \/-------\ +
+ MAIL: mailto:arummler@acm.org || | \ +
+ MAIL: mailto:andreas.rummler@tu-ilmenau.de ||----|| * +
+ WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ +
+ PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs and the universe trying
to produce bigger and better idiots. So far, the universe is winning."
Richard Cook
Re: DnD: UI freezes when after drop [message #95422 is a reply to message #95377] Thu, 25 September 2003 11:05 Go to previous messageGo to next message
Eclipse UserFriend
You never set the Transfer on your OperatorDropTargetListener. This is
required. I just changed the javadoc on
AbstractTransferDropTargetListener(EditPartViewer) to clearly state that
if you use that constructor, you must set the transfer yourself using
setTransfer(Transfer).

Andreas Rummler wrote:
> Andreas Rummler schrieb:
>
>> I've got a quite similiar situation. Dragging from my own view to
>> a GraphicalEditor will not only hang the main thread, but crash the
>> whole VM.
>
>
> I have prepared a small plugin to reproduce the problem, you can
> get it at http://www.evolvica.org/dragdrop.zip
>
> Instructions: Create a file with the extension .drag - an editor will
> open. Now open the "Drag Drop View" from "Show View"-Menu, Category Other.
> Drag one of the items from the View to the Editor and the whole VM
> will hang and (after 15 seconds) crash.
>
> The plugin "works" with Eclipse/GEF 2.1.0 and 2.1.1. I'm using JDK 1.4.1
> (build 1.4.1_03-b02) under Win2K SP 4.
>
> Regards,
>
> Andreas
>
>
Re: DnD: UI freezes when after drop [message #95437 is a reply to message #95128] Thu, 25 September 2003 11:12 Go to previous messageGo to next message
Eclipse UserFriend
You seem to have the same problem as Andreas. You must set the Transfer
on your listener (either by implementing and calling the constructor
with a Transfer parameter, or explicitly calling setTransfer(Transfer)
after creating the listener).

Dirk Lemmermann wrote:

> Hi there,
>
> I have a problem with drag and drop in GEF. I am just getting started on GEF
> and I managed to create a graphical viewer with some edit parts and figures
> inside of it. All I am trying to do now is add a drop listener to the viewer
> and print out some message that tells me that a drop has occurred.
> Unfortunately I don't even get this to work. After dragging a file (or
> anything else) from the Navigator to the editor the UI just hangs and I need
> to kill the runtime workbench process in order to continue working. My code
> is nothing more than this:
>
> protected void initializeGraphicalViewer() {
> GraphicalViewer viewer = getGraphicalViewer();
> viewer.setContents(myModel); // PSEUDO
> viewer.addDropTargetListener(new MyDropListener(viewer));
> }
>
> class MyDropListener extends AbstractTransferDropListener {
> public MyDropListener(GraphicalViewer viewer) {
> super(viewer);
> }
>
> protected void updateTargetRequest() {
> System.out.println("Updating request....");
> }
> }
>
> Am I missing something? Any help much appreciated.....
>
> Dirk
>
> P.S.: the main thread seems to be hanging in a native method call to
> COM.DoDragDrop. All other threads are either in sleep() or in wait().
>
>
>
Re: DnD: UI freezes when after drop [message #95449 is a reply to message #95422] Thu, 25 September 2003 11:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: andreas.rummler.tu-ilmenau.de

Eric Bordeau schrieb:

> You never set the Transfer on your OperatorDropTargetListener. This is
> required. I just changed the javadoc on
> AbstractTransferDropTargetListener(EditPartViewer) to clearly state that
> if you use that constructor, you must set the transfer yourself using
> setTransfer(Transfer).

Thank you for that hint, Eric. But one question is still open for me:
In which category does that error/bug fall?

1.) User (bad use)
2.) SWT/GEF
3.) Java/VM

A mistake made by the user (in this case myself) should NEVER cause
the VM to crash.

Andreas


--
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++
+ Andreas Rummler +
+ Technical University of Ilmenau, Germany (__) +
+ Department Of Electronic Circuits & Systems (oo) +
+ \/-------\ +
+ MAIL: mailto:arummler@acm.org || | \ +
+ MAIL: mailto:andreas.rummler@tu-ilmenau.de ||----|| * +
+ WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ +
+ PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs and the universe trying
to produce bigger and better idiots. So far, the universe is winning."
Richard Cook
Re: DnD: UI freezes when after drop [message #95494 is a reply to message #95449] Thu, 25 September 2003 17:48 Go to previous messageGo to next message
Eclipse UserFriend
From what I've found, this could be construed as jointly SWT and GEF's
fault. I'm looking into it. I'll let you know.

Eric


Andreas Rummler wrote:

> Eric Bordeau schrieb:
>
>> You never set the Transfer on your OperatorDropTargetListener. This
>> is required. I just changed the javadoc on
>> AbstractTransferDropTargetListener(EditPartViewer) to clearly state
>> that if you use that constructor, you must set the transfer yourself
>> using setTransfer(Transfer).
>
>
> Thank you for that hint, Eric. But one question is still open for me:
> In which category does that error/bug fall?
>
> 1.) User (bad use)
> 2.) SWT/GEF
> 3.) Java/VM
>
> A mistake made by the user (in this case myself) should NEVER cause
> the VM to crash.
>
> Andreas
>
>
Re: DnD: UI freezes when after drop [message #95509 is a reply to message #95128] Fri, 26 September 2003 10:57 Go to previous message
Eclipse UserFriend
I opened a bug for this:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=43746


Dirk Lemmermann wrote:
> Hi there,
>
> I have a problem with drag and drop in GEF. I am just getting started on GEF
> and I managed to create a graphical viewer with some edit parts and figures
> inside of it. All I am trying to do now is add a drop listener to the viewer
> and print out some message that tells me that a drop has occurred.
> Unfortunately I don't even get this to work. After dragging a file (or
> anything else) from the Navigator to the editor the UI just hangs and I need
> to kill the runtime workbench process in order to continue working. My code
> is nothing more than this:
>
> protected void initializeGraphicalViewer() {
> GraphicalViewer viewer = getGraphicalViewer();
> viewer.setContents(myModel); // PSEUDO
> viewer.addDropTargetListener(new MyDropListener(viewer));
> }
>
> class MyDropListener extends AbstractTransferDropListener {
> public MyDropListener(GraphicalViewer viewer) {
> super(viewer);
> }
>
> protected void updateTargetRequest() {
> System.out.println("Updating request....");
> }
> }
>
> Am I missing something? Any help much appreciated.....
>
> Dirk
>
> P.S.: the main thread seems to be hanging in a native method call to
> COM.DoDragDrop. All other threads are either in sleep() or in wait().
>
>
>
Previous Topic:getting the Figure from Model
Next Topic:Redistributing GEF
Goto Forum:
  


Current Time: Thu Jul 17 20:52:14 EDT 2025

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

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

Back to the top