diff --git a/xml/xml-analysis-impl/src/com/intellij/codeInsight/daemon/impl/analysis/XmlHighlightVisitor.java b/xml/xml-analysis-impl/src/com/intellij/codeInsight/daemon/impl/analysis/XmlHighlightVisitor.java index f17e99f898ff..2b31afdca6a2 100644 --- a/xml/xml-analysis-impl/src/com/intellij/codeInsight/daemon/impl/analysis/XmlHighlightVisitor.java +++ b/xml/xml-analysis-impl/src/com/intellij/codeInsight/daemon/impl/analysis/XmlHighlightVisitor.java @@ -425,17 +425,14 @@ public class XmlHighlightVisitor extends XmlElementVisitor implements HighlightV if (tag == null) return; final String name = attribute.getName(); + PsiElement prevLeaf = PsiTreeUtil.prevLeaf(attribute); - if (XmlExtension.getExtension(attribute.getContainingFile()).needWhitespaceBeforeAttribute()) { - PsiElement prevLeaf = PsiTreeUtil.prevLeaf(attribute); - - if (!(prevLeaf instanceof PsiWhiteSpace)) { - TextRange textRange = attribute.getTextRange(); - HighlightInfoType type = tag instanceof HtmlTag ? HighlightInfoType.WARNING : HighlightInfoType.ERROR; - String description = XmlErrorMessages.message("attribute.should.be.preceded.with.space"); - HighlightInfo info = HighlightInfo.newHighlightInfo(type).range(textRange.getStartOffset(), textRange.getStartOffset()).descriptionAndTooltip(description).create(); - addToResults(info); - } + if (!(prevLeaf instanceof PsiWhiteSpace)) { + TextRange textRange = attribute.getTextRange(); + HighlightInfoType type = tag instanceof HtmlTag ? HighlightInfoType.WARNING : HighlightInfoType.ERROR; + String description = XmlErrorMessages.message("attribute.should.be.preceded.with.space"); + HighlightInfo info = HighlightInfo.newHighlightInfo(type).range(textRange.getStartOffset(), textRange.getStartOffset()).descriptionAndTooltip(description).create(); + addToResults(info); } if (attribute.isNamespaceDeclaration() || XmlUtil.XML_SCHEMA_INSTANCE_URI.equals(attribute.getNamespace())) { diff --git a/xml/xml-psi-impl/src/com/intellij/xml/XmlExtension.java b/xml/xml-psi-impl/src/com/intellij/xml/XmlExtension.java index 3df9b29eecb0..7ce1e8777a44 100644 --- a/xml/xml-psi-impl/src/com/intellij/xml/XmlExtension.java +++ b/xml/xml-psi-impl/src/com/intellij/xml/XmlExtension.java @@ -164,10 +164,6 @@ public abstract class XmlExtension { return false; } - public boolean needWhitespaceBeforeAttribute() { - return true; - } - public boolean useXmlTagInsertHandler() { return true; }