Update index diff cache after replace with head in staging view
commit6bfda202aefcc22e3a1e77f02f46b8f96566d24f
authorThomas Wolf <thomas.wolf@paranor.ch>
Tue, 10 Nov 2015 05:56:42 +0000 (10 06:56 +0100)
committerAndrey Loskutov <loskutov@gmx.de>
Fri, 13 Nov 2015 22:08:03 +0000 (13 23:08 +0100)
tree8dff923a6c43cd976ff82ac7adc9ddc44a1f2a58
parent75e103e278cbbd303b0bae6e67f5eb50ca1268e5
Update index diff cache after replace with head in staging view

The IndexDiffCache relies on IResourceChangeEvents to update itself
on unstaged changes. However, when "Replace With HEAD" is invoked in
the staging view on an unstaged file that doesn't belong to an open
project, there are no IResourceChangeEvents, and since the file is
unstaged, there is no IndexChangeEvent either. So we need to trigger
one explicitly.

Moved two methods that were used only inside ReplaceAction into that
inner class, added computation of files not accessible through the
workspace, and trigger an explicit IndexDiffCache update for those.

Bug: 481683
Change-Id: Ic2af88a787ef8cf1612181ec4e1525b24dd00061
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java