remove method used only by jade

This commit is contained in:
Dennis Ushakov
2017-01-16 15:35:20 +03:00
parent 981015db8f
commit 602bd0e9d2
2 changed files with 7 additions and 14 deletions
@@ -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())) {
@@ -164,10 +164,6 @@ public abstract class XmlExtension {
return false;
}
public boolean needWhitespaceBeforeAttribute() {
return true;
}
public boolean useXmlTagInsertHandler() {
return true;
}