Search in sources :

Example 16 with Project

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

the class ScenarioGenerator method createClientProject.

/**
 * Creates the client project containing the given module and vendor ID with a dependency on the given supplier
 * project.
 *
 * @param clientModule
 *            the client module to add to the project
 * @param vendorId
 *            the vendor ID
 * @param supplierProject
 *            the supplier project which the newly created project should depend on
 *
 * @return the newly created project
 */
private Project createClientProject(Module clientModule, String vendorId, Project supplierProject) {
    Project clientProject = new Project("ClientProject", vendorId, vendorId + "_name", PROJECT_TYPE);
    clientProject.addProjectDependency(supplierProject.getName());
    clientProject.createSourceFolder("src").addModule(clientModule);
    return clientProject;
}
Also used : Project(org.eclipse.n4js.tests.codegen.Project)

Aggregations

Project (org.eclipse.n4js.tests.codegen.Project)16 YarnWorkspaceProject (org.eclipse.n4js.tests.codegen.YarnWorkspaceProject)8 File (java.io.File)3 Path (java.nio.file.Path)3 Folder (org.eclipse.n4js.tests.codegen.Folder)3 FileURI (org.eclipse.n4js.workspace.locations.FileURI)3 Lists (com.google.common.collect.Lists)2 List (java.util.List)2 CompletableFuture (java.util.concurrent.CompletableFuture)2 CodeAction (org.eclipse.lsp4j.CodeAction)2 CodeActionContext (org.eclipse.lsp4j.CodeActionContext)2 CodeActionParams (org.eclipse.lsp4j.CodeActionParams)2 Command (org.eclipse.lsp4j.Command)2 Position (org.eclipse.lsp4j.Position)2 Range (org.eclipse.lsp4j.Range)2 TextDocumentIdentifier (org.eclipse.lsp4j.TextDocumentIdentifier)2 Either (org.eclipse.lsp4j.jsonrpc.messages.Either)2 Module (org.eclipse.n4js.tests.codegen.Module)2 Iterables (com.google.common.collect.Iterables)1 Sets (com.google.common.collect.Sets)1