@Override
  protected @Nullable PsiClass getTargetClass(Editor editor, PsiFile file) {
    PsiClass targetClass = super.getTargetClass(editor, file);
    if (targetClass != null) return targetClass;
    if (file instanceof PsiJavaFile javaFile) {
      PsiClass[] classes = javaFile.getClasses();
      if (classes.length == 1 && classes[0] instanceof PsiImplicitClass implicitClass &&
          implicitClass.getFirstChild() != null && PsiMethodUtil.hasMainMethod(implicitClass)) {
        return classes[0];
      }
    }
    return null;
  }
@Override
  protected @Nullable PsiClass getTargetClass(Editor editor, PsiFile file)