Bug 419868 - [RenderingEngine] [Renderer] Lookup IRendererFactory in OSGi service registry instead of/additionally to "rendererFactoryUri" product property
Summary: [RenderingEngine] [Renderer] Lookup IRendererFactory in OSGi service registry...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.4   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-18 11:42 EDT by Markus Kuppe CLA
Modified: 2013-11-01 09:05 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Kuppe CLA 2013-10-18 11:42:27 EDT
Lookup (read inject via DS) implementations of IRendererFactory via the OSGi service registry instead of registering the factory (statically) via a product extension.

This providers higher flexibility especially WRT which bundle provides the IRendererFactory. Additionally a renderer factory can be replaced at runtime.
Comment 1 Markus Kuppe CLA 2013-11-01 09:05:37 EDT
A few notes (incomplete) from a quick glance at the code:

- Custom RendererFactory gets created via ContextInjectionFactory.make(...) with the context of the Workbench
=> Might be possible to override existing behavior by using an ExtendedObjectSupplier
- org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.initialize(IEclipseContext) creates custom RendererFactory
- Most code passes a factoryURI around :-(
- org.eclipse.equinox.app.IApplicationContext.getBrandingProperty(String) with the key org.eclipse.e4.ui.internal.workbench.E4Workbench.RENDERER_FACTORY_URI returns the "bundleclass" property set in the application's plugin.xml