Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Add a ShellListener
Add a ShellListener [message #1123100] Wed, 02 October 2013 07:42 Go to next message
Sebastien Pennec is currently offline Sebastien PennecFriend
Messages: 27
Registered: April 2013
Location: Switzerland
Junior Member
Hello,

I would like to add a Shell listener to my app (full E4), to be notified when the main shell is activated and deactivated.

When is the first/best moment when this is possible?

I have a class that is linked to the lifeCycleURI of my product, but its @PostContruct method is called before any shell is created.

An addon is called to early, too.

Obviously, the Activator is also called to early.

Can anybody help? Thanks! Smile

EDIT: to make thinks clearer: I used to have an WorkbenchWindowAdvisor, whose method postWindowCreate() was perfect for this job. Is there something similar in E4?

[Updated on: Wed, 02 October 2013 07:58]

Report message to a moderator

Re: Add a ShellListener [message #1123104 is a reply to message #1123100] Wed, 02 October 2013 07:46 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Listen to the UIEvents.UILifeCycle.APP_STARTUP_COMPLETE event
Re: Add a ShellListener [message #1123113 is a reply to message #1123104] Wed, 02 October 2013 07:58 Go to previous messageGo to next message
Sebastien Pennec is currently offline Sebastien PennecFriend
Messages: 27
Registered: April 2013
Location: Switzerland
Junior Member
Ok I'll try that right away, thanks! Smile
Re: Add a ShellListener [message #1123137 is a reply to message #1123113] Wed, 02 October 2013 08:27 Go to previous message
Sebastien Pennec is currently offline Sebastien PennecFriend
Messages: 27
Registered: April 2013
Location: Switzerland
Junior Member
It worked perfectly, thanks!
Previous Topic:Sash size and closed parts not persisted when added by a fragment
Next Topic:Calling Command from Code in Kepler (4.3)
Goto Forum:
  


Current Time: Fri Apr 19 01:48:18 GMT 2024

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

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

Back to the top