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