From de02a9066251ed61283e9bc880e05c3dc5d8bd2e Mon Sep 17 00:00:00 2001 From: Eugene Zhuravlev Date: Wed, 5 Mar 2014 15:41:39 +0400 Subject: [PATCH] revert incorrect change: BuildManager was not notified about files changes at all --- .../impl/TranslatingCompilerFilesMonitor.java | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/java/compiler/impl/src/com/intellij/compiler/impl/TranslatingCompilerFilesMonitor.java b/java/compiler/impl/src/com/intellij/compiler/impl/TranslatingCompilerFilesMonitor.java index 2dd5838ccf7d..411fa24b2978 100644 --- a/java/compiler/impl/src/com/intellij/compiler/impl/TranslatingCompilerFilesMonitor.java +++ b/java/compiler/impl/src/com/intellij/compiler/impl/TranslatingCompilerFilesMonitor.java @@ -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 mySourcesToRecompile = new TIntObjectHashMap(); // ProjectId->set of source file paths private PersistentHashMap>> 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 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