- if (obj instanceof ExecutionModulesContentProvider.FlowNode) {
- ExecutionModulesContentProvider.FlowNode fn = (ExecutionModulesContentProvider.FlowNode) obj;
-
- List<RealizedFlow> realizedFlows = new ArrayList<RealizedFlow>();
- RealizedFlow realizedFlow = new RealizedFlow();
- realizedFlow.setModuleName(fn.getExecutionModuleNode()
- .getDescriptor().getName());
- realizedFlow.setModuleVersion(fn.getExecutionModuleNode()
- .getDescriptor().getVersion());
- realizedFlow.setFlowDescriptor(fn.getExecutionModuleNode()
- .getFlowDescriptors().get(fn.getFlowName()));
- realizedFlows.add(realizedFlow);
-
- SlcExecution slcExecution = new SlcExecution();
- slcExecution.setUuid(UUID.randomUUID().toString());
- slcExecution.setRealizedFlows(realizedFlows);
- slcExecution.setHost(fn.getExecutionModuleNode().getAgentNode()
- .getAgent().toString());
- processController.execute(fn.getExecutionModuleNode()
- .getAgentNode().getAgent(), slcExecution);
+ try {
+ if (obj instanceof Node) {
+ Node node = (Node) obj;
+ if (node.isNodeType(SLC_EXECUTION_FLOW)) {
+ List<String> paths = new ArrayList<String>();
+ paths.add(node.getPath());
+ IWorkbenchPage activePage = PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage();
+ activePage.openEditor(new ProcessEditorInput(paths,
+ true), ProcessEditor.ID);
+ }
+ }
+ } catch (Exception e) {
+ throw new SlcException("Cannot open " + obj, e);