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;
}
Aggregations