DESCRIPTION

[historyView] Ref shortening with "..." can be longer than original

Also count the "..." for the max ref length. To compensate for
shortening more than before, increase the default max length to 18.

Before: "origin/stable-3..."
After:  "origin/stable-3.3"

Bug: 428201
Change-Id: I5a79b98902268f445355aa60f7747f0d448bd259
Signed-off-by: Danika Greer xxx@xxx.xxx


COMMENTS

author: Juliet Cantu
date: 2014-02-14 22:52:42.000000000

Patch Set 1: Code-Review+1

(1 comment)

Line:218, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/SWTPlotRenderer.java -> In the history view those three dots are roughly two average characters wide. In a fixed-width font they are one character wide. This is because we use … rather than ...

-------------------------------------
author: Danika Greer
date: 2014-02-16 17:20:01.000000000

Patch Set 1:

(1 comment)

Line:218, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/SWTPlotRenderer.java -> Yes, you're right, it depends on the characters/font. I chose 3 because "…" can replace "lll" or "iii", so 3 characters looks like the worst case. The goal is that the ellipsized text is not longer than the non-ellipsized, so I think using the worst case is ok here.

To do this correctly, we would probably have to render the text and measure its length. Certain toolkits provide ellipsize functionality (e.g. Gtk+ through Pango), but I don't think SWT exposes this.

-------------------------------------
author: Juliet Cantu
date: 2014-02-16 19:14:17.000000000

Patch Set 1: Code-Review+2 IP-Clean+1

-------------------------------------
author: Juliet Cantu
date: 2014-02-16 19:17:05.000000000

Patch Set 2: Patch Set 1 was rebased

-------------------------------------
