use of com.centurylink.mdw.plugin.designer.editors.TaskTemplateEditor in project mdw-designer by CenturyLinkCloud.
the class WorkflowAssetEditor method openWorkflowAsset.
private void openWorkflowAsset() {
if (workflowAsset instanceof WorkflowProcess) {
IWorkbenchPage page = MdwPlugin.getActivePage();
WorkflowProcess proc = (WorkflowProcess) workflowAsset;
try {
page.openEditor(proc, "mdw.editors.process");
} catch (PartInitException ex) {
PluginMessages.uiError(MdwPlugin.getShell(), ex, "Open Process", getProject());
}
} else if (workflowAsset instanceof TaskTemplate) {
IWorkbenchPage page = MdwPlugin.getActivePage();
TaskTemplate taskTemplate = (TaskTemplate) workflowAsset;
try {
FileEditorInput editorInput = new FileEditorInput(taskTemplate.getAssetFile());
TaskTemplateEditor editor = (TaskTemplateEditor) page.openEditor(editorInput, "mdw.editors.taskTemplate");
editor.setProcess(getProcess());
} catch (PartInitException ex) {
PluginMessages.uiError(MdwPlugin.getShell(), ex, "Open Process", getProject());
}
} else {
((WorkflowAsset) workflowAsset).openFile(new NullProgressMonitor());
}
}
Aggregations