Search in sources :

Example 36 with NewLiferayPluginProjectOp

use of com.liferay.ide.project.core.model.NewLiferayPluginProjectOp in project liferay-ide by liferay.

the class NewLiferayPluginProjectProfileTests method testSelectProfiles.

@Test
public void testSelectProfiles() throws Exception {
    final NewLiferayPluginProjectOp op = newMavenProjectOp();
    assertEquals(0, op.getSelectedProfiles().size());
}
Also used : NewLiferayPluginProjectOp(com.liferay.ide.project.core.model.NewLiferayPluginProjectOp) Test(org.junit.Test)

Example 37 with NewLiferayPluginProjectOp

use of com.liferay.ide.project.core.model.NewLiferayPluginProjectOp in project liferay-ide by liferay.

the class ArchetypeTests method testArchetypeDefaultValueService.

@Test
public void testArchetypeDefaultValueService() throws Exception {
    final NewLiferayPluginProjectOp op = newProjectOp("test-archetype-default-value-service");
    op.setProjectProvider("maven");
    assertEquals("com.liferay.maven.archetypes:liferay-portlet-archetype:6.2.5", op.getArchetype().content());
    op.setPortletFramework("jsf-2.x");
    assertEquals("com.liferay.maven.archetypes:liferay-portlet-jsf-archetype:6.2.5", op.getArchetype().content());
    op.setPortletFrameworkAdvanced("primefaces");
    assertEquals("com.liferay.maven.archetypes:liferay-portlet-primefaces-archetype:6.2.5", op.getArchetype().content());
}
Also used : NewLiferayPluginProjectOp(com.liferay.ide.project.core.model.NewLiferayPluginProjectOp) Test(org.junit.Test)

Example 38 with NewLiferayPluginProjectOp

use of com.liferay.ide.project.core.model.NewLiferayPluginProjectOp in project liferay-ide by liferay.

the class JSFPortletProjectTests method testNewJSFPortletProject.

@Test
public void testNewJSFPortletProject() throws Exception {
    NewLiferayPluginProjectOp op = newMavenProjectOp("jsf-2.x", "jsf-2.x", "jsf");
    final IProject newProject = base.createProject(op);
    assertNotNull(newProject);
    String pomContents = CoreUtil.readStreamToString(newProject.getFile("pom.xml").getContents());
    assertTrue(pomContents.contains("<artifactId>liferay-faces-bridge-impl</artifactId>"));
    assertTrue(pomContents.contains("<artifactId>liferay-faces-portal</artifactId>"));
    assertTrue(pomContents.contains("<artifactId>liferay-maven-plugin</artifactId>"));
    assertTrue(pomContents.contains("<artifactId>portal-service</artifactId>"));
}
Also used : NewLiferayPluginProjectOp(com.liferay.ide.project.core.model.NewLiferayPluginProjectOp) IProject(org.eclipse.core.resources.IProject) Test(org.junit.Test)

Example 39 with NewLiferayPluginProjectOp

use of com.liferay.ide.project.core.model.NewLiferayPluginProjectOp in project liferay-ide by liferay.

the class JSFPortletProjectTests method newMavenProjectOp.

private NewLiferayPluginProjectOp newMavenProjectOp(String name, String framework, String advFramework) {
    NewLiferayPluginProjectOp op = NewLiferayPluginProjectOp.TYPE.instantiate();
    op.setProjectName(name);
    op.setProjectProvider("maven");
    op.setPortletFramework(framework);
    op.setPortletFrameworkAdvanced(advFramework);
    createTestBundleProfile(op);
    return op;
}
Also used : NewLiferayPluginProjectOp(com.liferay.ide.project.core.model.NewLiferayPluginProjectOp)

Example 40 with NewLiferayPluginProjectOp

use of com.liferay.ide.project.core.model.NewLiferayPluginProjectOp in project liferay-ide by liferay.

the class JSFPortletProjectTests method testNewPrimefacesPortletProject.

@Test
public void testNewPrimefacesPortletProject() throws Exception {
    NewLiferayPluginProjectOp op = newMavenProjectOp("primefaces", "jsf-2.x", "primefaces");
    final IProject newProject = base.createProject(op);
    assertNotNull(newProject);
    String pomContents = CoreUtil.readStreamToString(newProject.getFile("pom.xml").getContents());
    assertTrue(pomContents.contains("<artifactId>primefaces</artifactId>"));
    assertTrue(pomContents.contains("<artifactId>liferay-faces-bridge-impl</artifactId>"));
    assertTrue(pomContents.contains("<artifactId>liferay-faces-portal</artifactId>"));
    assertTrue(pomContents.contains("<artifactId>liferay-maven-plugin</artifactId>"));
    assertTrue(pomContents.contains("<artifactId>portal-service</artifactId>"));
}
Also used : NewLiferayPluginProjectOp(com.liferay.ide.project.core.model.NewLiferayPluginProjectOp) IProject(org.eclipse.core.resources.IProject) Test(org.junit.Test)

Aggregations

NewLiferayPluginProjectOp (com.liferay.ide.project.core.model.NewLiferayPluginProjectOp)122 Test (org.junit.Test)61 IProject (org.eclipse.core.resources.IProject)48 IWebProject (com.liferay.ide.core.IWebProject)18 IFile (org.eclipse.core.resources.IFile)18 IPath (org.eclipse.core.runtime.IPath)14 IFolder (org.eclipse.core.resources.IFolder)13 SDK (com.liferay.ide.sdk.core.SDK)12 Status (org.eclipse.sapphire.modeling.Status)10 PropertyContentEvent (org.eclipse.sapphire.PropertyContentEvent)9 Path (org.eclipse.sapphire.modeling.Path)8 CoreException (org.eclipse.core.runtime.CoreException)7 IPortletFramework (com.liferay.ide.project.core.IPortletFramework)6 HashSet (java.util.HashSet)5 PossibleValuesService (org.eclipse.sapphire.PossibleValuesService)5 ValidationService (org.eclipse.sapphire.services.ValidationService)5 IVirtualComponent (org.eclipse.wst.common.componentcore.resources.IVirtualComponent)5 NewLiferayProfile (com.liferay.ide.project.core.model.NewLiferayProfile)4 IStatus (org.eclipse.core.runtime.IStatus)4 LayoutTplDescriptorHelper (com.liferay.ide.layouttpl.core.operation.LayoutTplDescriptorHelper)3