DESCRIPTION

Make the staging view use the IndexDiffCache

This makes the staging view no longer use a separate "Staging view
indexer job", but rather uses the already existent IndexDiffCacheEntry
for the selected repository.

Change-Id: Ia2ed34f57e4639fd086b65ce421dfc7613f93f57
Signed-off-by: Douglas Trujillo xxx@xxx.xxx

COMMENTS

author: Douglas Trujillo
date: 2012-03-12 08:31:21.000000000

Uploaded patch set 7.

-------------------------------------
author: Brenden Conley
date: 2012-03-12 08:45:42.000000000

Patch Set 7:

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

-------------------------------------
author: Brenden Conley
date: 2012-03-12 09:02:02.000000000

Patch Set 7: Verified

Build Successful 
 
https://hudson.eclipse.org/sandbox/job/egit.gerrit/2625/ : SUCCESS

-------------------------------------
author: Douglas Trujillo
date: 2012-03-12 12:52:44.000000000

Patch Set 7: Looks good to me, but someone else must approve; IP review completed

- rebased
- waiting for Jens to also review this change

-------------------------------------
author: Marlie Beasley
date: 2012-03-13 14:38:31.000000000

Patch Set 7: I would prefer that you didn't submit this

(3 inline comments)

A remark on the refresh action: it might happen that a cached IndexDiff is not up to data. There is  a method refresh in class IndexDiffCacheEntry.
I think refreshAction.run should just call IndexDiffCacheEntry.refresh to trigger a complete recalculation of the IndexDiff.

Line:542, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java -> IndexDiffCacheEntry also listens to ResourceChangeEvents, performs an update of IndexDiffData and notifies the IndexDiffChangedListeners. Thus I think you can remove the resource change listener in StagingView because StagingView will be notified about a updated IndexDiffData caused by a resource change event.

Line:1100, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java -> check for null

Line:1125, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java -> The returned IndexDiffData can be null.This can occur if the very first calculation of IndexDiffData is still running.

-------------------------------------
author: Bryanna Douglas
date: 2012-03-13 15:28:48.000000000

Patch Set 7: (3 inline comments)

ok, i also changed the refresh action to trigger a complete recalculation of the index diff :) it's hard to get the index diff cache out of sync, but i can verify that at least a complete calculation starts if i press the button ;)

Line:542, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java -> yep, you're right - i removed it and it seems to work just as well.

Line:1100, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java -> done, i guess it /is/ enough to just return in the null case?

Line:1125, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java -> ok, null handled in the reload() method.

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