Home » Eclipse Projects » Eclipse 4 » Custom StatusReporter (or how to override WorkbenchStatusReporter)
|
Re: Custom StatusReporter (or how to override WorkbenchStatusReporter) [message #915756 is a reply to message #915747] |
Mon, 17 September 2012 22:49 |
Eclipse User |
|
|
|
Since StatusReporter is a core service you would need a bit extra work to get it done .
You would need to provide your context function as in http://www.vogella.com/articles/EclipseRCP/article.html#icontextfunction
Part of your component definition (create a {projectRoot}/OSGI-INF/component.xml)would look like this:
<implementation class="org.eclipse.e4.paho.client.OtherCF"/>
<service>
<provide interface="org.eclipse.e4.core.contexts.IContextFunction"/>
</service>
<property name="service.context.key" type="String"
value="org.eclipse.e4.core.services.statusreporter.StatusReporter"/>
where *.OtherCF is something like:
public class OtherCF extends ContextFunction {
@Override
public Object compute(IEclipseContext context) {
return ContextInjectionFactory.make(MyWorkbenchStatusReporter.class,
context);
}
}
where the MyWorkbenchStatusReporter is your StatusReporter extending and implementing anything you like.
|
|
| | |
Re: Custom StatusReporter (or how to override WorkbenchStatusReporter) [message #981916 is a reply to message #981882] |
Mon, 12 November 2012 20:06 |
Justin Unterreiner Messages: 10 Registered: August 2012 |
Junior Member |
|
|
The build.properties includes the OSGI-INF directory:
output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml,\
css/default.css,\
Application.e4xmi,\
conf/,\
com.company.blah.productname.product,\
images/,\
OSGI-INF/
source.. = src/,\
conf/
src.includes = images/
And the MANIFEST.MF contains the lazy activation policy:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: com.company.blah.productname
Bundle-SymbolicName: com.company.blah.productname; singleton:=true
Bundle-Version: 2.0.4
Bundle-Activator: com.company.blah.productname.Activator
Bundle-Vendor: company
Bundle-ActivationPolicy: lazy
Eclipse-RegisterBuddy: com.company.framework,
com.company.blah.lib
Require-Bundle: javax.inject;bundle-version="1.0.0",
org.eclipse.core.runtime;bundle-version="3.8.0",
org.eclipse.swt;bundle-version="3.100.0",
org.eclipse.core.databinding;bundle-version="1.4.1",
org.eclipse.core.databinding.beans;bundle-version="1.2.200",
org.eclipse.jface;bundle-version="3.8.0",
org.eclipse.jface.databinding;bundle-version="1.6.0",
org.eclipse.e4.ui.services;bundle-version="0.10.1",
org.eclipse.e4.ui.workbench;bundle-version="0.10.2",
org.eclipse.e4.core.services;bundle-version="1.0.0",
org.eclipse.e4.core.di;bundle-version="1.1.0",
org.eclipse.e4.core.contexts;bundle-version="1.1.0",
org.eclipse.e4.ui.workbench.swt;bundle-version="0.10.1",
org.eclipse.core.databinding.property;bundle-version="1.4.100",
org.eclipse.e4.ui.css.core;bundle-version="0.10.1",
org.w3c.css.sac;bundle-version="1.3.1",
org.eclipse.e4.core.commands;bundle-version="0.10.1",
org.eclipse.e4.ui.bindings;bundle-version="0.10.1",
org.eclipse.ui;bundle-version="3.103.0",
org.eclipse.ui.forms;bundle-version="3.5.200",
com.company.blah.lib,
com.company.productname2.model,
com.company.framework,
com.company.productname2.business,
com.company.productname2.model;bundle-version="1.6.0",
org.eclipse.osgi.services;bundle-version="3.3.100",
org.eclipse.nebula.widgets.datechooser;bundle-version="1.0.0",
javax.annotation;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: com.company.common.model.reporting,
com.company.lassen.reporting,
com.company.lib,
com.company.blah.lib.swt,
org.eclipse.e4.core.di.extensions,
org.eclipse.e4.ui.di,
org.osgi.framework;version="1.3.0",
org.osgi.service.event;version="1.3.0"
Service-Component: OSGI-INF/StatusReporter.xml
|
|
| | | |
Goto Forum:
Current Time: Tue Sep 24 23:10:57 GMT 2024
Powered by FUDForum. Page generated in 0.03885 seconds
|