From d4268f4b3d98084bc6ffd6d020705a9ffc9c06f9 Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Fri, 30 Dec 2016 15:51:45 +0100 Subject: [PATCH] =?UTF-8?q?DoNotSaveDefaults.kt=20=E2=80=94=20exlude=20dim?= =?UTF-8?q?ensions.xml=20(non-roamable=20sizes=20of=20window,=20dialogs,?= =?UTF-8?q?=20etc.)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../configuration-store-impl/testSrc/DoNotSaveDefaults.kt | 1 + .../src/com/intellij/openapi/util/DimensionService.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/platform/configuration-store-impl/testSrc/DoNotSaveDefaults.kt b/platform/configuration-store-impl/testSrc/DoNotSaveDefaults.kt index 580644fdeff6..b0103d733490 100644 --- a/platform/configuration-store-impl/testSrc/DoNotSaveDefaults.kt +++ b/platform/configuration-store-impl/testSrc/DoNotSaveDefaults.kt @@ -63,6 +63,7 @@ class DoNotSaveDefaultsTest { "feature.usage.statistics.xml" /* non-roamable usage counters */, "tomee.extensions.xml", "jboss.extensions.xml", "glassfish.extensions.xml" /* javaee non-roamable stuff, it will be better to fix it */, "diff.xml" /* IDEA-166058 */, + "dimensions.xml" /* non-roamable sizes of window, dialogs, etc. */, "debugger.renderers.xml", "debugger.xml" /* todo */ )) println(directoryTree) diff --git a/platform/platform-api/src/com/intellij/openapi/util/DimensionService.java b/platform/platform-api/src/com/intellij/openapi/util/DimensionService.java index b3e21c16d15a..d35c060f8b81 100644 --- a/platform/platform-api/src/com/intellij/openapi/util/DimensionService.java +++ b/platform/platform-api/src/com/intellij/openapi/util/DimensionService.java @@ -280,7 +280,7 @@ public class DimensionService implements PersistentStateComponent { private static Pair keyPair(String key, @Nullable Project project) { GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment(); if (env.isHeadlessInstance()) { - return new Pair(key + ".headless", 1f); + return new Pair<>(key + ".headless", 1f); } JFrame frame = null; final Component owner = IdeFocusManager.findInstance().getFocusOwner(); @@ -323,6 +323,6 @@ public class DimensionService implements PersistentStateComponent { int dpi = ((int)(96 * JBUI.pixScale(gd))); realKey += "@" + dpi + "dpi"; } - return new Pair(realKey, scale); + return new Pair<>(realKey, scale); } }