StructureViewBuilder (@NotNull final FileType fileType, @NotNull final VirtualFile file, @NotNull final Project project) { if (!(fileType instanceof LanguageFileType)) return null; final PsiFile psiFile = PsiManager.getInstance(project).findFile(file); if (psiFile == null) return null; final PsiStructureViewFactory factory = LanguageStructureViewBuilder.INSTANCE.forLanguage(psiFile.getLanguage()); return factory == null ? null : factory.getStructureViewBuilder(psiFile); }