IDEA-131108 com.intellij.util.ui.Animator doesn't work in Welcome Wizard (where there...
authorVassiliy.Kudryashov <Vassiliy.Kudryashov@jetbrains.com>
Tue, 14 Oct 2014 13:15:01 +0000 (17:15 +0400)
committerVassiliy.Kudryashov <Vassiliy.Kudryashov@jetbrains.com>
Tue, 14 Oct 2014 13:15:19 +0000 (17:15 +0400)
platform/platform-api/src/com/intellij/util/ui/Animator.java

index 9ed2124e3b8d1736ddab5fd8c6a7cf7648b01e93..5d8a92bf72b27484b5b9f607f3698adcacf37e6a 100644 (file)
@@ -23,6 +23,7 @@ import com.intellij.util.ConcurrencyUtil;
 import org.jetbrains.annotations.NonNls;
 
 import javax.swing.*;
+import java.awt.*;
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.ScheduledFuture;
 import java.util.concurrent.TimeUnit;
@@ -164,6 +165,9 @@ public abstract class Animator implements Disposable {
   }
 
   private static boolean skipAnimation() {
+    if (GraphicsEnvironment.isHeadless()) {
+      return true;
+    }
     Application app = ApplicationManager.getApplication();
     return app != null && app.isUnitTestMode();
   }