From 6cccdfd80ca00ae32b5ceed6eeea19a9a2de9704 Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Mon, 19 Mar 2012 17:47:17 +0100 Subject: [PATCH] Don't load focus killer in headless mode; cleanup --- .../platform-main/src/com/intellij/idea/MainImpl.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/platform/platform-main/src/com/intellij/idea/MainImpl.java b/platform/platform-main/src/com/intellij/idea/MainImpl.java index bd1dfa8060df..7b204d186375 100644 --- a/platform/platform-main/src/com/intellij/idea/MainImpl.java +++ b/platform/platform-main/src/com/intellij/idea/MainImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2011 JetBrains s.r.o. + * Copyright 2000-2012 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. @@ -35,9 +35,8 @@ public class MainImpl { private MainImpl() { } /** - * Is called from PluginManager via reflection. + * Called from PluginManager via reflection. */ - @SuppressWarnings("UnusedDeclaration") protected static void start(final String[] args) { if (System.getProperty("idea.platform.prefix") == null) { System.setProperty("idea.platform.prefix", "Idea"); @@ -66,8 +65,7 @@ public class MainImpl { Runtime.getRuntime().addShutdownHook(new Thread("Shutdown hook - logging") { public void run() { - LOG.info( - "------------------------------------------------------ IDE SHUTDOWN ------------------------------------------------------"); + LOG.info("------------------------------------------------------ IDE SHUTDOWN ------------------------------------------------------"); } }); LOG.info("------------------------------------------------------ IDE STARTED ------------------------------------------------------"); @@ -86,7 +84,7 @@ public class MainImpl { // http://weblogs.java.net/blog/shan_man/archive/2005/06/improved_drag_g.html System.setProperty("sun.swing.enableImprovedDragGesture", ""); - if (SystemInfo.isWindows && !SystemInfo.isWindows9x) { + if (SystemInfo.isWindows && !SystemInfo.isWindows9x && !StartupUtil.isHeadless) { final Logger LOG = Logger.getInstance(LOG_CATEGORY); try { if (SystemInfo.isAMD64) {