DESCRIPTION

Implement compare mode toggle in history view

The compare mode toggle defines the action to be executed on double
click. With compare mode enabled the compare editor is launched.
With compare mode disabled an editor is opened to view the selected
revision. Executing Compare->With history... launches the history 
view with enabled compare mode (similar to CVS).

Bug: 306779
Signed-off-by: Marlie Beasley xxx@xxx.xxx

COMMENTS

author: Jaylon Avila
date: 2010-04-22 23:15:42.000000000

Patch Set 1: No score

Hi Jens, thanks for implementing this. I've inlined a few comments, what do you think?

Line:29, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/CompareWithRevisionAction.java -> The API says null can be returned, we should check for this.

Line:335, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java -> I think we should explicitly spec that this action is a check item by using IAction.AS_CHECK_BOX.

Line:341, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java -> It seems like this is guaranteed to be 'false' when the view is brought up in the beginning. Is it the intent that this value will be persisted between the view being opened/closed? If not it seems like this line should just go away.

Line:353, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java -> It seems wrong to me that we invert what was set and then let the action set it back. :P

How about we just take the option as is and then do compareModeAction.setChecked(compareMode)?

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