Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Getting the application Shell at start?
Getting the application Shell at start? [message #1008646] Wed, 13 February 2013 12:09 Go to next message
Alex Kipling is currently offline Alex KiplingFriend
Messages: 258
Registered: July 2012
Senior Member
I have the following problem:
when the application Shell is closed by using the close button in the upper right corner - my app data are not fully persisted.

I would like to solve it, by handling the close events of the SWT Shell.

Question:

What would be the right place to hook in for getting the application Shell?



I tried to use Lifecycle - it seems to be too early, since Shell is not available in @PostConstruct.

I registered for IEventManager UIEvents.UILifeCycle.BRINGTOTOP events - it was not triggered.

Re: Getting the application Shell at start? [message #1008647 is a reply to message #1008646] Wed, 13 February 2013 12:13 Go to previous messageGo to next message
Christoph Keimel is currently offline Christoph KeimelFriend
Messages: 386
Registered: December 2010
Location: Germany
Senior Member
This Thread might include some pointers:
http://www.eclipse.org/forums/index.php/mv/msg/383895/922580/#msg_922580
Re: Getting the application Shell at start? [message #1009025 is a reply to message #1008647] Thu, 14 February 2013 10:01 Go to previous messageGo to next message
Martin Skorsky is currently offline Martin SkorskyFriend
Messages: 112
Registered: July 2009
Senior Member
This seems to be related to the lifecycle of the workspace.
If you have your own application, use org.eclipse.ui.application.WorkbenchAdvisor and extend this.
See also http://www.eclipsezone.com/eclipse/forums/t99582.html
Re: Getting the application Shell at start? [message #1009030 is a reply to message #1009025] Thu, 14 February 2013 10:07 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 5487
Registered: July 2009
Senior Member
There's no such class involved in pure e4 apps!

Tom

Am 14.02.13 11:01, schrieb Martin Skorsky:
> This seems to be related to the lifecycle of the workspace.
> If you have your own application, use
> org.eclipse.ui.application.WorkbenchAdvisor and extend this.
> See also http://www.eclipsezone.com/eclipse/forums/t99582.html
Re: Getting the application Shell at start? [message #1009097 is a reply to message #1009025] Thu, 14 February 2013 12:31 Go to previous message
Sopot Cela is currently offline Sopot CelaFriend
Messages: 597
Registered: December 2010
Senior Member

Martin Skorsky wrote on Thu, 14 February 2013 11:01
This seems to be related to the lifecycle of the workspace.
If you have your own application, use org.eclipse.ui.application.WorkbenchAdvisor and extend this.
See also http://www.eclipsezone.com/eclipse/forums/t99582.html


This pointer is wrong because the e4 style lifecycles are something completely different from 3.x style LC management and if I got it right the original question is about an e4 app.

I just wanted to enforce this in order to not confuse others who might have the same issue.
Previous Topic:examples of core expression with e4 ?
Next Topic:Window icons in several sizes
Goto Forum:
  


Current Time: Sun Dec 21 13:35:11 GMT 2014

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

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