Bug 522245 - "Compare with index" shows whitespace only on one side for Java configuration
Summary: "Compare with index" shows whitespace only on one side for Java configuration
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: 4.6   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 5.3   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 543146
  Show dependency tree
 
Reported: 2017-09-13 10:17 EDT by Simeon Andreev CLA
Modified: 2019-01-18 07:00 EST (History)
3 users (show)

See Also:


Attachments
Screenshot, showing that no whitespace characters are seen for the left-side of the compare (271.85 KB, image/png)
2017-09-13 10:17 EDT, Simeon Andreev CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Simeon Andreev CLA 2017-09-13 10:17:48 EDT
Created attachment 270180 [details]
Screenshot, showing that no whitespace characters are seen for the left-side of the compare

When the "Show Whitespace Characters" option is used in a Compare, the characters are only visible for the left side of the compare.

See attached screenshot for an example.

Note that "Swap Left and Right View" will change where the characters are seen, after the Compare is re-opened. Using the option on an open Compare has no effect (until a new Compare is opened).
Comment 1 Simeon Andreev CLA 2017-09-13 10:30:43 EDT
Comparing with previous revision in git shows whitespaces only on one side, for the Java comparison. Text comparison seems to always work.
Comment 2 Simeon Andreev CLA 2017-09-13 11:11:21 EDT
Seems "Comparing with Index" from the Git staging view, editor, or comparing with index from project explorer causes the behavior.

Comparing with previous revision, head revision, or local history shows  whitespace characters on both sides of the compare.
Comment 3 Andrey Loskutov CLA 2017-09-13 11:13:44 EDT
We see this in latest EGit nightly too.
Comment 4 Thomas Wolf CLA 2017-09-17 04:30:21 EDT
This does not occur with plain text files. Looks like an issue with the JDT's org.eclipse.compare.contentMergeViewers contributions?
Comment 5 Eclipse Genie CLA 2019-01-11 06:47:43 EST
New Gerrit change created: https://git.eclipse.org/r/134955
Comment 6 Eclipse Genie CLA 2019-01-12 08:54:51 EST
Gerrit change https://git.eclipse.org/r/134955 was merged to [master].
Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=c73325de7b0236dd4c9cf87ba0f63ff00d2d42c4
Comment 7 Eclipse Genie CLA 2019-01-16 07:12:00 EST
New Gerrit change created: https://git.eclipse.org/r/135157
Comment 8 Eclipse Genie CLA 2019-01-18 07:00:38 EST
Gerrit change https://git.eclipse.org/r/135157 was merged to [master].
Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=c8496534cbb51db58b5e73b45c0e6003f82f2622