private static Sdk getJDKToAnnotate(@NotNull Project project) {
    PsiClass awtInputEvent = JavaPsiFacade.getInstance(project).findClass("java.awt.event.InputEvent", GlobalSearchScope.allScope(project));
    if (awtInputEvent == null) return null;
    PsiMethod[] methods = awtInputEvent.findMethodsByName("getModifiers", false);
    if (methods.length != 1) return null;
    PsiMethod getModifiers = methods[0];
    Sdk jdk = JdkUtils.getJdkForElement(getModifiers);
    if (jdk == null) return null;
    PsiAnnotation annotation = ExternalAnnotationsManager.getInstance(project).findExternalAnnotation(getModifiers, MagicConstant.class.getName());
    return annotation == null ? jdk : null;
  }
private static Sdk getJDKToAnnotate(@NotNull Project project)