Search in sources :

Example 61 with NewLiferayPluginProjectOp

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

the class NewLiferayPluginProjectPortletNameOpTests method createNewMVCPortletProjectCustomPortletName.

protected IProject createNewMVCPortletProjectCustomPortletName(String customPortletName) throws Exception {
    final String projectName = "test-mvc-sdk-project";
    final NewLiferayPluginProjectOp op = newProjectOp(projectName);
    op.setIncludeSampleCode(true);
    op.setPortletFramework("mvc");
    op.setPortletName(customPortletName);
    final IProject mvcProject = createAntProject(op);
    assertNotNull(LiferayCore.create(IWebProject.class, mvcProject).getDefaultDocrootFolder());
    return mvcProject;
}
Also used : NewLiferayPluginProjectOp(com.liferay.ide.project.core.model.NewLiferayPluginProjectOp) IProject(org.eclipse.core.resources.IProject)

Example 62 with NewLiferayPluginProjectOp

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

the class NewLiferayPluginProjectPortletNameOpTests method createNewJSFPortletProjectCustomPortletName.

protected IProject createNewJSFPortletProjectCustomPortletName(final String jsfSuite, String suffix, String customPortletName) throws Exception {
    final String projectName = "test-" + jsfSuite + suffix + "-sdk-project";
    final NewLiferayPluginProjectOp op = newProjectOp(projectName);
    op.setIncludeSampleCode(true);
    op.setPortletFramework("jsf-2.x");
    op.setPortletFrameworkAdvanced("liferay_faces_alloy");
    op.setPortletName(customPortletName);
    final IProject jsfProject = createAntProject(op);
    final IFolder webappRoot = LiferayCore.create(IWebProject.class, jsfProject).getDefaultDocrootFolder();
    assertNotNull(webappRoot);
    final IFile config = webappRoot.getFile("WEB-INF/faces-config.xml");
    assertEquals(true, config.exists());
    return jsfProject;
}
Also used : IFile(org.eclipse.core.resources.IFile) IWebProject(com.liferay.ide.core.IWebProject) NewLiferayPluginProjectOp(com.liferay.ide.project.core.model.NewLiferayPluginProjectOp) IProject(org.eclipse.core.resources.IProject) IFolder(org.eclipse.core.resources.IFolder)

Example 63 with NewLiferayPluginProjectOp

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

the class NewLiferayWebPluginProjectTests method testNewWebAntProject.

@Test
public void testNewWebAntProject() throws Exception {
    if (shouldSkipBundleTests())
        return;
    final String projectName = "test-web-project-sdk";
    final NewLiferayPluginProjectOp op = newProjectOp(projectName);
    op.setPluginType(PluginType.web);
    final IProject webProject = createAntProject(op);
    assertNotNull(LiferayCore.create(IWebProject.class, webProject).getDefaultDocrootFolder());
}
Also used : NewLiferayPluginProjectOp(com.liferay.ide.project.core.model.NewLiferayPluginProjectOp) IProject(org.eclipse.core.resources.IProject) Test(org.junit.Test)

Example 64 with NewLiferayPluginProjectOp

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

the class OpenPluginTypeDescriptionDialogAction method run.

@Override
protected Object run(Presentation context) {
    if (context instanceof SwtPresentation) {
        final SwtPresentation swt = (SwtPresentation) context;
        final NewLiferayPluginProjectOp op = getModelElement().nearest(NewLiferayPluginProjectOp.class);
        final PluginTypeDescriptionDialog dialog = new PluginTypeDescriptionDialog(swt.shell(), op, DefinitionLoader.sdef(NewLiferayPluginProjectWizard.class).dialog("PluginTypeDescription"));
        dialog.setBlockOnOpen(false);
        dialog.open();
    }
    return null;
}
Also used : SwtPresentation(org.eclipse.sapphire.ui.forms.swt.SwtPresentation) NewLiferayPluginProjectOp(com.liferay.ide.project.core.model.NewLiferayPluginProjectOp) PluginTypeDescriptionDialog(com.liferay.ide.project.ui.dialog.PluginTypeDescriptionDialog)

Example 65 with NewLiferayPluginProjectOp

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

the class ProfileIdListener method handleTypedEvent.

@Override
protected void handleTypedEvent(PropertyContentEvent event) {
    NewLiferayPluginProjectOp op = event.property().nearest(NewLiferayPluginProjectOp.class);
    ElementList<Profile> selectedProfiles = op.getSelectedProfiles();
    NewLiferayPluginProjectOpMethods.updateActiveProfilesValue(op, selectedProfiles);
}
Also used : NewLiferayPluginProjectOp(com.liferay.ide.project.core.model.NewLiferayPluginProjectOp) Profile(com.liferay.ide.project.core.model.Profile)

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