use of org.talend.mdm.repository.ui.wizards.process.NewProcessWizard in project tmdm-studio-se by Talend.
the class NewProcessAction method doRun.
@Override
protected void doRun() {
parentItem = null;
selectObj = getSelectedObject().get(0);
int type = getType();
if (selectObj instanceof IRepositoryViewObject) {
Item pItem = ((IRepositoryViewObject) selectObj).getProperty().getItem();
if (pItem instanceof ContainerItem) {
parentItem = (ContainerItem) pItem;
}
}
IWorkbenchPartSite site = commonViewer.getCommonNavigator().getSite();
// wizard
NewProcessWizard newProcessWizard = new NewProcessWizard(site, type);
WizardDialog wizardDialog = new WizardDialog(getShell(), newProcessWizard);
wizardDialog.setPageSize(500, 260);
if (wizardDialog.open() == IDialogConstants.OK_ID) {
WSTransformerV2E newProcess = newProcessWizard.getNewProcess();
final Item item = createServerObject(newProcess);
commonViewer.refresh(selectObj);
commonViewer.expandToLevel(selectObj, 1);
openEditor(item);
if (newProcessWizard.isCreateJob()) {
generateJobTemplate(newProcessWizard.getType(), newProcessWizard.getProcessName(), newProcessWizard.getReturnMessages(), newProcessWizard.isEnableRedirect(), newProcessWizard.getRedirectUrl(), newProcessWizard.getJobTemplates());
refreshJobEditorTitle(item);
}
}
}
Aggregations