Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » create a part from a PartDescriptor before the Window is shown
create a part from a PartDescriptor before the Window is shown [message #1695115] Tue, 12 May 2015 07:14 Go to next message
quest ionnere is currently offline quest ionnereFriend
Messages: 57
Registered: January 2015
Member
I would like to modify my workbench programatically before the window is created. The main problem I currently experience is creating a part from a part descriptor and put it into a placeholder before the window is opened.
When trying to do this with the EPartService I always get the "Application does not have an active window" since no window is yet created.

What is the best way to make sure my part is shown as soon as the window is opened?
I already tried to get notified via the EventBroker ("@UIEventTopic(UIEvents.UILifeCycle.BRINGTOTOP) Event event") but no events arrive. I also tried using a Processor and a Lifecycle handler but I so far failed to find an annotation that gets called when the window is opened.

Any help would be greatly appreciated.
Re: create a part from a PartDescriptor before the Window is shown [message #1695151 is a reply to message #1695115] Tue, 12 May 2015 10:18 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2526
Registered: July 2012
Senior Member
You need to register for the UIEvent APP_STARTUP_COMPLETED
Re: create a part from a PartDescriptor before the Window is shown [message #1695306 is a reply to message #1695115] Wed, 13 May 2015 12:46 Go to previous message
quest ionnere is currently offline quest ionnereFriend
Messages: 57
Registered: January 2015
Member
Thank you Dirk, that was exactly what I was looking for.

For anybody looking for similar Annotations:
have a look at the constants defined in
org.eclipse.e4.ui.workbench.UIEvents.UILifeCycle
Previous Topic:Possible to develop a feature with GUI (e4 style) to RCP application that has e3.x GUI?
Next Topic:Contribute perspective to IDE (MARS M7)
Goto Forum:
  


Current Time: Wed Nov 22 22:24:27 GMT 2017

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

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