Search in sources :

Example 6 with NewLiferayJSFModuleProjectOp

use of com.liferay.ide.project.core.jsf.NewLiferayJSFModuleProjectOp in project liferay-ide by liferay.

the class NewLiferayJSFModuleProjectOpTests method testIcefacesGradleJSFProject.

@Test
public void testIcefacesGradleJSFProject() throws Exception {
    NewLiferayJSFModuleProjectOp op = NewLiferayJSFModuleProjectOp.TYPE.instantiate();
    op.setProjectProvider("gradle-jsf");
    op.setProjectName("Test15");
    op.setTemplateName("icefaces");
    Status status = NewLiferayJSFModuleProjectOpMethods.execute(op, ProgressMonitorBridge.create(new NullProgressMonitor()));
    assertTrue(status.ok());
    waitForBuildAndValidation2();
    IProject project = CoreUtil.getProject("Test15");
    assertNotNull(project);
}
Also used : Status(org.eclipse.sapphire.modeling.Status) NullProgressMonitor(org.eclipse.core.runtime.NullProgressMonitor) NewLiferayJSFModuleProjectOp(com.liferay.ide.project.core.jsf.NewLiferayJSFModuleProjectOp) IProject(org.eclipse.core.resources.IProject) Test(org.junit.Test)

Example 7 with NewLiferayJSFModuleProjectOp

use of com.liferay.ide.project.core.jsf.NewLiferayJSFModuleProjectOp in project liferay-ide by liferay.

the class NewLiferayJSFModuleProjectWizard method performPostFinish.

@Override
protected void performPostFinish() {
    super.performPostFinish();
    NewLiferayJSFModuleProjectOp op = element().nearest(NewLiferayJSFModuleProjectOp.class);
    IProject project = CoreUtil.getProject(op.getProjectName().content());
    try {
        addToWorkingSets(project);
    } catch (Exception ex) {
        ProjectUI.logError("Unable to add project to working set", ex);
    }
    openLiferayPerspective(project);
}
Also used : NewLiferayJSFModuleProjectOp(com.liferay.ide.project.core.jsf.NewLiferayJSFModuleProjectOp) IProject(org.eclipse.core.resources.IProject)

Example 8 with NewLiferayJSFModuleProjectOp

use of com.liferay.ide.project.core.jsf.NewLiferayJSFModuleProjectOp in project liferay-ide by liferay.

the class NewLiferayJSFModuleProjectOpTests method testRichfacesGradleProject.

@Test
public void testRichfacesGradleProject() throws Exception {
    NewLiferayJSFModuleProjectOp op = NewLiferayJSFModuleProjectOp.TYPE.instantiate();
    op.setProjectProvider("gradle-jsf");
    op.setProjectName("Test17");
    op.setTemplateName("richfaces");
    Status status = NewLiferayJSFModuleProjectOpMethods.execute(op, ProgressMonitorBridge.create(new NullProgressMonitor()));
    assertTrue(status.ok());
    waitForBuildAndValidation2();
    IProject project = CoreUtil.getProject("Test17");
    assertNotNull(project);
}
Also used : Status(org.eclipse.sapphire.modeling.Status) NullProgressMonitor(org.eclipse.core.runtime.NullProgressMonitor) NewLiferayJSFModuleProjectOp(com.liferay.ide.project.core.jsf.NewLiferayJSFModuleProjectOp) IProject(org.eclipse.core.resources.IProject) Test(org.junit.Test)

Example 9 with NewLiferayJSFModuleProjectOp

use of com.liferay.ide.project.core.jsf.NewLiferayJSFModuleProjectOp in project liferay-ide by liferay.

the class NewLiferayJSFModuleProjectOpTests method testMavenPrimeFacesNewLiferayJSFModuleProjectOp.

@Test
public void testMavenPrimeFacesNewLiferayJSFModuleProjectOp() throws Exception {
    NewLiferayJSFModuleProjectOp existedProjectop = NewLiferayJSFModuleProjectOp.TYPE.instantiate();
    existedProjectop.setProjectProvider("maven-jsf");
    existedProjectop.setProjectName("Test8");
    existedProjectop.setTemplateName("primefaces");
    Status exStatus = NewLiferayJSFModuleProjectOpMethods.execute(existedProjectop, ProgressMonitorBridge.create(new NullProgressMonitor()));
    assertTrue(exStatus.ok());
    IProject existedProject = CoreUtil.getProject(existedProjectop.getProjectName().content());
    assertNotNull(existedProject);
}
Also used : Status(org.eclipse.sapphire.modeling.Status) NullProgressMonitor(org.eclipse.core.runtime.NullProgressMonitor) NewLiferayJSFModuleProjectOp(com.liferay.ide.project.core.jsf.NewLiferayJSFModuleProjectOp) IProject(org.eclipse.core.resources.IProject) Test(org.junit.Test)

Example 10 with NewLiferayJSFModuleProjectOp

use of com.liferay.ide.project.core.jsf.NewLiferayJSFModuleProjectOp in project liferay-ide by liferay.

the class NewLiferayJSFModuleProjectOpTests method testNewLiferayJSFModuleProjectOpDefaultBuildType.

@Test
public void testNewLiferayJSFModuleProjectOpDefaultBuildType() throws Exception {
    NewLiferayJSFModuleProjectOp existedProjectop = NewLiferayJSFModuleProjectOp.TYPE.instantiate();
    existedProjectop.setProjectName("Test3");
    existedProjectop.setProjectProvider("gradle-jsf");
    existedProjectop.setTemplateName("primefaces");
    Status exStatus = NewLiferayJSFModuleProjectOpMethods.execute(existedProjectop, ProgressMonitorBridge.create(new NullProgressMonitor()));
    assertTrue(exStatus.ok());
    IProject existedProject = CoreUtil.getProject(existedProjectop.getProjectName().content());
    assertNotNull(existedProject);
    NewLiferayJSFModuleProjectOp newBuildTypeop = NewLiferayJSFModuleProjectOp.TYPE.instantiate();
    DefaultValueService buildTypeDefaultService = newBuildTypeop.getProjectProvider().service(DefaultValueService.class);
    assertEquals(buildTypeDefaultService.value(), "gradle-jsf");
}
Also used : Status(org.eclipse.sapphire.modeling.Status) NullProgressMonitor(org.eclipse.core.runtime.NullProgressMonitor) DefaultValueService(org.eclipse.sapphire.DefaultValueService) NewLiferayJSFModuleProjectOp(com.liferay.ide.project.core.jsf.NewLiferayJSFModuleProjectOp) IProject(org.eclipse.core.resources.IProject) Test(org.junit.Test)

Aggregations

NewLiferayJSFModuleProjectOp (com.liferay.ide.project.core.jsf.NewLiferayJSFModuleProjectOp)15 IProject (org.eclipse.core.resources.IProject)14 Status (org.eclipse.sapphire.modeling.Status)14 Test (org.junit.Test)14 NullProgressMonitor (org.eclipse.core.runtime.NullProgressMonitor)13 DefaultValueService (org.eclipse.sapphire.DefaultValueService)1