Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Strange "dispose" problem
Strange "dispose" problem [message #448691] Thu, 13 January 2005 13:07 Go to next message
Joe Hudson is currently offline Joe HudsonFriend
Messages: 20
Registered: July 2009
Junior Member
Hello, I am creating a Velocity editor and am noticing strange behavior.

If I only have 1 editor open, everything is fine... it works great.
However, If I open 2 editors and close the second (or first) editor, the
one that is still open has become "locked". Meaning, it is like it never
repainted. The editor area still actually shows what was on the closed
editor before it was closed.

I tracked this down and found out that the dispose method was being called
on all the editors when any editor was closed. Does this make any sense?
The only way I have been able to solve the problem is by overriding the
dispose method and not calling super.dispose() which I know is a horrible
thing to do because it will eat up resources.

I would really appreciate any help or advice anyone has to offer. Thanks.

Joe
Re: Strange "dispose" problem [message #448702 is a reply to message #448691] Thu, 13 January 2005 16:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Are your editors actually only pages under a MultiPartEditor? Because
for standalone editors it doesn't do this. A multiPartEditor is the top
level editor with more than one editor within it. If you close the
MultiPartEditor it closes all of its child editors.



--
Thanks,
Rich Kulp
Re: Strange "dispose" problem [message #448745 is a reply to message #448702] Thu, 13 January 2005 17:03 Go to previous messageGo to next message
Joe Hudson is currently offline Joe HudsonFriend
Messages: 20
Registered: July 2009
Junior Member
Thank you very much for the reply, Rich. My editor extends
MultiPageEditorPart which has 2 tabs within that. One of the tabs has an
editor which extends TextEditor, and the other tab has a Context that is
created in the MultiPageEditor.

Do you have any idea what I could do to resolve my issue? I will put my
code in here if you want but I didn't want to make this question hard to
read if you don't need it. Thank you very much for your time, Rich.

Joe
Re: Strange "dispose" problem [message #448750 is a reply to message #448745] Thu, 13 January 2005 18:42 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

I presume the dispose is coming because it is closing the main
MultiPageEditor. If it is, then it is supposed to dispose the other two
editors.

I don't know anything else. I don't use MultiPageEditor. Who is getting
the dispose that you overrode. Is it one of your child editors or is it
the main MultiPageEditor? By the time the main MultiPageEditor gets its
dispose the child editors should already of been disposed.

Joe Hudson wrote:
> Thank you very much for the reply, Rich. My editor extends
> MultiPageEditorPart which has 2 tabs within that. One of the tabs has
> an editor which extends TextEditor, and the other tab has a Context that
> is created in the MultiPageEditor.
>
> Do you have any idea what I could do to resolve my issue? I will put my
> code in here if you want but I didn't want to make this question hard to
> read if you don't need it. Thank you very much for your time, Rich.
>
> Joe
>

--
Thanks,
Rich Kulp
Previous Topic:Dynamic PopupMenu in an ObjectContribution
Next Topic:Searchable List
Goto Forum:
  


Current Time: Fri Nov 22 04:41:24 GMT 2019

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

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

Back to the top