Examples of maintainReferences()


Examples of org.openbp.core.model.Model.maintainReferences()

      case ModelNotificationService.ADDED:
        // Read the model and repair hiearchy, establish links and instantiate the model
        model = readModelFromStore(qualifier);
        if (model != null)
        {
          model.maintainReferences(ModelObject.RESOLVE_GLOBAL_REFS | ModelObject.RESOLVE_LOCAL_REFS | ModelObject.INSTANTIATE_ITEM);
        }
        break;

      case ModelNotificationService.UPDATED:
        model = getOptionalModelByQualifier(qualifier);
View Full Code Here

Examples of org.openbp.core.model.Model.maintainReferences()

    {
      Model model = (Model) it.next();

      // After a model has been read, the links to other objects must be established
      // and the objects instantiated if necessary
      model.maintainReferences(flag);

      // TODO Feature 4 Trigger unit event
    }
  }
View Full Code Here

Examples of org.openbp.core.model.ModelObject.maintainReferences()

          }
        }

        // Make sure the global reference names are up to date or else we may have trouble
        // saving the object (the ModelObjectValidator will try to rebuild the references from the names)
        mo.maintainReferences(ModelObject.SYNC_GLOBAL_REFNAMES | ModelObject.SYNC_LOCAL_REFNAMES);

        String title = mo.getName();
        String modelObjectTypeName = mo.getModelObjectTypeName();
        if (modelObjectTypeName != null)
        {
View Full Code Here

Examples of org.openbp.core.model.ModelObject.maintainReferences()

        ExceptionUtil.printTrace(e);
        return EVENT_CONSUMED;
      }

      // Make sure all subordinate objects refer to this object
      orig.maintainReferences(0);

      drawing.updateFigure();
      drawing.invalidate();
      workspaceView.checkDamage();
View Full Code Here

Examples of org.openbp.core.model.ModelObject.maintainReferences()

    ModelObject mo = (ModelObject) editedObject;

    StandardMsgContainer msgContainer = ModelConnector.getInstance().getMsgContainer();
    msgContainer.clearMsgs();

    mo.maintainReferences(ModelObject.VALIDATE_BASIC | ModelObject.RESOLVE_GLOBAL_REFS);
    checkNameUniqueness(mo, pb);

    // Print errors and return if any have been found
    if (! displayMsgContainer())
      return false;
View Full Code Here

Examples of org.openbp.core.model.item.Item.maintainReferences()

      // Copy the item data
      currentItem.copyFrom(argItem, Copyable.COPY_DEEP);

      // Repair hiearchy and establish links
      currentItem.setModel(currentModel);
      currentItem.maintainReferences(ModelObject.RESOLVE_GLOBAL_REFS | ModelObject.RESOLVE_LOCAL_REFS);
    }
    catch (CloneNotSupportedException e)
    {
      throw new ModelException("Clone", "Cannot update component '" + currentItem.getQualifier() + "': " + e.getMessage());
    }
View Full Code Here

Examples of org.openbp.core.model.item.Item.maintainReferences()

      {
        Item item = (Item) itItems.next();

        item.setModel(this);

        item.maintainReferences(flag);

        if ((flag & INSTANTIATE_ITEM) != 0)
        {
          // Instantiate classes referenced by the item
          item.instantiate();
View Full Code Here

Examples of org.openbp.core.model.item.Item.maintainReferences()

        // TODONOW Item item = (Item) source.clone();

        Model model = getSelectedModel(ItemBrowserPlugin.GUESS_MODEL | ItemBrowserPlugin.USE_CURRENT_MODEL);
        item.setModel(model);

        item.maintainReferences(ModelObject.SYNC_GLOBAL_REFNAMES | ModelObject.RESOLVE_LOCAL_REFS);

        // Find a new name for the item; we generate the name by appending a running number to the item type
        String oldName = item.getName();
        ItemUtil.ensureUniqueItemName(item, model);
        String newName = item.getName();
View Full Code Here

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

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

      target.addControlLink(link);

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

      FlowConnection flowConnection = drawing.createFlowConnection(link);
      if (flowConnection == null)
      {
        target.removeControlLink(link);
View Full Code Here

Examples of org.openbp.core.model.item.process.ControlLink.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
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.