From 677c538e45511f70b7d786caa4cf5fe1f960ae81 Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Fri, 11 Jan 2013 13:44:35 +0100 Subject: [PATCH] IDEA-96456 (postpone automake till project is fully loaded to avoid disk contention) --- .../src/com/intellij/compiler/server/BuildManager.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/java/compiler/impl/src/com/intellij/compiler/server/BuildManager.java b/java/compiler/impl/src/com/intellij/compiler/server/BuildManager.java index a819b47121bd..59e1cc8cdd98 100644 --- a/java/compiler/impl/src/com/intellij/compiler/server/BuildManager.java +++ b/java/compiler/impl/src/com/intellij/compiler/server/BuildManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2013 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -51,6 +51,7 @@ import com.intellij.openapi.roots.ModuleRootAdapter; import com.intellij.openapi.roots.ModuleRootEvent; import com.intellij.openapi.roots.ModuleRootManager; import com.intellij.openapi.roots.ProjectRootManager; +import com.intellij.openapi.startup.StartupManager; import com.intellij.openapi.util.Disposer; import com.intellij.openapi.util.Key; import com.intellij.openapi.util.ShutDownTracker; @@ -1021,7 +1022,12 @@ public class BuildManager implements ApplicationComponent{ myProjectDataMap.remove(projectPath); } }); - scheduleAutoMake(); // run automake on project opening + StartupManager.getInstance(project).registerPostStartupActivity(new Runnable() { + @Override + public void run() { + scheduleAutoMake(); // run automake after project opened + } + }); } @Override