check all open projects for auto-make start

don't get just one random project from invalid data context (IDEA-203645 Hang on project open)
This commit is contained in:
peter
2018-12-05 16:58:14 +01:00
parent be994559b2
commit 33448516fa
@@ -272,9 +272,6 @@ public class BuildManager implements Disposable {
return false;
}
Project project = null;
ProjectFileIndex fileIndex = null;
for (VFileEvent event : events) {
final VirtualFile eventFile = event.getFile();
if (eventFile == null) {
@@ -284,16 +281,8 @@ public class BuildManager implements Disposable {
return true; // should be deleted
}
if (project == null) {
// lazy init
project = getCurrentContextProject();
if (project == null) {
return false;
}
fileIndex = ProjectRootManager.getInstance(project).getFileIndex();
}
if (fileIndex.isInContent(eventFile)) {
Project project = ProjectLocator.getInstance().guessProjectForFile(eventFile);
if (project != null) {
if (ProjectUtil.isProjectOrWorkspaceFile(eventFile) || GeneratedSourcesFilter.isGeneratedSourceByAnyFilter(eventFile, project)) {
// changes in project files or generated stuff should not trigger auto-make
continue;