Bug 530209 - IResourceDelta for file mode change
Summary: IResourceDelta for file mode change
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 4.8   Edit
Hardware: PC Mac OS X
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-Resources-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-23 15:33 EST by Matthias Sohn CLA
Modified: 2018-01-23 17:05 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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