Ensure IProjects are not refreshed via IFile handles
As it turns out a WorkingTreeModifiedEvent may contain directories
without trailing slashes. EGit refreshes files as IFiles. In some
cases, it would thus try to refresh a folder via an IFile. When such
a folder is a nested project, Eclipse may detect the aliased project
and will then raise an IAE if the refresh occurs via an IFile because
projects have only one path segment, but files need at least two.
Avoid this when we calculate which resources to refresh given the set
of paths modified by a git operation: check up-front whether the path
corresponds to a known project, and if so, refresh it via IProject.
Bug: 536880
Change-Id: I26cadec224852f4dc53187cc1103a511db78f370
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>