Bug 530209

Summary: IResourceDelta for file mode change
Product: [Eclipse Project] Platform Reporter: Matthias Sohn <matthias.sohn>
Component: ResourcesAssignee: Platform-Resources-Inbox <platform-resources-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: loskutov
Version: 4.8   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=109979
Whiteboard:

Description Matthias Sohn CLA 2018-01-23 15:33:48 EST
There seems to be no way to get an event via IResourceDelta if a file's mode is changed  e.g. by setting the executable bit. Therefore EGit cannot recognize that a file's mode has changed and update the git staging view accordingly to display the modification.

Could this be supported by IResourceDelta ?

See the discussion in
https://www.eclipse.org/forums/index.php/t/1090888/
Comment 1 Andrey Loskutov CLA 2018-01-23 15:44:36 EST
See bug 109979 and /org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/FileSystemResourceManager.java.

Currently we refresh only on folders.

Matthias, do you need new delta flag I guess?
Comment 2 Matthias Sohn CLA 2018-01-23 17:05:21 EST
Yes. 

I need a new delta flag MODE_CHANGED which should be set and a corresponding IResourceChangedEvent should be fired when the unix file mode of a file changes. I would add this to the GitResourceDeltaVisitor.INTERESTING_CHANGES mask [1] to auto-update the IndexDiffCacheEntry which represents the git status shown by git resource decorators and in the staging view.

[1] https://git.eclipse.org/r/plugins/gitiles/egit/egit/+/refs/heads/master/org.eclipse.egit.core/src/org/eclipse/egit/core/internal/indexdiff/GitResourceDeltaVisitor.java#43