This commit is contained in:
Alexey Kudravtsev
2010-10-11 14:08:47 +04:00
parent a3686603a7
commit 7747f29b48
@@ -125,6 +125,7 @@ public class DefaultHighlightVisitor implements HighlightVisitor, DumbAware {
List<Annotator> annotators = cachedAnnotators.get(element.getLanguage());
if (annotators.isEmpty()) return;
final boolean dumb = myDumbService.isDumb();
annotationHolder.setSession(holder.getAnnotationSession());
if (!JobUtil.invokeConcurrentlyUnderMyProgress(annotators, new Processor<Annotator>() {
public boolean process(Annotator annotator) {
@@ -132,8 +133,6 @@ public class DefaultHighlightVisitor implements HighlightVisitor, DumbAware {
return true;
}
annotationHolder.setSession(holder.getAnnotationSession());
annotator.annotate(element, annotationHolder);
return true;
}
@@ -145,6 +144,7 @@ public class DefaultHighlightVisitor implements HighlightVisitor, DumbAware {
holder.add(HighlightInfo.fromAnnotation(annotation));
}
annotationHolder.clear();
annotationHolder.setSession(null);
}
}
}