mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Trying to use LocalFileSystemImpl in upsource
This commit is contained in:
@@ -110,9 +110,16 @@ public class RefreshSessionImpl extends RefreshSession {
|
||||
boolean haveEventsToFire = myFinishRunnable != null || !myEvents.isEmpty();
|
||||
|
||||
if (!workQueue.isEmpty()) {
|
||||
LocalFileSystemImpl fs = (LocalFileSystemImpl)LocalFileSystem.getInstance();
|
||||
fs.markSuspiciousFilesDirty(workQueue);
|
||||
FileWatcher watcher = fs.getFileWatcher();
|
||||
final LocalFileSystem fileSystem = LocalFileSystem.getInstance();
|
||||
final FileWatcher watcher;
|
||||
if (fileSystem instanceof LocalFileSystemImpl) {
|
||||
LocalFileSystemImpl fs = (LocalFileSystemImpl)fileSystem;
|
||||
fs.markSuspiciousFilesDirty(workQueue);
|
||||
watcher = fs.getFileWatcher();
|
||||
}
|
||||
else {
|
||||
watcher = null;
|
||||
}
|
||||
|
||||
long t = 0;
|
||||
if (LOG.isDebugEnabled()) {
|
||||
@@ -124,7 +131,7 @@ public class RefreshSessionImpl extends RefreshSession {
|
||||
if (myCancelled) break;
|
||||
|
||||
NewVirtualFile nvf = (NewVirtualFile)file;
|
||||
if (!myIsRecursive && (!myIsAsync || !watcher.isWatched(nvf))) {
|
||||
if (!myIsRecursive && (!myIsAsync || (watcher != null && !watcher.isWatched(nvf)))) {
|
||||
// we're unable to definitely refresh synchronously by means of file watcher.
|
||||
nvf.markDirty();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user