mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
revert incorrect change: BuildManager was not notified about files changes at all
This commit is contained in:
-16
@@ -89,7 +89,6 @@ public class TranslatingCompilerFilesMonitor implements ApplicationComponent {
|
||||
private final Object myDataLock = new Object();
|
||||
|
||||
private final TIntHashSet mySuspendedProjects = new TIntHashSet(); // projectId for all projects that should not be monitored
|
||||
private volatile int myWatchedProjectsCount;
|
||||
|
||||
private final TIntObjectHashMap<TIntHashSet> mySourcesToRecompile = new TIntObjectHashMap<TIntHashSet>(); // ProjectId->set of source file paths
|
||||
private PersistentHashMap<Integer, TIntObjectHashMap<Pair<Integer, Integer>>> myOutputRootsStorage; // ProjectId->map[moduleId->Pair(outputDirId, testOutputDirId)]
|
||||
@@ -196,10 +195,6 @@ public class TranslatingCompilerFilesMonitor implements ApplicationComponent {
|
||||
return;
|
||||
}
|
||||
FileUtil.createIfDoesntExist(CompilerPaths.getRebuildMarkerFile(project));
|
||||
if (myWatchedProjectsCount > 0) --myWatchedProjectsCount;
|
||||
if (ourDebugMode) {
|
||||
System.out.println("After suspend for project:"+projectId + "," + myWatchedProjectsCount);
|
||||
}
|
||||
// cleanup internal structures to free memory
|
||||
mySourcesToRecompile.remove(projectId);
|
||||
myOutputsToDelete.remove(projectId);
|
||||
@@ -222,10 +217,6 @@ public class TranslatingCompilerFilesMonitor implements ApplicationComponent {
|
||||
synchronized (myDataLock) {
|
||||
int projectId = getProjectId(project);
|
||||
mySuspendedProjects.remove(projectId);
|
||||
++myWatchedProjectsCount;
|
||||
if (ourDebugMode) {
|
||||
System.out.println("After watch for project:"+projectId + "," + myWatchedProjectsCount);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1483,7 +1474,6 @@ public class TranslatingCompilerFilesMonitor implements ApplicationComponent {
|
||||
}
|
||||
|
||||
public void beforeFileDeletion(@NotNull final VirtualFileEvent event) {
|
||||
if (myWatchedProjectsCount == 0) return;
|
||||
final VirtualFile eventFile = event.getFile();
|
||||
if ((LOG.isDebugEnabled() && eventFile.isDirectory()) || ourDebugMode) {
|
||||
final String message = "Processing file deletion: " + eventFile.getPresentableUrl();
|
||||
@@ -1623,12 +1613,6 @@ public class TranslatingCompilerFilesMonitor implements ApplicationComponent {
|
||||
}
|
||||
|
||||
private void processNewFile(final VirtualFile file, final boolean notifyServer) {
|
||||
if (ourDebugMode) {
|
||||
System.out.println("MyVfsListener.processNewFile");
|
||||
System.out.println("file = [" + file + "], notifyServer = [" + notifyServer + "]");
|
||||
System.out.println("myWatchedProjectsCount = " + myWatchedProjectsCount);
|
||||
}
|
||||
if (myWatchedProjectsCount == 0) return;
|
||||
final Ref<Boolean> isInContent = Ref.create(false);
|
||||
ApplicationManager.getApplication().runReadAction(new Runnable() {
|
||||
// need read action to ensure that the project was not disposed during the iteration over the project list
|
||||
|
||||
Reference in New Issue
Block a user