private static <T> boolean processProject(MavenDomProjectModel projectDom,
                                            MavenProject mavenProjectOrNull,
                                            Processor<? super T> processor,
                                            Project project,
                                            Function<? super MavenDomProfile, ? extends T> domProfileFunction,
                                            Function<? super MavenDomProjectModel, ? extends T> projectDomFunction) {

    if (processProfilesXml(MavenDomUtil.getVirtualFile(projectDom), mavenProjectOrNull, processor, project, domProfileFunction)) {
      return true;
    }

    if (processProfiles(projectDom.getProfiles(), mavenProjectOrNull, processor, domProfileFunction)) return true;

    T t = projectDomFunction.fun(projectDom);
    return t != null && processor.process(t);
  }
private static <T> boolean processProject(MavenDomProjectModel projectDom,
                                            MavenProject mavenProjectOrNull,
                                            Processor<? super T> processor,
                                            Project project,
                                            Function<? super MavenDomProfile, ? extends T> domProfileFunction,
                                            Function<? super MavenDomProjectModel, ? extends T> projectDomFunction)