public void configureByProject(Project project,
                                 @MagicConstant(valuesFromClass = JavaParameters.class) int classPathType,
                                 Sdk jdk) throws CantRunException {
    if ((classPathType & JDK_ONLY) != 0) {
      if (jdk == null) {
        throw CantRunException.noJdkConfigured();
      }
      setJdk(jdk);
    }

    if ((classPathType & CLASSES_ONLY) == 0) {
      return;
    }
    setDefaultCharset(project);
    configureEnumerator(OrderEnumerator.orderEntries(project).runtimeOnly(), classPathType, jdk).collectPaths(getClassPath());
    configureJavaLibraryPath(OrderEnumerator.orderEntries(project));
    configureJavaEnablePreviewProperty(OrderEnumerator.orderEntries(project), jdk);
  }
public void configureByProject(Project project,
                                 @MagicConstant(valuesFromClass = JavaParameters.class) int classPathType,
                                 Sdk jdk)