@Override
  public boolean isValidFor(final Editor editor, final PsiFile file) {
    if (!(file instanceof PsiJavaFile) && !(file instanceof PsiCodeFragment)) {
      return false;
    }

    return OverrideImplementUtil.getContextClass(file.getProject(), editor, file, PsiUtil.isAvailable(JavaFeature.EXTENSION_METHODS, file)) != null;
  }
@Override
  public boolean isValidFor(final Editor editor, final PsiFile file)