Search in sources :

Example 1 with ConvertToEntityFix

use of org.intellij.lang.xpath.xslt.quickfix.ConvertToEntityFix in project intellij-community by JetBrains.

the class XsltAnnotator method visitXPathToken.

@Override
public void visitXPathToken(XPathToken token) {
    if (XPathTokenTypes.REL_OPS.contains(token.getTokenType())) {
        if (token.textContains('<')) {
            final Annotation ann = myHolder.createErrorAnnotation(token, "'<' must be escaped as '&lt;' in XSLT documents");
            ann.registerFix(new ConvertToEntityFix(token));
            ann.registerFix(new FlipOperandsFix(token));
        }
    }
}
Also used : FlipOperandsFix(org.intellij.lang.xpath.xslt.quickfix.FlipOperandsFix) ConvertToEntityFix(org.intellij.lang.xpath.xslt.quickfix.ConvertToEntityFix) Annotation(com.intellij.lang.annotation.Annotation)

Aggregations

Annotation (com.intellij.lang.annotation.Annotation)1 ConvertToEntityFix (org.intellij.lang.xpath.xslt.quickfix.ConvertToEntityFix)1 FlipOperandsFix (org.intellij.lang.xpath.xslt.quickfix.FlipOperandsFix)1