Community
Participate
Working Groups
to get access to the lifecycle of Application, Window, Perspectives, ... we currently only provide the possibility to listen to events on the IEventBroker which is: a) not very convenient for such a common thing as getting informed about a window open, ... b) does not allow to veto the action (e.g. closing the perspective, ...) While discussing bug 389063 i came up with the idea to add lifecycle handlers to our UI-Elements (see comment 5).
Just a thought: can we supply this functionality as an addon? I mean if we can we should probably start building stuff on the platform using addons more than making the platform behavior fatter and fatter. the addon would do sth like: listen event e; get the MUIElement; get its contributor; blabla.invoke appropriate annotation if present; This way we make it optional for people to use this stuff or not if we do not all agree it should be added to the platform. If he/she wants to then just add the addon.
Listening to events is NOT enough you need to do calls before e.g. the window is about to close and veto it! So sorry no an addon doesn't do the job! Using the lifecycle stuff is always optional so if you don't attach a lifecycle handler to an element no problem.
I've pushed an initial version for Menu lifecycle handling http://git.eclipse.org/c/platform/eclipse.platform.ui.git/log/?h=tschindl/392903. I'm still not sure why we can't implement bug 389063 with this.
*** This bug has been marked as a duplicate of bug 398837 ***