Examples of maintainReferences()


Examples of org.openbp.core.model.item.process.DataLink.maintainReferences()

      DataLink link = (DataLink) it.next();

      target.addDataLink(link);

      // Determine the reference names after adding the object to the target
      link.maintainReferences(ModelObject.SYNC_LOCAL_REFNAMES);

      ParamConnection paramConnection = drawing.createParamConnection(link);
      if (paramConnection == null)
      {
        target.removeDataLink(link);
View Full Code Here

Examples of org.openbp.core.model.item.process.Node.maintainReferences()

      Node node = (Node) it.next();

      target.addNode(node);

      // Rebuild the references after adding the object to the target
      node.maintainReferences(ModelObject.SYNC_GLOBAL_REFNAMES);

      NodeFigure nodeFigure = drawing.createNodeFigure(node);
      if (nodeFigure == null)
      {
        target.removeNode(node);
View Full Code Here

Examples of org.openbp.core.model.item.process.Node.maintainReferences()

        editor.startUndo("Add Node");

        Node node = nodeFigure.getNode();
        process.addNode(node);
        node.maintainReferences(ModelObject.SYNC_GLOBAL_REFNAMES | ModelObject.SYNC_LOCAL_REFNAMES);

        nodeFigure.displayBox(new Rectangle(p));
        add(nodeFigure);
        addedFigure = nodeFigure;
      }
View Full Code Here

Examples of org.openbp.core.model.item.process.NodeParam.maintainReferences()

            param = (NodeParam) param.clone();

            NamedObjectCollectionUtil.createUniqueName(param, targetSocket.getParamList());

            targetSocket.addParam(param, - 1);
            param.maintainReferences(ModelObject.RESOLVE_GLOBAL_REFS | ModelObject.RESOLVE_LOCAL_REFS);

            // Add the corresponding param figure and select it
            ParamFigure paramFigure = socketFigure.addParam(param, - 1);
            workspaceView.addToSelection(paramFigure);
View Full Code Here

Examples of org.openbp.core.model.item.process.NodeParam.maintainReferences()

        NodeParam param = socket.createParam(paramName);
        param.setDataType(paramType);

        // Add the param to the socket
        socket.addParam(param, pos - 1);
        param.maintainReferences(ModelObject.SYNC_GLOBAL_REFNAMES | ModelObject.SYNC_LOCAL_REFNAMES);

        // Add the parameter figure to the socket figure
        ParamFigure paramFigure = addParam(param, pos);

        ((WorkspaceDrawingView) getDrawing().getEditor().view()).singleSelect(paramFigure);
View Full Code Here

Examples of org.openbp.core.model.item.process.NodeSocket.maintainReferences()

            socket = (NodeSocket) socket.clone();

            NamedObjectCollectionUtil.createUniqueName(socket, targetNode.getSocketList());

            targetNode.addSocket(socket);
            socket.maintainReferences(ModelObject.RESOLVE_GLOBAL_REFS | ModelObject.RESOLVE_LOCAL_REFS);

            // Add the corresponding socket figure and select it
            // TODO Feature 5: We should take care that an existing socket is not overlayed by the new socket
            SocketFigure socketFigure = nodeFigure.addSocket(socket);
            workspaceView.addToSelection(socketFigure);
View Full Code Here

Examples of org.openbp.core.model.item.process.ProcessItem.maintainReferences()

      ExceptionUtil.printTrace(e);
      return;
    }

    // Make sure that the parent-child links and control and data links are valid
    clonedProcess.maintainReferences(ModelObject.RESOLVE_LOCAL_REFS);

    processQualifier = clonedProcess.getQualifier();

    drawing = new ProcessDrawing(clonedProcess, this);
    drawing.setReadOnly(readonly);
View Full Code Here

Examples of org.openbp.core.model.item.process.ProcessItem.maintainReferences()

      }

      // Re-establish inter-object links and links to other items
      // and remove links to figures to make the gc work
      // TODO Fix 4 This seems to produce some maintainReferences error: "Cannot resolve ... in Model /System"
      process.maintainReferences(ModelObject.RESOLVE_GLOBAL_REFS | ModelObject.RESOLVE_LOCAL_REFS | ModelObject.UNLINK_FROM_REPRESENTATION);

      if (copyFlavor != null && (process.getNodes().hasNext() || process.getTextElements().hasNext()))
      {
        Transferable ret = new SimpleTransferable(process, copyFlavor);
View Full Code Here

Examples of org.openbp.core.model.item.process.ProcessItem.maintainReferences()

    // We will copy to our target process
    ProcessDrawing drawing = (ProcessDrawing) workspaceView.drawing();
    ProcessItem target = drawing.getProcess();

    // Make sure the references names of the target are up to date
    target.maintainReferences(ModelObject.SYNC_LOCAL_REFNAMES | ModelObject.SYNC_GLOBAL_REFNAMES);

    // We need to make the names in the source process unique with respect to our target process
    NamedObjectCollectionUtil.createUniqueNames(source.getNodeList(), target.getNodeList());
    NamedObjectCollectionUtil.createUniqueNames(source.getTextElementList(), target.getTextElementList());
    NamedObjectCollectionUtil.createUniqueNames(source.getDataLinkList(), target.getDataLinkList());
View Full Code Here

Examples of org.openbp.core.model.item.process.ProcessItemImpl.maintainReferences()

      }

      // Re-establish inter-object links and links to other items
      // and remove links to figures to make the gc work
      // TODO Fix 4 This seems to produce some maintainReferences error: "Cannot resolve ... in Model /System"
      process.maintainReferences(ModelObject.RESOLVE_GLOBAL_REFS | ModelObject.RESOLVE_LOCAL_REFS | ModelObject.UNLINK_FROM_REPRESENTATION);

      if (copyFlavor != null && (process.getNodes().hasNext() || process.getTextElements().hasNext()))
      {
        Transferable ret = new SimpleTransferable(process, copyFlavor);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.