Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 312780 - Be e4 ready
Summary: Be e4 ready
Status: VERIFIED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: 0.7.1   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Matthias Sohn CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 319287
Blocks:
  Show dependency tree
 
Reported: 2010-05-13 08:55 EDT by Chris Aniszczyk CLA
Modified: 2012-12-21 05:22 EST (History)
7 users (show)

See Also:


Attachments
Example how the project Import is refactored to run without UI-Dependencies (99.40 KB, application/zip)
2010-05-21 03:11 EDT, Thomas Schindl CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Aniszczyk CLA 2010-05-13 08:55:22 EDT
Eclipse will be launching an 'e4 ready' campaign soon. To be e4 ready, we have to ensure we use APIs whenever possible and avoid internals. On top of that, we should attempt to structure our code in a way that it can run on both pure e4 and the old Eclipse 3.x line.

We should keep this bug as a high level goal and attach any bugs that represent work to it. The goal in the end is to have EGit work with e4 flawlessly.
Comment 1 Remy Suen CLA 2010-05-13 09:42:46 EDT
From my experimenting from April, there doesn't appear to be any compiler errors anyway.

As we are "rewriting" the code in org.eclipse.ui.workbench, please avoid using internals from the org.eclipse.ui.workbench at all costs. Admittedly, none were found during Matthias's pass from bug 310933.

Please do not hesitate to CC me on any bugs org.eclipse.ui.workbench or org.eclipse.ui.ide that you encounter when testing against the 4.0 SDK.
Comment 2 Thomas Schindl CLA 2010-05-20 10:28:24 EDT
I'm happy to work with you on this - I'll give you input on this in the next few days.
Comment 3 Thomas Schindl CLA 2010-05-21 03:11:21 EDT
Created attachment 169476 [details]
Example how the project Import is refactored to run without UI-Dependencies

Here are some initial thoughts and action items one can get from them:
* All UI code is in 1 Bundle
* There are a lot of statics used e.g. to Log, Report Status, ... (Activator.*)

I think what we should start with is:
* Get rid of the static calls and replace them with proper Services passed
* Split the UI-Bundle in 2:
  * org.eclipse.egit.ui: Generic UI-Code 
     - without dependencies on org.eclipse.ui.*
     - with dependencies on org.eclipse.core.*
  * org.eclipse.egit.ui.ide3: Code to integrate into 3.x SDK and 4.x SDK

(This it the art of single sourceing for 3.x/4.x/e4 :-)

Probably using some DI-Technology might be nice thing (though not really necessary) to use. 

I currently see 2 candidates when it comes to DI:
* Guice
* e4-DI

where both of them have advantages/disadvantages so I think deferring this decision a bit is a good thing. P

robably the people who are working on the UI-Code should get added to this bug Chris, I might have time to work with you/them on some initial code but don't have any cycles to really drive this.
Comment 4 Chris Aniszczyk CLA 2010-07-29 10:35:19 EDT
With commit 58fa0e8351ebdc2a2c722201cb7d389ff9f0e612 we depend less on Team UI internals now... 

one step at a time...
Comment 5 Mathias Kinzler CLA 2011-03-18 10:44:13 EDT
I believe we are clean with respect to internals now.
Comment 6 Mykola Nikishov CLA 2012-03-03 11:12:39 EST
[Batch change] Remove passed Target Milestones

If anyone on CC list is going to fix/implement this, feel free to assign a new, post-1.3/2.0, target milestone.
Comment 7 Lars Vogel CLA 2012-11-13 15:32:24 EST
AFAIK this is solved in Eclipse 4.2.1.
Comment 8 Matthias Sohn CLA 2012-12-21 05:22:17 EST
true this is fixed since a while