CodeDocumentationAwareCommenter (@NotNull DataContext dataContext) { Language language = EnterHandler.getLanguage(dataContext); if (language == null) return null; Commenter languageCommenter = LanguageCommenters.INSTANCE.forLanguage(language); return languageCommenter instanceof CodeDocumentationAwareCommenter ? (CodeDocumentationAwareCommenter)languageCommenter : null; }