This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 392903 - [RenderingEngine] Easier and more powerful lifecycle handling for Windows, Perspectives, ...
Summary: [RenderingEngine] Easier and more powerful lifecycle handling for Windows, Pe...
Status: CLOSED DUPLICATE of bug 398837
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.3   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: 4.4 M7   Edit
Assignee: Platform UI Triaged CLA
QA Contact: Eric Moffatt CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-26 06:42 EDT by Thomas Schindl CLA
Modified: 2014-03-19 22:13 EDT (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Schindl CLA 2012-10-26 06:42:18 EDT
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).
Comment 1 Nobody - feel free to take it CLA 2012-11-01 08:29:59 EDT
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.
Comment 2 Thomas Schindl CLA 2012-11-01 10:56:41 EDT
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.
Comment 3 Thomas Schindl CLA 2012-11-07 17:21:42 EST
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.
Comment 4 Lars Vogel CLA 2014-03-19 22:13:00 EDT

*** This bug has been marked as a duplicate of bug 398837 ***