@Override
  public ProblemDescriptor @Nullable [] checkMethod(@NotNull UMethod method, @NotNull InspectionManager manager, boolean isOnTheFly) {
    if (!method.getName().equals("createOptionsPanel")) return null;
    if (!method.getUastParameters().isEmpty()) return null;
    PsiClass psiClass = method.getJavaPsi().getContainingClass();
    if (psiClass == null || !InheritanceUtil.isInheritor(psiClass, "com.intellij.codeInspection.InspectionProfileEntry")) return null;

    Language language = psiClass.getLanguage();
    // Currently only Java and Kotlin are supported
    if (!language.equals(JavaLanguage.INSTANCE) && !language.getID().equals("kotlin")) return null;
    UExpression body = method.getUastBody();
    if (body == null) return null;
    OptPane pane = createOptPane(body);
    if (pane == null) return null;
    UElement anchor = method.getUastAnchor();
    if (anchor == null) return null;
    PsiElement sourcePsi = anchor.getSourcePsi();
    if (sourcePsi == null) return null;
    ProblemDescriptor descriptor =
      manager.createProblemDescriptor(sourcePsi, DevKitBundle.message("inspection.migrate.to.opt.control.message"),
                                      new ConvertToOptPaneFix(pane),
                                      ProblemHighlightType.GENERIC_ERROR_OR_WARNING, true);
    return new ProblemDescriptor[]{descriptor};
  }
@Override
  public ProblemDescriptor @Nullable [] checkMethod(@NotNull UMethod method, @NotNull InspectionManager manager, boolean isOnTheFly)