Class ProjectUtil


  • public class ProjectUtil
    extends Object
    Useful static functions.
    Since:
    8.0
    Author:
    Leonid Bushuev from JetBrains
    • Constructor Detail

      • ProjectUtil

        public ProjectUtil()
    • Method Detail

      • makeDeletedProjectDirectoryName

        @NotNull
        public static String makeDeletedProjectDirectoryName​(@NotNull
                                                             BuildProject project)
      • makeDeletedProjectDirectoryName

        @NotNull
        public static String makeDeletedProjectDirectoryName​(@NotNull
                                                             String projectExtId,
                                                             @NotNull
                                                             String projectIntId)
      • getProjectWithSubProjects

        @NotNull
        public static List<SProject> getProjectWithSubProjects​(@NotNull
                                                               SProject project)
        Returns the given project with all subprojects transitively.
        Parameters:
        project -
        Returns:
        Since:
        8.0
      • getProjectsInternalIds

        @NotNull
        public static Set<String> getProjectsInternalIds​(@NotNull
                                                         Collection<? extends BuildProject> projects)
        Converts a collection of projects to a set of their internal ids.
        Parameters:
        projects - collection of projects which ids to return.
        Returns:
        set of internal ids.
        Since:
        8.0
      • getProjectParentsAndChildrenInternalIds

        @NotNull
        public static Set<String> getProjectParentsAndChildrenInternalIds​(@NotNull
                                                                          SProject project)
        Collects internal identifiers of the given porjects, all its parent projects and all nested subprojects transitively.
        Parameters:
        project - the project.
        Returns:
        set of ids.
      • getProjectSelfAndChildrenInternalIds

        @NotNull
        public static Set<String> getProjectSelfAndChildrenInternalIds​(@NotNull
                                                                       SProject project)
        Collects internal identifiers of the given projects and all nested subprojects transitively.
        Parameters:
        project - the project.
        Returns:
        set of ids.
      • findFirstNonVirtualParent

        @Nullable
        public static SProject findFirstNonVirtualParent​(@NotNull
                                                         SProject project)