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>