Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Custom StatusReporter(override WorkbenchStatusReporter)(Registering Service no longer working)
Custom StatusReporter(override WorkbenchStatusReporter) [message #1752020] Tue, 17 January 2017 23:02
Shaun McCluskey is currently offline Shaun McCluskeyFriend
Messages: 1
Registered: January 2017
Junior Member
I have an app that has a custom StatusRpeorter that overrides the WorkbenchStatusReporter. My predicessor had some difficulty getting it to work.
His original topic is here:

His solution was to add the service programatically in the Activator class:
public void start(BundleContext bundleContext) throws Exception {
	Dictionary<String, Object> properties = new Hashtable<String, Object>();
	properties.put("service.context.key", "");
	StatusReporterContextFunction implementation = new StatusReporterContextFunction();
	bundleContext.registerService("org.eclipse.e4.core.contexts.IContextFunction", implementation, properties);
	Activator.context = bundleContext;

This worked great until we had to upgrade to eclipse 4.4 from 4.2.
Now this approach doesn't work. I even tried to add it declaratively through the Manifest file but that didn't work either.
Like this:
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="hxxp://" 

<implementation class=""/>
   <provide interface="org.eclipse.e4.core.contexts.IContextFunction"/>
 <property name="service.context.key" type="String" 

Was there a change how a service needs to be registered for something like StatusReporter since its a core service?
This worked in the eclipse 4.2 environment but not 4.4.
Previous Topic:CSS for line between unselected tabs
Next Topic:Open PartDescriptor on Application Startup
Goto Forum:

Current Time: Fri Mar 23 14:28:08 GMT 2018

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

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