Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Runtime Workbench Hangs
Runtime Workbench Hangs [message #176709] Mon, 11 April 2005 20:32 Go to next message
Eclipse UserFriend
Originally posted by: binti.ksu.edu

Hi All,

I have a strange problem. When I run my plugin to test it in the runtime
workbench, it hangs when ever I pull out a pop-up menu or right click to
perform any action? Why is this so? When I hit alt+tab and come to the
workbench it works fine. This only happens when my file is open. If no file
is open, it works fine?

Is there a problem with my plugin?

Kindly Help.

Thanks,
Binti.
Re: Runtime Workbench Hangs [message #176739 is a reply to message #176709] Mon, 11 April 2005 21:09 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
I remember a few other people complaining of this same problem. But I don't
remember what the fix was. Search this newsgroup.

"Binti Sepaha" <binti@ksu.edu> wrote in message
news:d3en89$v0$1@news.eclipse.org...
> Hi All,
>
> I have a strange problem. When I run my plugin to test it in the runtime
> workbench, it hangs when ever I pull out a pop-up menu or right click to
> perform any action? Why is this so? When I hit alt+tab and come to the
> workbench it works fine. This only happens when my file is open. If no
file
> is open, it works fine?
>
> Is there a problem with my plugin?
>
> Kindly Help.
>
> Thanks,
> Binti.
>
>
Re: Runtime Workbench Hangs [message #176861 is a reply to message #176739] Tue, 12 April 2005 13:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: binti.ksu.edu

I found messages with the ismilar problem, but I did not find a solution.
What can I do? I have made another plug-in in the same way, but that does
not give this problem?

Kindly reply
Binti.


"Pratik Shah" <ppshah@us.ibm.com> wrote in message
news:d3epd0$483$1@news.eclipse.org...
>I remember a few other people complaining of this same problem. But I
>don't
> remember what the fix was. Search this newsgroup.
>
> "Binti Sepaha" <binti@ksu.edu> wrote in message
> news:d3en89$v0$1@news.eclipse.org...
>> Hi All,
>>
>> I have a strange problem. When I run my plugin to test it in the runtime
>> workbench, it hangs when ever I pull out a pop-up menu or right click to
>> perform any action? Why is this so? When I hit alt+tab and come to the
>> workbench it works fine. This only happens when my file is open. If no
> file
>> is open, it works fine?
>>
>> Is there a problem with my plugin?
>>
>> Kindly Help.
>>
>> Thanks,
>> Binti.
>>
>>
>
>
Re: Runtime Workbench Hangs [message #176874 is a reply to message #176709] Tue, 12 April 2005 13:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: binti.ksu.edu

Hi,

I know now where the problem occurs - in my diagram figure. I am including
the source here. Kindly look at it and let me know what to do.

public class SequenceDiagramFigure extends FreeformLayer
{
EditableLabel nameLabel;

public SequenceDiagramFigure(EditableLabel name)
{
nameLabel = name;
setOpaque(true);
}

protected void paintFigure(Graphics g)
{
add(nameLabel); --------------------------------------- THIS IS WHERE THE
PROBLEM IS.........
Rectangle r = getBounds().getCopy();
int DELTA = 20;
r.translate(DELTA, DELTA);

Insets inset = new Insets(DELTA, DELTA, DELTA, DELTA);
MarginBorder border = new MarginBorder(inset);
setBorder(border);

g.drawRectangle(r.x, r.y, r.width - 2*DELTA, r.height - 2*DELTA);
}


If I add the nameLabel in the constructor, it only shows up after any
movement or addition to the canvas, but not when the editor opens up. If I
add it in the paintFigure(), it freezes the workbench on opening any
pop-ups. Why does it not show initially if I add it in the constructor? If I
do not add it at all, the workbench behaves fine.

Kindly look into this and let me know what to do, thanks a lot in advance.

Binti.


"Binti Sepaha" <binti@ksu.edu> wrote in message
news:d3en89$v0$1@news.eclipse.org...
> Hi All,
>
> I have a strange problem. When I run my plugin to test it in the runtime
> workbench, it hangs when ever I pull out a pop-up menu or right click to
> perform any action? Why is this so? When I hit alt+tab and come to the
> workbench it works fine. This only happens when my file is open. If no
> file is open, it works fine?
>
> Is there a problem with my plugin?
>
> Kindly Help.
>
> Thanks,
> Binti.
>
Re: Runtime Workbench Hangs [message #176898 is a reply to message #176709] Tue, 12 April 2005 14:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

If the workbench hangs, you can usually invoke a thread dump by pressing
CTRL+BREAK on windows. Or, if you are launching a runtime workbench from
within eclipse, do it in debug mode and then inspect the threads in hte
debugger. Let us know what you find.

"Binti Sepaha" <binti@ksu.edu> wrote in message
news:d3en89$v0$1@news.eclipse.org...
> Hi All,
>
> I have a strange problem. When I run my plugin to test it in the runtime
> workbench, it hangs when ever I pull out a pop-up menu or right click to
> perform any action? Why is this so? When I hit alt+tab and come to the
> workbench it works fine. This only happens when my file is open. If no
> file is open, it works fine?
>
> Is there a problem with my plugin?
>
> Kindly Help.
>
> Thanks,
> Binti.
>
Re: Runtime Workbench Hangs [message #176906 is a reply to message #176898] Tue, 12 April 2005 14:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: binti.ksu.edu

Hey Randy, I debggued it and found where the problem is. Just posted it.
Kindly review it and let me know what to do.

Thanks,
Binti

"Randy Hudson" <none@us.ibm.com> wrote in message
news:d3gldj$fsg$1@news.eclipse.org...
> If the workbench hangs, you can usually invoke a thread dump by pressing
> CTRL+BREAK on windows. Or, if you are launching a runtime workbench from
> within eclipse, do it in debug mode and then inspect the threads in hte
> debugger. Let us know what you find.
>
> "Binti Sepaha" <binti@ksu.edu> wrote in message
> news:d3en89$v0$1@news.eclipse.org...
>> Hi All,
>>
>> I have a strange problem. When I run my plugin to test it in the runtime
>> workbench, it hangs when ever I pull out a pop-up menu or right click to
>> perform any action? Why is this so? When I hit alt+tab and come to the
>> workbench it works fine. This only happens when my file is open. If no
>> file is open, it works fine?
>>
>> Is there a problem with my plugin?
>>
>> Kindly Help.
>>
>> Thanks,
>> Binti.
>>
>
>
Re: Runtime Workbench Hangs [message #176914 is a reply to message #176874] Tue, 12 April 2005 15:01 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
Right, so you can't do all those things in the paintFigure() method. You
should only do painting in there. When you add a child to a figure (or set
the border), that figure will automatically request a revalidate, which will
cause a repaint. So, you basically get a cycle. I would have thought that
you'd run into a problem sooner than when you right-click.

You should add those children and the set the border in the constructor. If
it's not showing up initially, you're not setting it up properly (maybe not
setting the constraints). Hard to say what you're doing wrong without
looking at the code.

"Binti Sepaha" <binti@ksu.edu> wrote in message
news:d3gj00$c03$1@news.eclipse.org...
> Hi,
>
> I know now where the problem occurs - in my diagram figure. I am including
> the source here. Kindly look at it and let me know what to do.
>
> public class SequenceDiagramFigure extends FreeformLayer
> {
> EditableLabel nameLabel;
>
> public SequenceDiagramFigure(EditableLabel name)
> {
> nameLabel = name;
> setOpaque(true);
> }
>
> protected void paintFigure(Graphics g)
> {
> add(nameLabel); --------------------------------------- THIS IS WHERE
THE
> PROBLEM IS.........
> Rectangle r = getBounds().getCopy();
> int DELTA = 20;
> r.translate(DELTA, DELTA);
>
> Insets inset = new Insets(DELTA, DELTA, DELTA, DELTA);
> MarginBorder border = new MarginBorder(inset);
> setBorder(border);
>
> g.drawRectangle(r.x, r.y, r.width - 2*DELTA, r.height - 2*DELTA);
> }
>
>
> If I add the nameLabel in the constructor, it only shows up after any
> movement or addition to the canvas, but not when the editor opens up. If
I
> add it in the paintFigure(), it freezes the workbench on opening any
> pop-ups. Why does it not show initially if I add it in the constructor? If
I
> do not add it at all, the workbench behaves fine.
>
> Kindly look into this and let me know what to do, thanks a lot in advance.
>
> Binti.
>
>
> "Binti Sepaha" <binti@ksu.edu> wrote in message
> news:d3en89$v0$1@news.eclipse.org...
> > Hi All,
> >
> > I have a strange problem. When I run my plugin to test it in the runtime
> > workbench, it hangs when ever I pull out a pop-up menu or right click to
> > perform any action? Why is this so? When I hit alt+tab and come to the
> > workbench it works fine. This only happens when my file is open. If no
> > file is open, it works fine?
> >
> > Is there a problem with my plugin?
> >
> > Kindly Help.
> >
> > Thanks,
> > Binti.
> >
>
>
Re: Runtime Workbench Hangs - Solved [message #176923 is a reply to message #176914] Tue, 12 April 2005 15:18 Go to previous message
Eclipse UserFriend
Originally posted by: binti.ksu.edu

Thanks, that solved my problem.

I put the setBorder and adding the label in the constructor and everything
works fine. I was being silly. Thanks a lot.

Binti.

"Pratik Shah" <ppshah@us.ibm.com> wrote in message
news:d3go7r$kjh$1@news.eclipse.org...
> Right, so you can't do all those things in the paintFigure() method. You
> should only do painting in there. When you add a child to a figure (or
> set
> the border), that figure will automatically request a revalidate, which
> will
> cause a repaint. So, you basically get a cycle. I would have thought
> that
> you'd run into a problem sooner than when you right-click.
>
> You should add those children and the set the border in the constructor.
> If
> it's not showing up initially, you're not setting it up properly (maybe
> not
> setting the constraints). Hard to say what you're doing wrong without
> looking at the code.
>
> "Binti Sepaha" <binti@ksu.edu> wrote in message
> news:d3gj00$c03$1@news.eclipse.org...
>> Hi,
>>
>> I know now where the problem occurs - in my diagram figure. I am
>> including
>> the source here. Kindly look at it and let me know what to do.
>>
>> public class SequenceDiagramFigure extends FreeformLayer
>> {
>> EditableLabel nameLabel;
>>
>> public SequenceDiagramFigure(EditableLabel name)
>> {
>> nameLabel = name;
>> setOpaque(true);
>> }
>>
>> protected void paintFigure(Graphics g)
>> {
>> add(nameLabel); --------------------------------------- THIS IS WHERE
> THE
>> PROBLEM IS.........
>> Rectangle r = getBounds().getCopy();
>> int DELTA = 20;
>> r.translate(DELTA, DELTA);
>>
>> Insets inset = new Insets(DELTA, DELTA, DELTA, DELTA);
>> MarginBorder border = new MarginBorder(inset);
>> setBorder(border);
>>
>> g.drawRectangle(r.x, r.y, r.width - 2*DELTA, r.height - 2*DELTA);
>> }
>>
>>
>> If I add the nameLabel in the constructor, it only shows up after any
>> movement or addition to the canvas, but not when the editor opens up. If
> I
>> add it in the paintFigure(), it freezes the workbench on opening any
>> pop-ups. Why does it not show initially if I add it in the constructor?
>> If
> I
>> do not add it at all, the workbench behaves fine.
>>
>> Kindly look into this and let me know what to do, thanks a lot in
>> advance.
>>
>> Binti.
>>
>>
>> "Binti Sepaha" <binti@ksu.edu> wrote in message
>> news:d3en89$v0$1@news.eclipse.org...
>> > Hi All,
>> >
>> > I have a strange problem. When I run my plugin to test it in the
>> > runtime
>> > workbench, it hangs when ever I pull out a pop-up menu or right click
>> > to
>> > perform any action? Why is this so? When I hit alt+tab and come to the
>> > workbench it works fine. This only happens when my file is open. If no
>> > file is open, it works fine?
>> >
>> > Is there a problem with my plugin?
>> >
>> > Kindly Help.
>> >
>> > Thanks,
>> > Binti.
>> >
>>
>>
>
>
Previous Topic:Same Source Target- Bendpoint Problem
Next Topic:Connection Layer
Goto Forum:
  


Current Time: Sun Jan 29 20:30:22 GMT 2023

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

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

Back to the top