use of org.eclipse.linuxtools.rpm.core.RPMProjectCreator in project linuxtools by eclipse.
the class RPMProjectCreatorTest method createRPMBuild.
@Test
public void createRPMBuild() throws CoreException {
RPMProjectCreator projectCreator = new RPMProjectCreator();
newProject = projectCreator.create("rpmbuild", Platform.getLocation(), new NullProgressMonitor());
assertNotNull(newProject);
assertEquals(1, newProject.getDescription().getNatureIds().length);
assertEquals(IRPMConstants.RPM_NATURE_ID, newProject.getDescription().getNatureIds()[0]);
assertTrue(newProject.exists(new Path("SOURCES")));
assertTrue(newProject.exists(new Path("SPECS")));
}
use of org.eclipse.linuxtools.rpm.core.RPMProjectCreator in project linuxtools by eclipse.
the class RPMNewProject method createProject.
protected void createProject(IProgressMonitor monitor) throws CoreException {
RPMProjectCreator rpmProjectCreator = new RPMProjectCreator(namePage.getSelectedLayout());
IProject project = rpmProjectCreator.create(namePage.getProjectName(), namePage.getLocationPath(), monitor);
// Add new project to working sets, if requested
IWorkingSet[] workingSets = namePage.getWorkingSets();
if (workingSets.length > 0) {
PlatformUI.getWorkbench().getWorkingSetManager().addToWorkingSets(project, workingSets);
}
}
use of org.eclipse.linuxtools.rpm.core.RPMProjectCreator in project linuxtools by eclipse.
the class SRPMImportPage method getNewProject.
/**
* Creates a new project.
* @throws CoreException If project creation failed.
*/
private IProject getNewProject() throws CoreException {
IPath path = detailsPanel.getLocationPath();
RPMProjectCreator projectCreator = new RPMProjectCreator(detailsPanel.getSelectedLayout());
return projectCreator.create(getProjectName(path.lastSegment()), path.removeLastSegments(1), new NullProgressMonitor());
}
use of org.eclipse.linuxtools.rpm.core.RPMProjectCreator in project linuxtools by eclipse.
the class RPMProjectCreatorTest method createFlat.
@Test
public void createFlat() throws CoreException {
RPMProjectCreator projectCreator = new RPMProjectCreator(RPMProjectLayout.FLAT);
newProject = projectCreator.create("flatproject", Platform.getLocation(), new NullProgressMonitor());
assertNotNull(newProject);
assertEquals(1, newProject.getDescription().getNatureIds().length);
assertEquals(IRPMConstants.RPM_NATURE_ID, newProject.getDescription().getNatureIds()[0]);
}
Aggregations