Bug 506606

Summary: render green background for hunks of new content and red background for hunks of old content
Product: [Eclipse Project] Platform Reporter: Matthias Sohn <matthias.sohn>
Component: CompareAssignee: Platform-Compare-Inbox <platform-compare-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: gautier.desaintmartinlacaze, malaperle, marc.khouzam, mistria, pascal
Version: 4.7Keywords: bugday, helpwanted
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Matthias Sohn CLA 2016-10-27 05:37:04 EDT
I learnt at Lars' talk at EclipseCon EU that in Oxygen you can flip sides of the content shown in compare editor. Changing the default to show the new content on the right side could confuse experienced Eclipse users which are used to find the new content in the left pane.

I propose to fix this problem by rendering a green background for diff hunks in the new content pane and a red background in the old content pane. This is done in many other diff views like e.g. in Gerrit
https://gerrit-review.googlesource.com/c/90045/1/gerrit-common/src/main/java/com/google/gerrit/common/data/LabelType.java
so this should help users to understand which side is the new content
Comment 1 Matthias Sohn CLA 2016-10-27 05:39:04 EDT
if you agree to this proposal and guide me to the classes I need to touch I could consider to contribute a patch for this
Comment 2 Gautier de SAINT MARTIN LACAZE CLA 2016-10-27 08:58:50 EDT
I think it's a really good idea.
Comment 3 Pascal Rapicault CLA 2016-10-27 10:25:52 EDT
The swap side feature is a global toggle that is persisted across restart and across editors. From, the way it works at the moment, the intent is to give users the ability to have Eclipse behave like other compare editors that he/she would be more familiar with. Basically this is something the user would do once for all.

Because of this, I don't think it is necessary to do anything fancier, or funnier that could IMO make the reading of the code harder. If we thought users would keep on swapping back and forth, then I think we should really worry about bugs like #505910.