for (VirtualFile virtualFile : myFilesToScan) {
synchronized (fileToEventClasses) {
getEventClasses(virtualFile).clear();
}
PsiFile psiFile = PsiManager.getInstance(myProject).findFile(virtualFile);
if (psiFile == null) throw new IllegalStateException("huh? " + virtualFile);
if (psiFile.getFileType() instanceof JavaFileType) {
final long startTime = System.currentTimeMillis();
psiFile.accept(new PsiRecursiveElementVisitor() {
@Override public void visitElement(PsiElement element) {
if (element instanceof PsiMethod
&& SubscriberMetadata.isAnnotatedWithSubscriber((PsiMethod) element)) {
maybeAddSubscriberMethod((PsiMethod) element);
} else {