in src/com/intellij/vssSupport/VFSListener.java [120:149]
public void beforePropertyChange(@NotNull VirtualFilePropertyEvent event )
{
VirtualFile file = event.getFile();
// In the case of multi-vcs project configurations, we need to skip all
// notifications on non-owned files
if( !VcsUtil.isFileForVcs( file, project, host ))
return;
if( event.getPropertyName().equals( VirtualFile.PROP_WRITABLE ))
{
// On every change of the "Writable" property clear the cache of the
// content revisions. This will make possible to reread the correct
// version content after series of checkins/checkouts.
ContentRevisionFactory.clearCacheForFile( file.getPath() );
}
else
if( event.getPropertyName().equals( VirtualFile.PROP_NAME ))
{
FileStatus status = FileStatusManager.getInstance( project ).getStatus( file );
if( status != FileStatus.ADDED && status != FileStatus.UNKNOWN && status != FileStatus.IGNORED )
{
String parentDir = file.getParent().getPath() + "/";
String oldName = parentDir + event.getOldValue();
String newName = parentDir + event.getNewValue();
performRename( file.isDirectory() ? host.renamedFolders : host.renamedFiles, oldName, newName );
}
}
}