Package org.ringojs.util

Examples of org.ringojs.util.MarkdownProcessor$BaseElement


      }
    }
  }

  private void handleLane(BaseElement bpmnElement, AddContext context, BPMNShape shape) {
    BaseElement parent = (BaseElement) ((Lane) bpmnElement).eContainer().eContainer();
    ContainerShape cont = diagram;

    // find the process this lane belongs to
    for (BaseElement be : elements.keySet()) {
      if (be instanceof Participant) {
        Process processRef = ((Participant) be).getProcessRef();
        if (processRef != null && parent.getId().equals(processRef.getId())) {
          cont = (ContainerShape) elements.get(be);
          break;
        }
      } else if (be instanceof Process) {
        if (be.getId().equals(parent.getId())) {
          cont = (ContainerShape) elements.get(be);
          break;
        }
      } else if (be instanceof Lane) {
        if (be.getId().equals(parent.getId())) {
          cont = (ContainerShape) elements.get(be);
          break;
        }
      }
    }
View Full Code Here


  private BaseElement findElementById ( String id ) {
    if (elements.keySet().size() > 0) {
      Iterator<BaseElement> keys = elements.keySet().iterator();
      while (keys.hasNext()) {
        BaseElement key = keys.next();
        if (key != null && key.getId().equals(id))
          return key;
      }
    }
    return null;
  }
View Full Code Here

    }
    return null;
  }
 
  private Tuple<BaseElement, BaseElement> getSourceAndTargetByID String id ) {
    BaseElement source = null;
    BaseElement target = null;
    int indexOfDash = id.indexOf('-');
    if (indexOfDash > -1) {
      String srcRefFromId = id.substring(0, indexOfDash);
      String tgtRefFromId = id.substring(indexOfDash + 1, id.length());
      source = findElementById(srcRefFromId);
View Full Code Here

   * Find a Graphiti feature for given edge and generate necessary connections and bendpoints.
   *
   * @param shape
   */
  private void createEdge(BPMNEdge bpmnEdge) {
    BaseElement bpmnElement = bpmnEdge.getBpmnElement();
    EObject source = null;
    EObject target = null;
    PictogramElement se = null;
    PictogramElement te = null;

    String id = bpmnElement.getId();

    // for some reason connectors don't have a common interface
    if (bpmnElement instanceof MessageFlow) {
      source = ((MessageFlow) bpmnElement).getSourceRef();
      target = ((MessageFlow) bpmnElement).getTargetRef();
View Full Code Here

      return -1;
    } else if (!aIsPool && bIsPool) {
      return 1;
    }

    BaseElement aElem = a.getBpmnElement();
    BaseElement bElem = b.getBpmnElement();
    boolean aIsSecondTier = aElem instanceof Lane || aElem instanceof SubProcess
        || aElem instanceof SubChoreography;
    boolean bIsSecondTier = bElem instanceof Lane || bElem instanceof SubProcess
        || bElem instanceof SubChoreography;
View Full Code Here

    getOrCreateCollaboration().getConversationLinks().add(link);
    return link;
  }

  public Association createAssociation(BaseElement source, BaseElement target) {
    BaseElement e = null;
    if (getParticipant(source) != null) {
      e = source;
    } else if (getParticipant(target) != null) {
      e = target;
    } else {
View Full Code Here

      A source = getSourceBo(context);
      B target = getTargetBo(context);
      ModelHandler mh = ModelHandler.getInstance(getDiagram());
      AddConnectionContext addContext = new AddConnectionContext(context.getSourceAnchor(),
          context.getTargetAnchor());
      BaseElement flow = createFlow(mh, source, target);
//      flow.setId(EcoreUtil.generateUUID());
      addContext.setNewObject(flow);
      Connection connection = (Connection) getFeatureProvider().addIfPossible(addContext);
      ModelUtil.setID(flow);
      return connection;
View Full Code Here

  @Override
  public PictogramElement add(IAddContext context) {
    IPeService peService = Graphiti.getPeService();
    IGaService gaService = Graphiti.getGaService();

    BaseElement element = (BaseElement) context.getNewObject();
    IAddConnectionContext addConContext = (IAddConnectionContext) context;

    Connection connection = peService.createFreeFormConnection(getDiagram());

    Object importProp = context.getProperty(DIImport.IMPORT_PROPERTY);
View Full Code Here

    }

    @Override
    public boolean canReconnect(IReconnectionContext context) {
      if (super.canReconnect(context)) {
        BaseElement targetElement = BusinessObjectUtil.getFirstElementOfType(context.getTargetPictogramElement(), BaseElement.class);
        return targetElement instanceof Participant;
      }
      return false;
    }
View Full Code Here

    }

    @Override
    public boolean canReconnect(IReconnectionContext context) {
      if (super.canReconnect(context)) {
        BaseElement targetElement = BusinessObjectUtil.getFirstElementOfType(context.getTargetPictogramElement(), BaseElement.class);
        return targetElement instanceof FlowNode;
      }
      return false;
    }
View Full Code Here

TOP

Related Classes of org.ringojs.util.MarkdownProcessor$BaseElement

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.