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 6320a308ff8f..b7d8a7f60b0e 100644 --- a/plugins/properties/src/com/intellij/lang/properties/xml/XmlPropertiesFile.java +++ b/plugins/properties/src/com/intellij/lang/properties/xml/XmlPropertiesFile.java @@ -15,6 +15,7 @@ */ package com.intellij.lang.properties.xml; +import com.intellij.ide.highlighter.XmlFileType; import com.intellij.lang.properties.IProperty; import com.intellij.lang.properties.PropertiesUtil; import com.intellij.lang.properties.ResourceBundle; @@ -71,7 +72,7 @@ public class XmlPropertiesFile implements PropertiesFile { @Nullable public static PropertiesFile getPropertiesFile(final PsiFile file) { - return file instanceof XmlFile ? getPropertiesFile((XmlFile)file) : null; + return file instanceof XmlFile && file.getFileType() == XmlFileType.INSTANCE ? getPropertiesFile((XmlFile)file) : null; } public static PropertiesFile getPropertiesFile(final XmlFile file) { diff --git a/plugins/properties/src/com/intellij/lang/properties/xml/XmlPropertiesIconProvider.java b/plugins/properties/src/com/intellij/lang/properties/xml/XmlPropertiesIconProvider.java index ca8bd0c19e01..713b5112dbda 100644 --- a/plugins/properties/src/com/intellij/lang/properties/xml/XmlPropertiesIconProvider.java +++ b/plugins/properties/src/com/intellij/lang/properties/xml/XmlPropertiesIconProvider.java @@ -1,6 +1,7 @@ package com.intellij.lang.properties.xml; import com.intellij.ide.IconProvider; +import com.intellij.ide.highlighter.XmlFileType; import com.intellij.psi.PsiElement; import com.intellij.psi.xml.XmlFile; import icons.PropertiesIcons; @@ -16,6 +17,8 @@ public class XmlPropertiesIconProvider extends IconProvider { @Override public Icon getIcon(@NotNull PsiElement element, int flags) { - return element instanceof XmlFile && XmlPropertiesFile.getPropertiesFile((XmlFile)element) != null ? PropertiesIcons.XmlProperties : null; + return element instanceof XmlFile && + ((XmlFile)element).getFileType() == XmlFileType.INSTANCE && + XmlPropertiesFile.getPropertiesFile((XmlFile)element) != null ? PropertiesIcons.XmlProperties : null; } }