From d2acb0cc7d3cf95dd796b09d6160ff0d7051b6d9 Mon Sep 17 00:00:00 2001 From: nik Date: Wed, 20 Aug 2014 17:09:24 +0400 Subject: [PATCH] print registry values changed by user to idea.log --- .../openapi/util/registry/RegistryState.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/platform/platform-api/src/com/intellij/openapi/util/registry/RegistryState.java b/platform/platform-api/src/com/intellij/openapi/util/registry/RegistryState.java index 7a6c15ef495f..cf10656a24ed 100644 --- a/platform/platform-api/src/com/intellij/openapi/util/registry/RegistryState.java +++ b/platform/platform-api/src/com/intellij/openapi/util/registry/RegistryState.java @@ -16,9 +16,14 @@ package com.intellij.openapi.util.registry; import com.intellij.openapi.components.*; +import com.intellij.openapi.diagnostic.Logger; import org.jdom.Element; import org.jetbrains.annotations.NotNull; +import java.util.Map; +import java.util.SortedMap; +import java.util.TreeMap; + @State( name = "Registry", storages = { @@ -26,6 +31,7 @@ import org.jetbrains.annotations.NotNull; file = StoragePathMacros.APP_CONFIG + "/other.xml")} ) public class RegistryState implements BaseComponent, PersistentStateComponent { + private static final Logger LOG = Logger.getInstance(RegistryState.class); public RegistryState() { } @@ -36,6 +42,14 @@ public class RegistryState implements BaseComponent, PersistentStateComponent userProperties = new TreeMap(Registry.getInstance().getUserProperties()); + userProperties.remove("ide.firstStartup"); + if (!userProperties.isEmpty()) { + LOG.info("Registry values changed by user:"); + for (Map.Entry entry : userProperties.entrySet()) { + LOG.info(" " + entry.getKey() + " = " + entry.getValue()); + } + } } @NotNull