Search in sources :

Example 1 with NewPortletWizard

use of com.liferay.ide.portlet.ui.wizard.NewPortletWizard in project liferay-ide by liferay.

the class AddPortletActionHandler method run.

/**
 * (non-Javadoc)
 *
 * @see
 * SapphireActionHandler#run(org.eclipse.sapphire.ui.
 * SapphireRenderingContext)
 */
@Override
protected Object run(Presentation context) {
    NewPortletWizard newPortletWizard = new NewPortletWizard();
    WizardDialog wizardDialog = new WizardDialog(((SwtPresentation) context).shell(), newPortletWizard);
    wizardDialog.create();
    wizardDialog.open();
    return null;
}
Also used : NewPortletWizard(com.liferay.ide.portlet.ui.wizard.NewPortletWizard) WizardDialog(org.eclipse.jface.wizard.WizardDialog)

Example 2 with NewPortletWizard

use of com.liferay.ide.portlet.ui.wizard.NewPortletWizard in project liferay-ide by liferay.

the class NewPortletAction method run.

/**
 * (non-Javadoc)
 *
 * @see org.eclipse.jface.action.Action#run()
 */
@Override
public void run() {
    if (isEnabled()) {
        if (selectedNode instanceof PortletsNode) {
            PortletsNode portletsNode = (PortletsNode) selectedNode;
            IProject currentProject = portletsNode.getParent().getProject();
            NewPortletWizard newPortletWizard = new NewPortletWizard(currentProject);
            WizardDialog wizardDialog = new WizardDialog(Display.getDefault().getActiveShell(), newPortletWizard);
            wizardDialog.create();
            wizardDialog.open();
        }
    }
}
Also used : NewPortletWizard(com.liferay.ide.portlet.ui.wizard.NewPortletWizard) WizardDialog(org.eclipse.jface.wizard.WizardDialog) IProject(org.eclipse.core.resources.IProject) PortletsNode(com.liferay.ide.portlet.ui.navigator.PortletsNode)

Example 3 with NewPortletWizard

use of com.liferay.ide.portlet.ui.wizard.NewPortletWizard in project liferay-ide by liferay.

the class CreateLiferayPortletActionHandler method run.

/**
 * (non-Javadoc)
 *
 * @see
 * SapphireActionHandler#run(org.eclipse.sapphire.ui.
 * SapphireRenderingContext)
 */
@Override
protected Object run(Presentation context) {
    IProject currentProject = null;
    if (context.part().parent() instanceof PortletXmlEditor) {
        PortletXmlEditor portletXmlEditor = (PortletXmlEditor) context.part().parent();
        currentProject = portletXmlEditor.getProject();
    }
    NewPortletWizard newPortletWizard = new NewPortletWizard(currentProject);
    WizardDialog wizardDialog = new WizardDialog(((SwtPresentation) context).shell(), newPortletWizard);
    wizardDialog.create();
    wizardDialog.open();
    return null;
}
Also used : NewPortletWizard(com.liferay.ide.portlet.ui.wizard.NewPortletWizard) PortletXmlEditor(com.liferay.ide.portlet.ui.editor.PortletXmlEditor) WizardDialog(org.eclipse.jface.wizard.WizardDialog) IProject(org.eclipse.core.resources.IProject)

Aggregations

NewPortletWizard (com.liferay.ide.portlet.ui.wizard.NewPortletWizard)3 WizardDialog (org.eclipse.jface.wizard.WizardDialog)3 IProject (org.eclipse.core.resources.IProject)2 PortletXmlEditor (com.liferay.ide.portlet.ui.editor.PortletXmlEditor)1 PortletsNode (com.liferay.ide.portlet.ui.navigator.PortletsNode)1