SyntaxHighlighter (@NotNull FileType fileType, @Nullable Project project, @Nullable VirtualFile file) { if (project != null && file != null) { PsiFile psiFile = PsiManager.getInstance(project).findFile(file); if (fileType == JavaClassFileType.INSTANCE && psiFile != null) { Language language = psiFile.getLanguage(); if (language != JavaLanguage.INSTANCE) { return SyntaxHighlighterFactory.getSyntaxHighlighter(language, project, file); } } if (psiFile instanceof ClsFileImpl) { LanguageLevel sourceLevel = ((ClsFileImpl)psiFile).getLanguageLevel(); return new JavaFileHighlighter(sourceLevel); } } return new JavaFileHighlighter(); }