How to add file annotation?
Hi,
My question is how to annotate filename, I mean, a red line under the filename which have error.
On my custom language project, i am using this code:
TextRange range = new TextRange(element.getTextRange().getStartOffset(),
element.getTextRange().getEndOffset());
holder.createErrorAnnotation(range, "ERROR");
The annotation in the context is ok, there will be a red line under the words. But in the project view, there is not any annotation under filename.
Thanks in advance.
Please sign in to leave a comment.
Hello,
I think you should provide your own filter:
com.intellij.problems.WolfTheProblemSolver#FILTER_EP_NAME
Hi, Sergey,
Thank you very much. It works now.