Package org.eclipse.bpmn2

Examples of org.eclipse.bpmn2.LaneSet


      Activator.logError(e);
    }

    Participant sourceParticipant = (Participant) getBusinessObjectForPictogramElement(context.getSourceContainer());

    LaneSet laneSet = null;
    for (LaneSet set : sourceParticipant.getProcessRef().getLaneSets()) {
      if (set.getLanes().contains(movedLane)) {
        laneSet = set;
        break;
      }
    }

    if (laneSet != null) {
      laneSet.getLanes().remove(movedLane);
      if (laneSet.getLanes().isEmpty()) {
        sourceParticipant.getProcessRef().getLaneSets().remove(laneSet);
      }
    }

    if (toLane.getChildLaneSet() == null) {
      LaneSet createLaneSet = ModelHandler.FACTORY.createLaneSet();
//      createLaneSet.setId(EcoreUtil.generateUUID());
      toLane.setChildLaneSet(createLaneSet);
      ModelUtil.setID(createLaneSet);
    }
    toLane.getChildLaneSet().getLanes().add(movedLane);
View Full Code Here


      Activator.logError(e);
    }

    Participant sourceParticipant = (Participant) getBusinessObjectForPictogramElement(context.getSourceContainer());

    LaneSet laneSet = null;
    for (LaneSet set : sourceParticipant.getProcessRef().getLaneSets()) {
      if (set.getLanes().contains(movedLane)) {
        laneSet = set;
        break;
      }
    }

    if (laneSet != null) {
      laneSet.getLanes().remove(movedLane);
      if (laneSet.getLanes().isEmpty()) {
        sourceParticipant.getProcessRef().getLaneSets().remove(laneSet);
      }

      Process process = targetParticipant.getProcessRef();
      if (process.getLaneSets().isEmpty()) {
        LaneSet createLaneSet = ModelHandler.FACTORY.createLaneSet();
//        createLaneSet.setId(EcoreUtil.generateUUID());
        process.getLaneSets().add(createLaneSet);
        ModelUtil.setID(createLaneSet);
      }
      process.getLaneSets().get(0).getLanes().add(movedLane);
View Full Code Here

    FeatureSupport.redraw(context.getTargetContainer());
  }

  private void modifyModelStructure(Lane sourceLane, Lane targetLane, Lane movedLane) {
    if (targetLane.getChildLaneSet() == null) {
      LaneSet createLaneSet = ModelHandler.FACTORY.createLaneSet();
//      createLaneSet.setId(EcoreUtil.generateUUID());
      targetLane.setChildLaneSet(createLaneSet);
      ModelUtil.setID(createLaneSet);
    }
View Full Code Here

    FeatureSupport.redraw(context.getTargetContainer());
  }

  private void modifyModelStructure(Lane targetLane, Lane lane) {
    LaneSet laneSet = (LaneSet) lane.eContainer();
    laneSet.getLanes().remove(lane);

    if (laneSet.getLanes().size() == 0) {
      EObject container = laneSet.eContainer();
      if (container instanceof Process) {
        Process p = (Process) container;
        p.getLaneSets().remove(laneSet);
      }
    }

    if (targetLane.getChildLaneSet() == null) {
      LaneSet createLaneSet = ModelHandler.FACTORY.createLaneSet();
//      createLaneSet.setId(EcoreUtil.generateUUID());
      targetLane.setChildLaneSet(createLaneSet);
      ModelUtil.setID(createLaneSet);
    }
View Full Code Here

      Activator.logError(e);
    }

    Process process = targetParticipant.getProcessRef();
    if (process.getLaneSets().isEmpty()) {
      LaneSet createLaneSet = ModelHandler.FACTORY.createLaneSet();
//      createLaneSet.setId(EcoreUtil.generateUUID());
      process.getLaneSets().add(createLaneSet);
      ModelUtil.setID(createLaneSet);
    }
    process.getLaneSets().get(0).getLanes().add(movedLane);
View Full Code Here

      } else if (parent instanceof Lane) {
        return isChildParent(parent, child);
      }
    } else if (parent instanceof Lane) {
      if (child instanceof Lane) {
        LaneSet childLaneSet = ((Lane) parent).getChildLaneSet();
        if (childLaneSet == null) {
          return false;
        }
        if (((Lane) parent).getChildLaneSet().getLanes().contains(child)) {
          return true;
View Full Code Here

    return false;
  }

  private boolean isChildParent(BaseElement parent, BaseElement child) {
    LaneSet childLaneSet = ((Lane) parent).getChildLaneSet();
    if (childLaneSet == null) {
      return false;
    }

    List<Lane> lanes = childLaneSet.getLanes();
    for (Lane lane : lanes) {
      if (isParent(lane, child)) {
        return true;
      }
    }
View Full Code Here

    if (targetLane.getChildLaneSet() == null) {
      targetLane.setChildLaneSet(ModelHandler.FACTORY.createLaneSet());
    }

    LaneSet targetLaneSet = targetLane.getChildLaneSet();
    targetLaneSet.getLanes().add(lane);

    lane.getFlowNodeRefs().addAll(targetLane.getFlowNodeRefs());
    targetLane.getFlowNodeRefs().clear();

    return lane;
View Full Code Here

    Lane lane = FACTORY.createLane();
//    lane.setId(EcoreUtil.generateUUID());
    ModelUtil.setID(lane,resource);
    FlowElementsContainer container = getFlowElementContainer(target);
    if (container.getLaneSets().isEmpty()) {
      LaneSet laneSet = FACTORY.createLaneSet();
//      laneSet.setId(EcoreUtil.generateUUID());
      container.getLaneSets().add(laneSet);
    }
    container.getLaneSets().get(0).getLanes().add(lane);
    ModelUtil.setID(lane);
View Full Code Here

    ModelUtil.setID(lane);
    return lane;
  }

  public void laneToTop(Lane lane) {
    LaneSet laneSet = FACTORY.createLaneSet();
//    laneSet.setId(EcoreUtil.generateUUID());
    ModelUtil.setID(laneSet,resource);
    laneSet.getLanes().add(lane);
    Process process = getOrCreateProcess(getInternalParticipant());
    process.getLaneSets().add(laneSet);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.bpmn2.LaneSet

Copyright © 2018 www.massapicom. 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.