use of org.erlide.engine.NewProjectData in project erlide_eclipse by erlang.
the class ProjectCreatorTest method createExistingProjectShouldCrash.
// @Test
// public void createSimpleProject() throws CoreException {
// final NewProjectData info = new NewProjectData(factory);
// info.copyFrom(ErlangProjectProperties.DEFAULT);
// creator = new ProjectCreator(name, location, new IProject[] {}, info, context,
// null);
// prj = creator.createProject();
// assertThat(prj).isNotNull());
//
// final IErlProject erlPrj = ErlangEngine.getInstance().getModel().findProject(prj);
// assertThat(erlPrj).isNotNull());
//
// final ErlangProjectProperties props = erlPrj.getProperties();
// assertThat(props.getOutputDir()).isEqualTo((IPath) new Path("ebin")));
//
// }
@Test(expected = CoreException.class)
public void createExistingProjectShouldCrash() throws CoreException {
final NewProjectData info = new NewProjectData();
info.copyFrom(ErlangProjectProperties.DEFAULT);
creator = new ProjectCreator(ProjectCreatorTest.name, ProjectCreatorTest.location, new IProject[] {}, info, ProjectCreatorTest.context, null);
prj = creator.createProject();
prj = creator.createProject();
}
use of org.erlide.engine.NewProjectData in project erlide_eclipse by erlang.
the class NewErlangProjectWizard method addPages.
@Override
public void addPages() {
try {
super.addPages();
info = new NewProjectData();
info.copyFrom(ErlangProjectProperties.DEFAULT);
buildPages = Maps.newEnumMap(ProjectConfigType.class);
mainPage = new ErlangNewProjectCreationPage("mainPage", info);
mainPage.setTitle(ErlideUIPlugin.getResourceString("wizards.titles.newproject"));
mainPage.setDescription(ErlideUIPlugin.getResourceString("wizards.descs.newproject"));
mainPage.setImageDescriptor(ErlideUIPlugin.getDefault().getImageDescriptor(ErlideUIConstants.IMG_NEW_PROJECT_WIZARD));
addPage(mainPage);
builderPage = new ErlangProjectBuilderPage("builderPage", info);
builderPage.setTitle(ErlideUIPlugin.getResourceString("wizards.titles.builderprefs"));
builderPage.setDescription(ErlideUIPlugin.getResourceString("wizards.descs.builderprefs"));
builderPage.setImageDescriptor(ErlideUIPlugin.getDefault().getImageDescriptor(ErlideUIConstants.IMG_NEW_PROJECT_WIZARD));
addPage(builderPage);
for (final ProjectConfigType builder : ProjectConfigType.values()) {
final ProjectPreferencesWizardPage buildPage = ProjectPreferencesWizardPageFactory.create(builder, info);
buildPages.put(builder, buildPage);
buildPage.setImageDescriptor(ErlideUIPlugin.getDefault().getImageDescriptor(ErlideUIConstants.IMG_NEW_PROJECT_WIZARD));
addPage(buildPage);
}
// only add page if there are already projects in the workspace
if (ResourcesPlugin.getWorkspace().getRoot().getProjects().length > 0) {
referencePage = new WizardNewProjectReferencePage(// $NON-NLS-1$
"basicReferenceProjectPage");
referencePage.setTitle(WizardMessages.NewProject_referenceTitle);
referencePage.setDescription(WizardMessages.NewProject_referenceDescription);
addPage(referencePage);
}
} catch (final Exception x) {
reportError(x);
}
}
Aggregations