private static void configureSourceFolder(@NotNull SourceFolderManager sourceFolderManager,
                                            @NotNull ContentEntry contentEntry,
                                            @NotNull SourceRoot sourceRoot,
                                            boolean updatePackagePrefix,
                                            boolean generated) {
    String packagePrefix = sourceRoot.getPackagePrefix();
    String url = pathToUrl(sourceRoot.getPath());

    logTrace("Importing root '%s' with packagePrefix=[%s] generated=[%b]", sourceRoot, packagePrefix, generated);

    SourceFolder folder = findSourceFolder(contentEntry, sourceRoot);
    if (folder == null) {
      if (updatePackagePrefix) {
        sourceFolderManager.setSourceFolderPackagePrefix(url, packagePrefix);
      }
      if (generated) {
        sourceFolderManager.setSourceFolderGenerated(url, true);
      }
    }
    else {
      if (updatePackagePrefix && StringUtil.isNotEmpty(packagePrefix)) {
        folder.setPackagePrefix(packagePrefix);
      }
      if (generated) {
        setForGeneratedSources(folder, true);
      }
    }
  }
private static void configureSourceFolder(@NotNull SourceFolderManager sourceFolderManager,
                                            @NotNull ContentEntry contentEntry,
                                            @NotNull SourceRoot sourceRoot,
                                            boolean updatePackagePrefix,
                                            boolean generated)