From b0b1c5538ba65af0f580beee836496079e9987d6 Mon Sep 17 00:00:00 2001 From: Anna Kozlova Date: Wed, 5 Aug 2020 20:06:08 +0200 Subject: [PATCH] i18n: compare unescaped property values e.g. \n in code and in the property should be the same GitOrigin-RevId: f9a1fc20b3174b9c5274fda9796bcc5cdafb4213 --- .../lang/properties/references/I18nizeQuickFixDialog.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/properties/src/com/intellij/lang/properties/references/I18nizeQuickFixDialog.java b/plugins/properties/src/com/intellij/lang/properties/references/I18nizeQuickFixDialog.java index 9a2770c0a1c1..88f1df5ba475 100644 --- a/plugins/properties/src/com/intellij/lang/properties/references/I18nizeQuickFixDialog.java +++ b/plugins/properties/src/com/intellij/lang/properties/references/I18nizeQuickFixDialog.java @@ -251,7 +251,7 @@ public class I18nizeQuickFixDialog extends DialogWrapper implements I18nizeQuick PropertiesFile propertiesFile = getPropertyFileByPath(path); if (propertiesFile != null) { for (IProperty property : propertiesFile.getProperties()) { - if (Comparing.strEqual(property.getValue(), value) && property.getUnescapedKey() != null) { + if (Comparing.strEqual(property.getUnescapedValue(), value) && property.getUnescapedKey() != null) { result.add(property); } } @@ -397,6 +397,7 @@ public class I18nizeQuickFixDialog extends DialogWrapper implements I18nizeQuick myPropertiesFile.setHistory(paths); if (lastPath != null) { myPropertiesFile.setSelectedItem(lastPath); + myPropertiesFile.setText(lastPath); } if (myPropertiesFile.getSelectedIndex() == -1 && !paths.isEmpty()) { myPropertiesFile.setText(paths.get(0));