Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » ViewPart closing event
ViewPart closing event [message #254038] Sat, 19 June 2004 17:13 Go to next message
S Dix is currently offline S DixFriend
Messages: 43
Registered: July 2009
Member
I am interested in the event when the ViewPart is closing.

I checked dispose() and tried the IPartListener2 but both of them are just
after the ViewPart is closed().

I want some notification juse before the ViewPart closes.

Any help appreciated.

Thanks & Regards,

Sid
Re: ViewPart closing event [message #254273 is a reply to message #254038] Mon, 21 June 2004 15:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nick_edgar._no.spam.please_.ca.ibm.com

Try: view.getSite().getWorkbenchWindow().addPerspectiveListener(n ew
IPerspectiveListener2() { ... });
The method on IPerspectiveListener2 gets called before the view or its
controls are disposed, and the id parameter indicates which view is being
closed. Don't forget to remove the listener in your view's dispose method.

It would help to know more about what you're trying to do here. There may
be a cleaner way.

Nick

"S Dixit" <siddhi1972@yahoo.com> wrote in message
news:cb1s7r$679$1@eclipse.org...
> I am interested in the event when the ViewPart is closing.
>
> I checked dispose() and tried the IPartListener2 but both of them are just
> after the ViewPart is closed().
>
> I want some notification juse before the ViewPart closes.
>
> Any help appreciated.
>
> Thanks & Regards,
>
> Sid
>
Re: ViewPart closing event [message #254359 is a reply to message #254273] Mon, 21 June 2004 18:42 Go to previous message
S Dix is currently offline S DixFriend
Messages: 43
Registered: July 2009
Member
Hi Nick,

Thanks for the reply.

In my plugin I am embedding my Swing based JPanel in the View and in that
JPanel I have provided one toolbar to close the view and in which I am
cleanly closing my application and in the end I am calling hideView() and
everything works fine.
But when I click on the 'x' to close the view my application does not stop
bcos there is one Progress dialog which comes up just before my
application stops and that Progress dialog never disposes.

So I am trying out possibilities the only difference I know is when I
close using the toolbar which I have provided the view is still not hidden
whereas when I try to do the same in dispose() of my View the view is
hidden.

I will let you know whether your approach works for me or not.

Thanks again.


Nick Edgar wrote:

> Try: view.getSite().getWorkbenchWindow().addPerspectiveListener(n ew
> IPerspectiveListener2() { ... });
> The method on IPerspectiveListener2 gets called before the view or its
> controls are disposed, and the id parameter indicates which view is being
> closed. Don't forget to remove the listener in your view's dispose method.

> It would help to know more about what you're trying to do here. There may
> be a cleaner way.

> Nick

> "S Dixit" <siddhi1972@yahoo.com> wrote in message
> news:cb1s7r$679$1@eclipse.org...
> > I am interested in the event when the ViewPart is closing.
> >
> > I checked dispose() and tried the IPartListener2 but both of them are just
> > after the ViewPart is closed().
> >
> > I want some notification juse before the ViewPart closes.
> >
> > Any help appreciated.
> >
> > Thanks & Regards,
> >
> > Sid
> >
Previous Topic:search and ide dependancy, RCP, preferences
Next Topic:Method overload syntax
Goto Forum:
  


Current Time: Fri Apr 26 14:25:26 GMT 2024

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

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

Back to the top