use of com.centurylink.mdw.plugin.designer.wizards.WorkflowAssetPage in project mdw-designer by CenturyLinkCloud.
the class WorkflowAssetEditor method createWorkflowAsset.
@SuppressWarnings("restriction")
private WorkflowElement createWorkflowAsset() {
if (isProcess()) {
WorkflowElementActionHandler actionHandler = new WorkflowElementActionHandler();
actionHandler.create(WorkflowProcess.class, getElement().getPackage());
return null;
} else {
IWorkbench workbench = PlatformUI.getWorkbench();
org.eclipse.ui.internal.dialogs.NewWizard wizard = new org.eclipse.ui.internal.dialogs.NewWizard();
wizard.setCategoryId("mdw.designer.asset");
wizard.init(workbench, new StructuredSelection(new Object[] { getElement().getPackage() }));
IDialogSettings workbenchSettings = org.eclipse.ui.internal.ide.IDEWorkbenchPlugin.getDefault().getDialogSettings();
IDialogSettings wizardSettings = workbenchSettings.getSection("NewWizardAction");
if (wizardSettings == null)
wizardSettings = workbenchSettings.addNewSection("NewWizardAction");
wizardSettings.put("NewWizardSelectionPage.STORE_SELECTED_ID", getWizardId());
wizard.setDialogSettings(wizardSettings);
wizard.setForcePreviousAndNextButtons(true);
if (isTaskTemplate() && getElement() instanceof Activity) {
Activity activity = (Activity) getElement();
if (activity.isAutoFormManualTask())
wizardSettings.put(TaskTemplate.TASK_TYPE, TaskTemplate.AUTOFORM);
else
wizardSettings.put(TaskTemplate.TASK_TYPE, TaskTemplate.CUSTOM);
}
WizardDialog dialog = new WizardDialog(null, wizard);
dialog.create();
dialog.open();
IWizardPage wizardPage = dialog.getCurrentPage();
if (wizardPage instanceof WorkflowAssetPage)
return ((WorkflowAssetPage) wizardPage).getWorkflowAsset();
}
return null;
}
use of com.centurylink.mdw.plugin.designer.wizards.WorkflowAssetPage in project mdw-designer by CenturyLinkCloud.
the class ParameterizedCombo method createParamAsset.
@SuppressWarnings("restriction")
private WorkflowAsset createParamAsset(String[] paramTypes) {
IWorkbench workbench = PlatformUI.getWorkbench();
org.eclipse.ui.internal.dialogs.NewWizard wizard = new org.eclipse.ui.internal.dialogs.NewWizard();
wizard.setCategoryId("mdw.designer.asset");
wizard.init(workbench, new StructuredSelection(new Object[] { workflowElement.getPackage() }));
IDialogSettings workbenchSettings = org.eclipse.ui.internal.ide.IDEWorkbenchPlugin.getDefault().getDialogSettings();
IDialogSettings wizardSettings = workbenchSettings.getSection("NewWizardAction");
if (wizardSettings == null)
wizardSettings = workbenchSettings.addNewSection("NewWizardAction");
wizardSettings.put("NewWizardSelectionPage.STORE_SELECTED_ID", getWizardId(paramTypes));
wizard.setDialogSettings(wizardSettings);
wizard.setForcePreviousAndNextButtons(true);
WizardDialog dialog = new WizardDialog(null, wizard);
dialog.create();
dialog.open();
IWizardPage wizardPage = dialog.getCurrentPage();
if (wizardPage instanceof WorkflowAssetPage)
return ((WorkflowAssetPage) wizardPage).getWorkflowAsset();
else
return null;
}
Aggregations