Strange behaviour with annotator and first attribute of HTML tag

I'm witnessing a weird behaviour with the annotator i created for HTML files.
It's a very simple annotator:

public class TemplateAnnotator extends PsiRecursiveElementVisitor implements Annotator
{
private AnnotationHolder _annotationHolder;

public void annotate(PsiElement psiElement, AnnotationHolder holder)
{
_annotationHolder = holder;

psiElement.accept(this);
}

@Override
public void visitXmlTag(XmlTag tag)
{
// do annotation magic

tag.acceptChildren(this);
}
}

This works just fine except when i change the first attribute of a tag. If i change the first attribute of a html tag(name or value) the visitXmlTag method doesn't get called. If i change any other attribute(name or value again) the method is called like expected.

Any ideas ?

3 comments

I don't know if this is related, but there seem to be some quirks with annotators, see http://www.jetbrains.net/jira/browse/IDEA-7128 (which is about XML Files, though)

0

Not sure it's related. Do you get the same behaviour i described ?

0

Please sign in to leave a comment.