Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » When is IPerspectiveListener4.perspectivePreDeactivate() called?(In which cases is IPerspectiveListener4.perspectivePreDeactivate() actually called?)
When is IPerspectiveListener4.perspectivePreDeactivate() called? [message #1236858] Tue, 28 January 2014 08:40 Go to next message
Matthias Paul Scholz is currently offline Matthias Paul ScholzFriend
Messages: 38
Registered: May 2012
Hi all,

I have an RCP application with a couple of perspectives. In one of these perspectives there's a view where the user can manipulate masterdata.
I need to save a dirty state of this view in case, for instance, the user changes to another perspective without having saved her changes.

After various vain attempts to implement some veto mechanism here, I've decided to
register an IPerspectiveListener4 by overriding PerspectiveAdapter and implementing perspectivePreDeactivate() there.
The listener is registered in createPartControl() by calling


Surprisingly, that very method of my listener instance is never called by the platform when the perspective is active and the user changes to another perspective (using the perspective chooser in the applications tool bar)!

On the other hand, when I additionally implement perspectiveActivated() in my perspective listener, this method is called for the new perspective once the switch to the other perspective is performed; hence, registration of the listener seems to have worked.

Now I wonder in which cases IPerspectiveListener4.perspectivePreDeactivate() is actually called?
Apparently I am wrong in guessing that this happens each time a perspective change occurs?

Re: When is IPerspectiveListener4.perspectivePreDeactivate() called? [message #1244626 is a reply to message #1236858] Wed, 12 February 2014 16:29 Go to previous message
Henno Vermeulen is currently offline Henno VermeulenFriend
Messages: 126
Registered: July 2009
Senior Member
When using an Eclipse 3.x I believe this is called when activating a new perspective, before the new perspective is actually activated.

When using 4.x this is never called. This is bug 408309, please vote for it!
Previous Topic:Solid tutorial for creating Eclipse RCP product
Next Topic:HTML in menu tooltip
Goto Forum:

Current Time: Tue Jun 19 20:31:33 GMT 2018

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

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

Back to the top