public boolean isEntryPoint(@NotNull RefElement owner) {
    PsiElement element = owner.getPsiElement();
    if (owner instanceof RefJavaElement) {
      UElement uElement = ((RefJavaElement)owner).getUastElement();
      if (uElement != null) {
        element = uElement.getJavaPsi();
      }
    }
    if (RefUtil.isImplicitUsage(element)) return true;
    if (element instanceof PsiModifierListOwner) {
      EntryPointsManager entryPointsManager = EntryPointsManager.getInstance(element.getProject());
      if (entryPointsManager.isEntryPoint(element)) {
        return true;
      }
    }
    if (element != null) {
      for (EntryPoint extension : getExtensions()) {
        if (extension.isSelected() && extension.isEntryPoint(owner, element)) {
          return true;
        }
      }

      if (isAddMainsEnabled() && owner instanceof RefMethod && ((RefMethod)owner).isAppMain()) {
        return true;
      }

      return owner instanceof RefClass &&
             (isAddAppletEnabled() && ((RefClass)owner).isApplet()
              || isAddServletEnabled() && ((RefClass)owner).isServlet());
    }

    return false;
  }
public boolean isEntryPoint(@NotNull RefElement owner)