Search in sources :

Example 1 with Workspace

use of org.eclipse.n4js.tests.codegen.Workspace in project n4js by eclipse.

the class TestWorkspaceManager method createTestOnDisk.

private Project createTestOnDisk(Path destination, Map<String, ? extends Map<String, ? extends CharSequence>> projectsModulesContents, boolean forceYarnWorkspace) {
    final Project project;
    if (!forceYarnWorkspace && projectsModulesContents.size() == 1) {
        Entry<String, ? extends Map<String, ? extends CharSequence>> singleProject = projectsModulesContents.entrySet().iterator().next();
        String projectName = singleProject.getKey();
        Map<String, ? extends CharSequence> modulesContents = singleProject.getValue();
        project = createSimpleProject(projectName, modulesContents, HashMultimap.create(), ProjectKind.TopLevel);
    } else {
        project = createYarnProject(projectsModulesContents);
    }
    Workspace workspace = new Workspace();
    workspace.addProject(project);
    createTestOnDisk(destination, workspace);
    return project;
}
Also used : Project(org.eclipse.n4js.tests.codegen.Project) YarnWorkspaceProject(org.eclipse.n4js.tests.codegen.YarnWorkspaceProject) Workspace(org.eclipse.n4js.tests.codegen.Workspace)

Aggregations

Project (org.eclipse.n4js.tests.codegen.Project)1 Workspace (org.eclipse.n4js.tests.codegen.Workspace)1 YarnWorkspaceProject (org.eclipse.n4js.tests.codegen.YarnWorkspaceProject)1