Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Life cycle hook is not called (anymore!)
icon9.gif  Life cycle hook is not called (anymore!) [message #1612920] Thu, 12 February 2015 09:32 Go to next message
Piero Campalani is currently offline Piero CampalaniFriend
Messages: 111
Registered: January 2015
Senior Member

Dear experts,

I am trying to configure something as simple as a life-cycle hook.
I am running a feature-based product which requires a feature including a fragment application: that's the layout.

I indeed managed to get the application to run the life-cycle hook after registering the correspondent URI in the plugin.xml lifeCycleURI runtime property.
This hook was in a E4LifeCycle java file within the main project package (in case this is an important detail, which should not I guess).

Then.. I decided to refactor all of this by moving the hook to a new Manager file in a foo.lifecycle package, because I might need a whole package in the future for these setup/teardown tasks.

After this, the hook is not called anymore, and I can't get it to work.

I clearly updated the plugin.xml property to point to the correct bundleclass, I cleaned all builds, I cleaned the run/debug configurations, I dropped/re-created the run/debug configurations, I restarted Eclipse, I restarted Eclipse with -clean option, I dropped/re-added feature and plugin dependencies, I prayed to God before launching, I moved the hook back to the original position and re-updated re-clean re-started everything but the hook is not called, I promised Allah I would have joined the caliphate. Hook is not called!

I am new to Eclipse RCP development, I might be missing something: any help?
I can ensure you the property name and value in the plugin configuration are correct.

thanks for helping,
-Piero

[Updated on: Thu, 12 February 2015 09:33]

Report message to a moderator

Re: Life cycle hook is not called (anymore!) [message #1613315 is a reply to message #1612920] Thu, 12 February 2015 15:19 Go to previous messageGo to next message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 693
Registered: January 2012
Senior Member

My guess: you're not exporting the package from your bundle manifest.

Put a breakpoint in E4Application#createE4Workbench() around this code:
		String lifeCycleURI = getArgValue(IWorkbench.LIFE_CYCLE_URI_ARG, applicationContext, false);
		if (lifeCycleURI != null) {
			lcManager = factory.create(lifeCycleURI, appContext);

and step through it. Use The Source, Luke!

Brian.


Eclipse Platform committer. Ask me about Eclipse support, training, and consulting.
Re: Life cycle hook is not called (anymore!) [message #1614628 is a reply to message #1613315] Fri, 13 February 2015 11:27 Go to previous message
Piero Campalani is currently offline Piero CampalaniFriend
Messages: 111
Registered: January 2015
Senior Member

Thanks Brian, but saw this:
http://stackoverflow.com/questions/22940803/e4-lifecycleuri-property-for-fragment-plugin

PS ...Use the SOURCE...
Previous Topic:how to diable a context menu on ToolControl
Next Topic:Search key in web browser window
Goto Forum:
  


Current Time: Tue Dec 12 19:56:13 GMT 2017

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

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