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;
}
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();
}
}
}
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;
}
Aggregations