use of org.eclipse.che.api.project.server.ProjectCreatedEvent in project che by eclipse.
the class BaseTest method createTestProject.
protected FolderEntry createTestProject() throws ServerException, NotFoundException, ConflictException, ForbiddenException {
String classpath = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + "<classpath>\n" + "\t<classpathentry kind=\"con\" path=\"org.eclipse.jdt.launching.JRE_CONTAINER\"/>\n" + "</classpath>";
FolderEntry parent = projectManager.getProjectsRoot().createFolder("project");
parent.createFolder("bin");
parent.createFolder("src");
FolderEntry codenvyFolder = parent.createFolder(".che");
FolderEntry libFolder = parent.createFolder("lib");
libFolder.createFile("a.jar", "text".getBytes());
codenvyFolder.createFile("classpath", classpath.getBytes());
projectRegistry.setProjectType(parent.getPath().toString(), PlainJavaProjectConstants.JAVAC_PROJECT_ID, false);
//inform DeltaProcessingStat about new project
JavaModelManager.getJavaModelManager().deltaState.resourceChanged(new ResourceChangedEvent(root, new ProjectCreatedEvent("", parent.getPath().toString())));
return parent;
}
use of org.eclipse.che.api.project.server.ProjectCreatedEvent in project che by eclipse.
the class BaseTest method createTestProject.
protected FolderEntry createTestProject(String name, String pomContent) throws ServerException, NotFoundException, ConflictException, ForbiddenException {
FolderEntry folder = pm.getProjectsRoot().createFolder(name);
folder.createFile("pom.xml", getPomContent(pomContent).getBytes());
projectRegistry.setProjectType(folder.getPath().toString(), MAVEN_ID, false);
//inform DeltaProcessingStat about new project
JavaModelManager.getJavaModelManager().deltaState.resourceChanged(new ResourceChangedEvent(root, new ProjectCreatedEvent("", folder.getPath().toString())));
return folder;
}
Aggregations