Bug 506606 - render green background for hunks of new content and red background for hunks of old content
Summary: render green background for hunks of new content and red background for hunks...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Compare (show other bugs)
Version: 4.7   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-Compare-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday, helpwanted
Depends on:
Blocks:
 
Reported: 2016-10-27 05:37 EDT by Matthias Sohn CLA
Modified: 2016-10-27 10:25 EDT (History)
5 users (show)

See Also:


Attachments

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