Search in sources :

Example 76 with NewLiferayModuleProjectOp

use of com.liferay.ide.project.core.modules.NewLiferayModuleProjectOp in project liferay-ide by liferay.

the class MavenModuleProjectTests method testNewLiferayMavenModuleMVCPortletProjectWithDots.

@Test
public void testNewLiferayMavenModuleMVCPortletProjectWithDots() throws Exception {
    NewLiferayModuleProjectOp op = NewLiferayModuleProjectOp.TYPE.instantiate();
    op.setProjectName("foo.bar");
    op.setProjectProvider("maven-module");
    IProject project = create(op);
    verifyProject(project);
}
Also used : NewLiferayModuleProjectOp(com.liferay.ide.project.core.modules.NewLiferayModuleProjectOp) IProject(org.eclipse.core.resources.IProject) Test(org.junit.Test)

Example 77 with NewLiferayModuleProjectOp

use of com.liferay.ide.project.core.modules.NewLiferayModuleProjectOp in project liferay-ide by liferay.

the class MavenModuleProjectTests method testThemeProjectComponentConfiguration.

@Test
public void testThemeProjectComponentConfiguration() throws Exception {
    NewLiferayModuleProjectOp op = NewLiferayModuleProjectOp.TYPE.instantiate();
    op.setProjectName("maven-theme-component-test");
    op.setProjectProvider("maven-module");
    op.setProjectTemplateName("theme");
    op.execute(ProgressMonitorBridge.create(new NullProgressMonitor()));
    IProject project = CoreUtil.getProject("maven-theme-component-test");
    assertNotNull(project);
    IBundleProject bundleProject = LiferayCore.create(IBundleProject.class, project);
    assertNotNull(bundleProject);
}
Also used : NullProgressMonitor(org.eclipse.core.runtime.NullProgressMonitor) IBundleProject(com.liferay.ide.core.IBundleProject) NewLiferayModuleProjectOp(com.liferay.ide.project.core.modules.NewLiferayModuleProjectOp) IProject(org.eclipse.core.resources.IProject) Test(org.junit.Test)

Example 78 with NewLiferayModuleProjectOp

use of com.liferay.ide.project.core.modules.NewLiferayModuleProjectOp in project liferay-ide by liferay.

the class MavenModuleProjectTests method testProjectTemplateApiWithInvalidPackageName.

@Test
public void testProjectTemplateApiWithInvalidPackageName() throws Exception {
    NewLiferayModuleProjectOp op = NewLiferayModuleProjectOp.TYPE.instantiate();
    op.setProjectName("api-test-1");
    op.setProjectProvider("maven-module");
    op.setProjectTemplateName("api");
    assertFalse(op.validation().ok());
    assertTrue(op.validation().message().contains("not a valid Java identifier"));
    op.setPackageName("api.test.one");
    assertTrue(op.validation().message(), op.validation().ok());
    createAndBuild(op);
}
Also used : NewLiferayModuleProjectOp(com.liferay.ide.project.core.modules.NewLiferayModuleProjectOp) Test(org.junit.Test)

Example 79 with NewLiferayModuleProjectOp

use of com.liferay.ide.project.core.modules.NewLiferayModuleProjectOp in project liferay-ide by liferay.

the class MavenModuleProjectTests method testProjectTemplatePanelApp.

@Test
public void testProjectTemplatePanelApp() throws Exception {
    NewLiferayModuleProjectOp op = NewLiferayModuleProjectOp.TYPE.instantiate();
    op.setProjectName("panel-app-test");
    op.setProjectProvider("maven-module");
    op.setProjectTemplateName("panel-app");
    createAndBuild(op);
}
Also used : NewLiferayModuleProjectOp(com.liferay.ide.project.core.modules.NewLiferayModuleProjectOp) Test(org.junit.Test)

Example 80 with NewLiferayModuleProjectOp

use of com.liferay.ide.project.core.modules.NewLiferayModuleProjectOp in project liferay-ide by liferay.

the class MavenModuleProjectTests method testProjectTemplateContentTargetingTrackingAction.

@Test
public void testProjectTemplateContentTargetingTrackingAction() throws Exception {
    NewLiferayModuleProjectOp op = NewLiferayModuleProjectOp.TYPE.instantiate();
    op.setProjectName("content-targeting-tracking-action-test");
    op.setProjectProvider("maven-module");
    op.setProjectTemplateName("content-targeting-tracking-action");
    createAndBuild(op);
}
Also used : NewLiferayModuleProjectOp(com.liferay.ide.project.core.modules.NewLiferayModuleProjectOp) Test(org.junit.Test)

Aggregations

NewLiferayModuleProjectOp (com.liferay.ide.project.core.modules.NewLiferayModuleProjectOp)95 Test (org.junit.Test)94 IProject (org.eclipse.core.resources.IProject)30 NullProgressMonitor (org.eclipse.core.runtime.NullProgressMonitor)18 IFile (org.eclipse.core.resources.IFile)12 Status (org.eclipse.sapphire.modeling.Status)9 Ignore (org.junit.Ignore)6 IBundleProject (com.liferay.ide.core.IBundleProject)5 NewLiferayComponentOp (com.liferay.ide.project.core.modules.NewLiferayComponentOp)5 PropertyKey (com.liferay.ide.project.core.modules.PropertyKey)3 SearchFilesVisitor (com.liferay.ide.project.core.util.SearchFilesVisitor)3 IPath (org.eclipse.core.runtime.IPath)3 ByteArrayInputStream (java.io.ByteArrayInputStream)2 File (java.io.File)2 URL (java.net.URL)2 ILiferayProjectImporter (com.liferay.ide.core.ILiferayProjectImporter)1 IProjectBuilder (com.liferay.ide.project.core.IProjectBuilder)1 ProjectName (com.liferay.ide.project.core.model.ProjectName)1 NewLiferayWorkspaceOp (com.liferay.ide.project.core.workspace.NewLiferayWorkspaceOp)1 ArrayList (java.util.ArrayList)1