Search in sources :

Example 1 with PortletXmlEditor

use of com.liferay.ide.portlet.ui.editor.PortletXmlEditor 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

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