@Nullable
  public static PathsList getClassPathFromRootModel(Module module,
                                                    boolean isTests,
                                                    JavaParameters params,
                                                    boolean allowDuplication,
                                                    PathsList pathList)
    throws CantRunException {
    if (module == null) {
      return null;
    }

    pathList.add(".");

    final JavaParameters tmp = new JavaParameters();
    tmp.configureByModule(module, isTests ? JavaParameters.CLASSES_AND_TESTS : JavaParameters.CLASSES_ONLY);
    if (tmp.getClassPath().getVirtualFiles().isEmpty()) {
      return null;
    }

    Set<VirtualFile> core = new HashSet<>(params.getClassPath().getVirtualFiles());

    for (VirtualFile virtualFile : tmp.getClassPath().getVirtualFiles()) {
      if (allowDuplication || !core.contains(virtualFile)) {
        pathList.add(virtualFile);
      }
    }
    return pathList;
  }
@Nullable
  public static PathsList getClassPathFromRootModel(Module module,
                                                    boolean isTests,
                                                    JavaParameters params,
                                                    boolean allowDuplication,
                                                    PathsList pathList)