boolean (@NotNull final Project project, @NotNull final Editor editor, @NotNull final PsiFile file) { PsiElement context = ObjectUtils.notNull(file.findElementAt(editor.getCaretModel().getOffset()), file); return LanguageFormatting.INSTANCE.forContext(context) != null; }