FileViewProvider (@NotNull VirtualFile vFile, boolean eventSystemEnabled) { FileType fileType = vFile.getFileType(); Language language = LanguageUtil.getLanguageForPsi(myManager.getProject(), vFile, fileType); FileViewProviderFactory factory = language == null ? FileTypeFileViewProviders.INSTANCE.forFileType(fileType) : LanguageFileViewProviders.INSTANCE.forLanguage(language); FileViewProvider viewProvider = factory == null ? null : factory.createFileViewProvider(vFile, language, myManager, eventSystemEnabled); return viewProvider == null ? new SingleRootFileViewProvider(myManager, vFile, eventSystemEnabled, fileType) : viewProvider; }