mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
print registry values changed by user to idea.log
This commit is contained in:
@@ -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<Element> {
|
||||
private static final Logger LOG = Logger.getInstance(RegistryState.class);
|
||||
|
||||
public RegistryState() {
|
||||
}
|
||||
@@ -36,6 +42,14 @@ public class RegistryState implements BaseComponent, PersistentStateComponent<El
|
||||
|
||||
public void loadState(Element state) {
|
||||
Registry.getInstance().loadState(state);
|
||||
SortedMap<String, String> userProperties = new TreeMap<String, String>(Registry.getInstance().getUserProperties());
|
||||
userProperties.remove("ide.firstStartup");
|
||||
if (!userProperties.isEmpty()) {
|
||||
LOG.info("Registry values changed by user:");
|
||||
for (Map.Entry<String, String> entry : userProperties.entrySet()) {
|
||||
LOG.info(" " + entry.getKey() + " = " + entry.getValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
Reference in New Issue
Block a user