Bug 500688

Summary: [DI] Provide dependency injection for 3.x API views
Product: [Eclipse Project] Platform Reporter: Brian de Alwis <bsd>
Component: RuntimeAssignee: Lars Vogel <Lars.Vogel>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: Lars.Vogel, loskutov, psuzzi
Version: 4.7Keywords: noteworthy
Target Milestone: 4.7 M3   
Hardware: PC   
OS: Mac OS X   
See Also: https://git.eclipse.org/r/82440
https://git.eclipse.org/r/82457
https://bugs.eclipse.org/bugs/show_bug.cgi?id=331556
https://bugs.eclipse.org/bugs/show_bug.cgi?id=331746
https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=93a5bae6eadbf056973388f4ae384b172c0aa531
https://git.eclipse.org/r/83287
https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=c89668884a8ef22a8a372abfe6a8b2e8dd5203f3
https://git.eclipse.org/r/83908
https://git.eclipse.org/c/www.eclipse.org/eclipse/news.git/commit/?id=bed5c1efb078b43069c594587abde72309a8e4d6
https://bugs.eclipse.org/bugs/show_bug.cgi?id=536077
Whiteboard:
Bug Depends on:    
Bug Blocks: 500689, 511873    

Description Brian de Alwis CLA 2016-09-01 12:08:59 EDT
We should have means to inject View Parts, Editor Parts, and Workbench Contributions.  

We would need an annotation to indicate that these classes can be injected.  We cannot inject such objects by default as they may already self-inject using another mechanism, such as Guice.  @org.eclipse.e4.di.annotations.Injectable?

I see a couple of possible solutions:

  1. Provide some hooks in the Extension Registry to allow some processing an object created by the registry.  For example, IConfigurationElement#createExecutableExtension(String attribute, IObjectProcessor processor);

  2. Hook in injection in the right places, CompatbilityView, CompatibilityEditor, etc.
Comment 1 Eclipse Genie CLA 2016-10-04 09:52:34 EDT
New Gerrit change created: https://git.eclipse.org/r/82440
Comment 2 Eclipse Genie CLA 2016-10-04 10:56:43 EDT
New Gerrit change created: https://git.eclipse.org/r/82457
Comment 3 Lars Vogel CLA 2016-10-04 11:53:38 EDT
I suggest to use this bug for views and have another one for editors.
Comment 5 Eclipse Genie CLA 2016-10-15 02:54:39 EDT
New Gerrit change created: https://git.eclipse.org/r/83287
Comment 6 Andrey Loskutov CLA 2016-10-15 02:55:43 EDT
(In reply to Eclipse Genie from comment #5)
> New Gerrit change created: https://git.eclipse.org/r/83287

This fixes compile error in the workspace
Comment 8 Eclipse Genie CLA 2016-10-26 03:23:17 EDT
New Gerrit change created: https://git.eclipse.org/r/83908