Search in sources :

Example 1 with EclipseWorkspace

use of org.gradle.tooling.model.eclipse.EclipseWorkspace in project gradle by gradle.

the class EclipseModelBuilder method calculateReservedProjectNames.

private List<String> calculateReservedProjectNames(ProjectInternal rootProject, EclipseRuntime parameter) {
    if (parameter == null) {
        return Collections.emptyList();
    }
    EclipseWorkspace workspace = parameter.getWorkspace();
    if (workspace == null) {
        return Collections.emptyList();
    }
    List<EclipseWorkspaceProject> projects = workspace.getProjects();
    if (projects == null) {
        return Collections.emptyList();
    }
    List<String> reservedProjectNames = new ArrayList<>();
    List<EclipseWorkspaceProject> externalProjects = gatherExternalProjects(rootProject, projects);
    for (EclipseWorkspaceProject externalProject : externalProjects) {
        reservedProjectNames.add(externalProject.getName());
    }
    return reservedProjectNames;
}
Also used : EclipseWorkspaceProject(org.gradle.tooling.model.eclipse.EclipseWorkspaceProject) ArrayList(java.util.ArrayList) EclipseWorkspace(org.gradle.tooling.model.eclipse.EclipseWorkspace)

Aggregations

ArrayList (java.util.ArrayList)1 EclipseWorkspace (org.gradle.tooling.model.eclipse.EclipseWorkspace)1 EclipseWorkspaceProject (org.gradle.tooling.model.eclipse.EclipseWorkspaceProject)1