use of com.intellij.openapi.vcs.FileStatusListener in project intellij-community by JetBrains.
the class FileStatusManagerImpl method fileStatusChanged.
@Override
public void fileStatusChanged(final VirtualFile file) {
final Application application = ApplicationManager.getApplication();
if (!application.isDispatchThread() && !application.isUnitTestMode()) {
ApplicationManager.getApplication().invokeLater(new DumbAwareRunnable() {
@Override
public void run() {
fileStatusChanged(file);
}
});
return;
}
if (file == null || !file.isValid())
return;
FileStatus cachedStatus = getCachedStatus(file);
if (cachedStatus == FileStatusNull.INSTANCE) {
return;
}
if (cachedStatus == null) {
cacheChangedFileStatus(file, FileStatusNull.INSTANCE);
return;
}
FileStatus newStatus = calcStatus(file);
if (cachedStatus == newStatus)
return;
cacheChangedFileStatus(file, newStatus);
for (FileStatusListener listener : myListeners) {
listener.fileStatusChanged(file);
}
}
use of com.intellij.openapi.vcs.FileStatusListener in project intellij-community by JetBrains.
the class FileStatusManagerImpl method fileStatusesChanged.
@Override
public void fileStatusesChanged() {
if (myProject.isDisposed()) {
return;
}
if (!ApplicationManager.getApplication().isDispatchThread()) {
ApplicationManager.getApplication().invokeLater(new DumbAwareRunnable() {
@Override
public void run() {
fileStatusesChanged();
}
}, ModalityState.NON_MODAL);
return;
}
myCachedStatuses.clear();
myWhetherExactlyParentToChanged.clear();
for (FileStatusListener listener : myListeners) {
listener.fileStatusesChanged();
}
}
Aggregations