TreeVisitor (@Nullable SmartPsiElementPointer<PsiElement> pointer, @Nullable VirtualFile file) { if (pointer != null) return new ProjectViewNodeVisitor(pointer, file, null); if (file != null) return new ProjectViewFileVisitor(file, null); LOG.warn("cannot create visitor without element and/or file"); return null; }