From cf87dbcbb4de6c71665a48f7703e31cc58bc419d Mon Sep 17 00:00:00 2001 From: Dmitry Avdeev Date: Tue, 20 Mar 2012 17:00:16 +0400 Subject: [PATCH] avoid key duplication (cherry picked from commit 5849a15) --- .../intellij/lang/properties/xml/XmlPropertiesFile.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/properties/src/com/intellij/lang/properties/xml/XmlPropertiesFile.java b/plugins/properties/src/com/intellij/lang/properties/xml/XmlPropertiesFile.java index 48c21e52d951..ba9f2a9f7424 100644 --- a/plugins/properties/src/com/intellij/lang/properties/xml/XmlPropertiesFile.java +++ b/plugins/properties/src/com/intellij/lang/properties/xml/XmlPropertiesFile.java @@ -31,6 +31,7 @@ import java.util.*; */ public class XmlPropertiesFile implements PropertiesFile { + private static final Key> KEY = Key.create("xml properties file"); private final XmlFile myFile; private final List myProperties = new ArrayList(); private final MultiMap myPropertiesMap = new MultiMap(); @@ -42,7 +43,7 @@ public class XmlPropertiesFile implements PropertiesFile { public static PropertiesFile getPropertiesFile(final XmlFile file) { CachedValuesManager manager = CachedValuesManager.getManager(file.getProject()); - return manager.getCachedValue(file, Key.>create("xml properties file"), + return manager.getCachedValue(file, KEY, new CachedValueProvider() { @Override public Result compute() { @@ -104,13 +105,13 @@ public class XmlPropertiesFile implements PropertiesFile { @NotNull @Override public PsiElement addProperty(@NotNull IProperty property) throws IncorrectOperationException { - return null; //To change body of implemented methods use File | Settings | File Templates. + return null; } @NotNull @Override public PsiElement addPropertyAfter(@NotNull Property property, @Nullable Property anchor) throws IncorrectOperationException { - return null; //To change body of implemented methods use File | Settings | File Templates. + return null; } @Override