diff options
author | Robin Stocker | 2014-11-18 13:35:12 +0000 |
---|---|---|
committer | Matthias Sohn | 2014-12-01 14:19:15 +0000 |
commit | cb3c54a9fc3ed7883ff8ef27169192cb8e60c888 (patch) | |
tree | 99495614867294377fda6a9e5085f17ceb76c080 | |
parent | 0c4bf7ab1a71230e1a8a6d6eda7cd6d3aef2d31f (diff) | |
download | egit-cb3c54a9fc3ed7883ff8ef27169192cb8e60c888.tar.gz egit-cb3c54a9fc3ed7883ff8ef27169192cb8e60c888.tar.xz egit-cb3c54a9fc3ed7883ff8ef27169192cb8e60c888.zip |
[historyView] Show name and email on hover of author/committer column
Change-Id: I430857cfafe72942b045d06dcdc6fee0259c0c52
Signed-off-by: Robin Stocker <robin@nibor.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r-- | org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitGraphTableHoverManager.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitGraphTableHoverManager.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitGraphTableHoverManager.java index 283b8b249d..c6e8d02d00 100644 --- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitGraphTableHoverManager.java +++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitGraphTableHoverManager.java @@ -71,8 +71,12 @@ class CommitGraphTableHoverManager extends switch (columnIndex) { case 1: return computeInformationForRef(commit, cell, e); + case 2: + return computeInformationForName(commit.getAuthorIdent(), cell); case 3: return computeInformationForDate(commit.getAuthorIdent(), cell); + case 4: + return computeInformationForName(commit.getCommitterIdent(), cell); case 5: return computeInformationForDate(commit.getCommitterIdent(), cell); } @@ -102,6 +106,13 @@ class CommitGraphTableHoverManager extends return null; } + private Information computeInformationForName(PersonIdent ident, + ViewerCell cell) { + String nameWithEmail = ident.getName() + + " <" + ident.getEmailAddress() + ">"; //$NON-NLS-1$ //$NON-NLS-2$ + return new Information(nameWithEmail, cell.getBounds()); + } + private Information computeInformationForDate(PersonIdent ident, ViewerCell cell) { String formattedDate = dateFormatter.formatDate(ident); |