Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Fast way to delete TreeItems?
Fast way to delete TreeItems? [message #452198] Tue, 15 March 2005 06:39 Go to next message
Eclipse UserFriend
Originally posted by: bob.objfac.com

Isn't there a fast way to dispose() TreeItems that are no longer
visible? Even when there are only a few hundred items, it takes several
seconds to dispose them after the parent is collapsed.

(I'm doing this to keep invisible items from hanging around in memory.
Otherwise, the user could easily build up thousands of unused items.
It's a file browser. Is this somehow a bad idea?)

Bob Foster
Re: Fast way to delete TreeItems? [message #452209 is a reply to message #452198] Tue, 15 March 2005 13:12 Go to previous messageGo to next message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
For now, there is only TreeItem.dispose() and Tree.removeAll(). Perhaps
there should be a TreeItem.removeAll().

"Bob Foster" <bob@objfac.com> wrote in message
news:d15vu4$7v9$1@www.eclipse.org...
> Isn't there a fast way to dispose() TreeItems that are no longer visible?
> Even when there are only a few hundred items, it takes several seconds to
> dispose them after the parent is collapsed.
>
> (I'm doing this to keep invisible items from hanging around in memory.
> Otherwise, the user could easily build up thousands of unused items. It's
> a file browser. Is this somehow a bad idea?)
>
> Bob Foster
Re: Fast way to delete TreeItems? [message #452213 is a reply to message #452209] Tue, 15 March 2005 14:03 Go to previous messageGo to next message
Kalman Hazins is currently offline Kalman HazinsFriend
Messages: 76
Registered: July 2009
Member
May I suggest removing items in a different thread? Now, I know that you
wouldn't be able to do it directly, because you can only update GUI
components from a UI thread, but you can use

display.asyncExec()

and slowly but surely remove whatever you need at no cost to interactivity
of your application.

Thanx,
- Kalman

"Veronika Irvine" <veronika_irvine@oti.com> wrote in message
news:d16n0b$rod$1@www.eclipse.org...
> For now, there is only TreeItem.dispose() and Tree.removeAll(). Perhaps
> there should be a TreeItem.removeAll().
>
> "Bob Foster" <bob@objfac.com> wrote in message
> news:d15vu4$7v9$1@www.eclipse.org...
> > Isn't there a fast way to dispose() TreeItems that are no longer
visible?
> > Even when there are only a few hundred items, it takes several seconds
to
> > dispose them after the parent is collapsed.
> >
> > (I'm doing this to keep invisible items from hanging around in memory.
> > Otherwise, the user could easily build up thousands of unused items.
It's
> > a file browser. Is this somehow a bad idea?)
> >
> > Bob Foster
>
>
Re: Fast way to delete TreeItems? [message #452294 is a reply to message #452209] Thu, 17 March 2005 03:59 Go to previous message
Eclipse UserFriend
Originally posted by: bob.objfac.com

Veronika Irvine wrote:
> For now, there is only TreeItem.dispose() and Tree.removeAll(). Perhaps
> there should be a TreeItem.removeAll().

Good idea! I entered a feature request as:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=88278

Bob Foster
Previous Topic:Is it possible to change title of PreferenceDialog ?
Next Topic:IProject instance for plugin is not getting created.
Goto Forum:
  


Current Time: Tue Jul 16 08:08:19 GMT 2019

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

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

Back to the top