Skip to main content


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: 2902
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:add views dynamically when using the compat layer
Next Topic:Contribute perspective to IDE (MARS M7)
Goto Forum:
  


Current Time: Thu Apr 25 12:46:53 GMT 2024

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

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

Back to the top