Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » BundleActivator vs e4 lifeCycleURI
BundleActivator vs e4 lifeCycleURI [message #1436852] Fri, 03 October 2014 13:57 Go to next message
Bartosz Popiela is currently offline Bartosz PopielaFriend
Messages: 21
Registered: March 2012
Junior Member
Hi! Smile
1. What is the proper way to control application lifecycle in e4 based application? Should I use bundle activator (extending org.eclipse.ui.plugin.AbstractUIPlugin) or specify lifeCycleURI property in my application definition? What are the main differences between these two approaches? Is there a possibility that definied application will be started but bundle defining application will be lasy loaded and still in state STARTING (I mean that Activator.start(...) method wasn't invoked).
2. I also get the following warning for org.eclipse.e4.ui.workbench.lifecycle.PostContextCreate import: Quote:
Discourage access: The type PostContextCreate is not api (...)
. Is it a bug that it's x-friends restricted?

[Updated on: Fri, 03 October 2014 15:16]

Report message to a moderator

Re: BundleActivator vs e4 lifeCycleURI [message #1608241 is a reply to message #1436852] Mon, 09 February 2015 11:23 Go to previous messageGo to next message
Piero Campalani is currently offline Piero CampalaniFriend
Messages: 114
Registered: January 2015
Senior Member


Here too:
Discouraged access: The type 'PostContextCreate' is not API (restriction on required library '/media/data/IDE/eclipse-linux/plugins/org.eclipse.e4.ui.workbench_1.2.1.v20140901-1244.jar')
Re: BundleActivator vs e4 lifeCycleURI [message #1608528 is a reply to message #1608241] Mon, 09 February 2015 15:27 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2800
Registered: July 2012
Senior Member
The bundle activator is called when the bundle is started and stopped in the OSGi context.

A lifecycle manager/hook is used to register for the Eclipse application lifecycle. So it listens to events regarding the Eclipse 4 lifecycle, like for example listening of context creation.

This means if you need to handle the starting/stopping of a bundle, use the activator, if you need to listen for the application lifecycle, use the lifecycle hook.

The warning you get is because the API is only partially released. But that shouldn't be an issue.

Previous Topic:Move sash to a new window
Next Topic:WorkbenchWindowAdvisor per window
Goto Forum:

Current Time: Wed Jan 27 08:28:37 GMT 2021

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

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

Back to the top