DESCRIPTION

Handle symlink icon in staging view

Handle symlink icon (blue arrow in top right corner) in staging view for
unstaged and staged changes.

Bug: 429302
Change-Id: I81816ad99685dd20baa284a156859461091aafc3
Signed-off-by: Karter Mora xxx@xxx.xxx


COMMENTS

author: Rylee Bush
date: 2014-10-22 08:54:05.000000000

Uploaded patch set 4.

-------------------------------------
author: Brenden Conley
date: 2014-10-22 08:54:11.000000000

Patch Set 4:

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

-------------------------------------
author: Brenden Conley
date: 2014-10-22 09:09:09.000000000

Patch Set 4: Verified+1

Build Successful 

https://hudson.eclipse.org/egit/job/egit.gerrit/6427/ : SUCCESS

-------------------------------------
author: Danika Greer
date: 2014-10-26 05:07:26.000000000

Patch Set 4:

It just occurred to me that maybe instead of calculating this for the staging view, we could store it in JGit's IndexDiff (where the information is already available, using dirCacheIterator.getEntryFileMode or the same on workingTreeIterator). And then just pass it through to EGit's IndexDiffData.

What do others think?

-------------------------------------
author: Douglas Trujillo
date: 2014-10-27 20:41:15.000000000

Patch Set 4: Code-Review-1

(5 comments)

I think we should cache symlinks (and maybe also submodule entries) in IndexDiffData since typically there are only a few (or none) and running another walk to find them could be avoided. In order to enable this in an efficient way we could add the following method to IndexDiff

 Set<String> getPathsWithIndexMode(FileMode mode)

which IndexDiffData could use to retrieve symlink and submodule entries from the DirCache. This method should respect IndexDiffFilters so that we don't spoil the incremental updates supported by IndexDiffData triggered by resourceChangedEvents.

Looks like some change events are missed in staging view when deleting symlinks.

When deleting a symlink referring to a directory the deletion isn't automatically staged which looks inconsistent compared to the deletion of a symlink referring to a file which is staged automatically.

Line:432, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingViewContentProvider.java -> this is unnecessary as boolean defaults to false

Line:446, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingViewContentProvider.java -> why this catch all ?

Line:41, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingViewLabelProvider.java -> This icon doesn't exist your change has /icons/ovr/symlink_ovr.gif but no png.

So far we manage all image descriptors in org.eclipse.egit.ui.internal.UIIcons

Line:101, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingViewLabelProvider.java -> style nit: we don't use braces around single line blocks

Line:102, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingViewLabelProvider.java -> this is ok if the target of the symlink is a file, if the target is a directory we should use a decorated directory icon

-------------------------------------
author: Rylee Bush
date: 2014-11-05 08:42:23.000000000

Patch Set 4:

(5 comments)

Line:432, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingViewContentProvider.java -> Done

Line:446, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingViewContentProvider.java -> Done

Line:41, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingViewLabelProvider.java -> Done

Line:101, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingViewLabelProvider.java -> Done

Line:102, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingViewLabelProvider.java -> Done

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