Search in sources :

Example 76 with Status

use of org.eclipse.sapphire.modeling.Status 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)

Example 77 with Status

use of org.eclipse.sapphire.modeling.Status in project liferay-ide by liferay.

the class NewLiferayJSFModuleProjectOpTests method testMavenRichFacesNewLiferayJSFModuleProjectOp.

@Test
public void testMavenRichFacesNewLiferayJSFModuleProjectOp() throws Exception {
    NewLiferayJSFModuleProjectOp existedProjectop = NewLiferayJSFModuleProjectOp.TYPE.instantiate();
    existedProjectop.setProjectProvider("maven-jsf");
    existedProjectop.setProjectName("Test7");
    existedProjectop.setTemplateName("richfaces");
    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 78 with Status

use of org.eclipse.sapphire.modeling.Status in project liferay-ide by liferay.

the class NewLiferayJSFModuleProjectOpTests method testMavenJSFStandardNewLiferayJSFModuleProjectOp.

@Test
public void testMavenJSFStandardNewLiferayJSFModuleProjectOp() throws Exception {
    NewLiferayJSFModuleProjectOp existedProjectop = NewLiferayJSFModuleProjectOp.TYPE.instantiate();
    existedProjectop.setProjectProvider("maven-jsf");
    existedProjectop.setProjectName("Test11");
    existedProjectop.setTemplateName("jsf");
    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 79 with Status

use of org.eclipse.sapphire.modeling.Status in project liferay-ide by liferay.

the class NewLiferayJSFModuleProjectOpTests method testNewLiferayJSFModuleProjectOpProjectExisted.

@Test
public void testNewLiferayJSFModuleProjectOpProjectExisted() throws Exception {
    NewLiferayJSFModuleProjectOp existedProjectop = NewLiferayJSFModuleProjectOp.TYPE.instantiate();
    existedProjectop.setProjectProvider("gradle-jsf");
    existedProjectop.setProjectName("Test2");
    existedProjectop.setTemplateName("richfaces");
    Status exStatus = NewLiferayJSFModuleProjectOpMethods.execute(existedProjectop, ProgressMonitorBridge.create(new NullProgressMonitor()));
    assertTrue(exStatus.ok());
    IProject existedProject = CoreUtil.getProject(existedProjectop.getProjectName().content());
    assertNotNull(existedProject);
    NewLiferayJSFModuleProjectOp newProjectNameop = NewLiferayJSFModuleProjectOp.TYPE.instantiate();
    newProjectNameop.setProjectProvider("gradle-jsf");
    newProjectNameop.setProjectName("Test2");
    Status projectNameExistedValidationStatus = newProjectNameop.getProjectName().validation();
    assertEquals(false, projectNameExistedValidationStatus.ok());
}
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 80 with Status

use of org.eclipse.sapphire.modeling.Status in project liferay-ide by liferay.

the class NewLiferayJSFModuleProjectOpTests method testMavenLiferayFacesNewLiferayJSFModuleProjectOp.

@Test
public void testMavenLiferayFacesNewLiferayJSFModuleProjectOp() throws Exception {
    NewLiferayJSFModuleProjectOp existedProjectop = NewLiferayJSFModuleProjectOp.TYPE.instantiate();
    existedProjectop.setProjectProvider("maven-jsf");
    existedProjectop.setProjectName("Test9");
    existedProjectop.setTemplateName("icefaces");
    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)

Aggregations

Status (org.eclipse.sapphire.modeling.Status)83 IProject (org.eclipse.core.resources.IProject)33 Test (org.junit.Test)31 NullProgressMonitor (org.eclipse.core.runtime.NullProgressMonitor)29 IStatus (org.eclipse.core.runtime.IStatus)25 Path (org.eclipse.sapphire.modeling.Path)18 CoreException (org.eclipse.core.runtime.CoreException)15 IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)15 NewLiferayJSFModuleProjectOp (com.liferay.ide.project.core.jsf.NewLiferayJSFModuleProjectOp)14 IFile (org.eclipse.core.resources.IFile)12 IPath (org.eclipse.core.runtime.IPath)11 NewLiferayPluginProjectOp (com.liferay.ide.project.core.model.NewLiferayPluginProjectOp)10 NewLiferayModuleProjectOp (com.liferay.ide.project.core.modules.NewLiferayModuleProjectOp)9 SDK (com.liferay.ide.sdk.core.SDK)9 File (java.io.File)6 NewLiferayComponentOp (com.liferay.ide.project.core.modules.NewLiferayComponentOp)5 IRuntime (org.eclipse.wst.server.core.IRuntime)5 PropertyKey (com.liferay.ide.project.core.modules.PropertyKey)3 NewModuleFragmentOp (com.liferay.ide.project.core.modules.fragment.NewModuleFragmentOp)3 ArrayList (java.util.ArrayList)3