]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/editors/ProcessBuilderPage.java
Migrate SLC modules
[gpl/argeo-slc.git] / plugins / org.argeo.slc.client.ui / src / main / java / org / argeo / slc / client / ui / editors / ProcessBuilderPage.java
index 1444ff185c5750f99bb4d297966ff97260b228c1..07817cc2a623e7e5e1fb3019c86ad4dc43c724c7 100644 (file)
@@ -347,6 +347,8 @@ public class ProcessBuilderPage extends FormPage implements SlcNames {
                        Node flowNode = processNode.getSession().getNode(path);
                        Node realizedFlowNode = processNode.getNode(SLC_FLOW).addNode(
                                        SLC_FLOW);
+                       realizedFlowNode.setProperty(SLC_NAME,
+                                       flowNode.getProperty(SLC_NAME).getString());
                        realizedFlowNode.addMixin(SlcTypes.SLC_REALIZED_FLOW);
                        Node address = realizedFlowNode.addNode(SLC_ADDRESS,
                                        NodeType.NT_ADDRESS);
@@ -385,10 +387,21 @@ public class ProcessBuilderPage extends FormPage implements SlcNames {
                                }
                        }
 
+                       // Part title
+                       StringBuilder editorTitle = new StringBuilder();
+                       NodeIterator it = realizedFlowNode.getParent().getNodes(SLC_FLOW);
+                       while (it.hasNext()) {
+                               Node rFlowNode = it.nextNode();
+                               String name = rFlowNode.getProperty(SLC_NAME).getString();
+                               editorTitle.append(name).append(' ');
+                       }
+                       ((ProcessEditor) getEditor())
+                                       .setEditorTitle(editorTitle.toString());
+
                        flowsViewer.refresh();
                        formPart.markDirty();
                } catch (RepositoryException e) {
-                       throw new SlcException("Cannot drop " + path, e);
+                       throw new SlcException("Cannot add flow " + path, e);
                }
        }