PsiElementVisitor (@NotNull ProblemsHolder holder, boolean isOnTheFly) { return new PsiElementVisitor() { @Override public void visitFile(@NotNull PsiFile file) { TimeoutUtil.sleep(1000); // make it run longer that LIP super.visitFile(file); } @Override public void visitElement(@NotNull PsiElement element) { visited.add(element); super.visitElement(element); } }; }