[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools] Re: How to tell if a ViewPart has been disposed.

James,

There is no way to ask an arbitrary view directly (via IViewPart or its
parent interfaces) if it has been disposed or not.
If it's a view of your own devising, you could always add an isDisposed()
method to it.

However, you can determine whether a view is currently open on a workbench
page or not, using IWorkbenchPage.findView(String id).

Also, you can use the part service, IPartService (which IWorkbenchPage
extends), to track part lifecycle (open, close, activate, deactivate, etc).

Nick

"James Bognar" <jbognar@xxxxxxxxxx> wrote in message
news:9kc820$jvh$1@xxxxxxxxxxxxxxxx
> What's the easiest way to determine if a ViewPart object has been
> disposed.  In other words, how can I tell if a view has been closed by a
> user.  Is there a way to get to this info through the AbstractUIPlugin
> class?