boolean (@NotNull Project project, @NotNull Editor editor, @NotNull Caret caret, @NotNull final PsiFile file) { final FileType fileType = file.getFileType(); if (fileType instanceof AbstractFileType) { return ((AbstractFileType)fileType).getCommenter() != null; } if (LanguageCommenters.INSTANCE.forLanguage(file.getLanguage()) != null || LanguageCommenters.INSTANCE.forLanguage(file.getViewProvider().getBaseLanguage()) != null) return true; PsiElement host = InjectedLanguageManager.getInstance(project).getInjectionHost(file); return host != null && LanguageCommenters.INSTANCE.forLanguage(host.getLanguage()) != null; }