Fry123
Fry123

Reputation: 38

Eclipse Rcp run E4 based code after the whole application has started and the GUI has completely rendered

i have an E3/E4 mixed application with compatibility layer. I would like to run E4 based code after the whole application has started and the GUI has completely rendered.

Is there maybe a listener or something similar where I can hook my code?

thank you

Upvotes: 1

Views: 294

Answers (1)

greg-449
greg-449

Reputation: 111142

You can use the Application Startup Complete event for this.

If you have a Life Cycle class just add a method like the following to the class:

@Optional
@Inject
public void appStartupComplete(@UIEventTopic(UIEvents.UILifeCycle.APP_STARTUP_COMPLETE) final Event event)
{
   ....
}

Or you can use the event broker to subscribe to the UIEvents.UILifeCycle.APP_STARTUP_COMPLETE event.

Note: Event in the above is org.osgi.service.event.Event - there are several different Event classes so it is easy to get the wrong one.

Upvotes: 1

Related Questions