|When is IPerspectiveListener4.perspectivePreDeactivate() called? [message #1236858]
||Tue, 28 January 2014 03:40
| Matthias Paul Scholz
Registered: May 2012
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?
Powered by FUDForum
. Page generated in 0.02467 seconds