@Override
  public void invoke(@NotNull Project project, PsiElement @NotNull [] elements, DataContext dataContext) {
    if (elements.length == 1 && elements[0] instanceof PsiClass aClass &&
        (aClass instanceof PsiAnonymousClass || PsiUtil.isLocalClass(aClass))) {
      invoke(project, CommonDataKeys.EDITOR.getData(dataContext), aClass);
    }
  }
@Override
  public void invoke(@NotNull Project project, PsiElement @NotNull [] elements, DataContext dataContext)