DESCRIPTION

[historyView] Get selection from ExecutionEvent instead of active part

Instead of getting the selection from the currently active part, get it
from the event. This is more reliable, as the active part can change.

This change also adds getSelectedCommitId and getSelectedCommit methods
to the base class for convenience.

Bug: 432751
Change-Id: Ida69c252df5a1e3176bba3f3398cd9fcb8864b05
Signed-off-by: Danika Greer xxx@xxx.xxx


COMMENTS

author: Danika Greer
date: 2014-04-17 14:34:54.000000000

Uploaded patch set 3.

-------------------------------------
author: Brenden Conley
date: 2014-04-17 14:34:59.000000000

Patch Set 3:

Build Started https://hudson.eclipse.org/egit/job/egit.gerrit/5738/

-------------------------------------
author: Brenden Conley
date: 2014-04-17 14:51:07.000000000

Patch Set 3: Verified+1

Build Successful 

https://hudson.eclipse.org/egit/job/egit.gerrit/5738/ : SUCCESS

-------------------------------------
author: Kaeden Tapia
date: 2014-04-17 22:30:22.000000000

Patch Set 3: Code-Review+1

I tested the patch and it still fixes the problem for me.

-------------------------------------
author: Kaden Henson
date: 2014-04-18 13:57:54.000000000

Patch Set 3:

(5 comments)

Line:196, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/AbstractHistoryCommandHandler.java -> This should behave the same as getSelectedCommit when multiple commits are selected

Line:211, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/AbstractHistoryCommandHandler.java -> Some callers of this method previously used the first selected element. I think being less graceful wrt. multiple selected commits here is okay. Maybe we can throw a more specific error message in that case, stating that the operation is not supported for multiple commits.

Line:289, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/AbstractHistoryCommandHandler.java -> page -> selection

Line:20, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties -> maybe ".. the selected commit"

Line:30, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/SetQuickdiffBaselineHandler.java -> baseline cannot be null

-------------------------------------
author: Danika Greer
date: 2014-04-18 15:14:27.000000000

Patch Set 3:

(5 comments)

Line:196, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/AbstractHistoryCommandHandler.java -> Done

Line:211, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/AbstractHistoryCommandHandler.java -> I changed the message to reflect this.

Line:289, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/AbstractHistoryCommandHandler.java -> Thanks, done.

Line:20, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties -> It's different in the newest patch set.

Line:30, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/SetQuickdiffBaselineHandler.java -> Done

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