+ Composite statusComposite = tk.createComposite(controls);
+ RowData rowData = new RowData();
+ rowData.width = 100;
+ rowData.height = 16;
+ statusComposite.setLayoutData(rowData);
+ statusComposite.setLayout(new FillLayout());
+ statusLabel = tk.createLabel(statusComposite, getProcessStatus());
+
+ // make sure all controls are in line with status
+ statusChanged();
+ }
+
+ protected void relaunch() {
+ try {
+ Node duplicatedNode = duplicateProcess();
+ PlatformUI
+ .getWorkbench()
+ .getActiveWorkbenchWindow()
+ .getActivePage()
+ .openEditor(
+ new ProcessEditorInput(duplicatedNode.getPath()),
+ ProcessEditor.ID);
+ getEditor().close(false);
+ } catch (Exception e1) {
+ throw new SlcException("Cannot relaunch " + processNode, e1);
+ }
+ }
+
+ protected Node duplicateProcess() {
+ try {
+ Session session = processNode.getSession();
+ String uuid = UUID.randomUUID().toString();
+ String destPath = SlcJcrUtils.createExecutionProcessPath(uuid);
+ Node newNode = JcrUtils.mkdirs(session, destPath, SLC_PROCESS);
+ JcrUtils.copy(processNode, newNode);
+// session.getWorkspace().copy(processNode.getPath(), destPath);
+// Node newNode = session.getNode(destPath);
+ // make sure that we kept the mixins
+// newNode.addMixin(NodeType.MIX_CREATED);
+// newNode.addMixin(NodeType.MIX_LAST_MODIFIED);
+ newNode.setProperty(SLC_UUID, uuid);
+ newNode.setProperty(SLC_STATUS, ExecutionProcess.INITIALIZED);
+ session.save();
+ return newNode;
+ } catch (RepositoryException e) {
+ throw new SlcException("Cannot duplicate process", e);
+ }