Bug 500688 - [DI] Provide dependency injection for 3.x API views
Summary: [DI] Provide dependency injection for 3.x API views
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Runtime (show other bugs)
Version: 4.7   Edit
Hardware: PC Mac OS X
: P3 enhancement (vote)
Target Milestone: 4.7 M3   Edit
Assignee: Lars Vogel CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks: 500689 511873
  Show dependency tree
 
Reported: 2016-09-01 12:08 EDT by Brian de Alwis CLA
Modified: 2018-06-20 04:49 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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