@Override
  protected boolean isValidForFile(@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;
  }
@Override
  protected boolean isValidForFile(@NotNull final Project project, @NotNull final Editor editor, @NotNull final PsiFile file)