void (@NotNull RegistryValue registryValue, @NotNull String value) { String key = registryValue.getKey(); if (!myModifiedValues.containsKey(key)) { // store previous value that represent an initial value for this dialog myModifiedValues.put(key, registryValue.asString()); } else if (value.equals(myModifiedValues.get(key))) { // remove stored value if it is equals to the new value myModifiedValues.remove(key); } registryValue.setValue(value); }