Package org.eclipse.bpmn2

Examples of org.eclipse.bpmn2.BaseElement


     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setSourceRef(BaseElement newSourceRef) {
        BaseElement oldSourceRef = sourceRef;
        sourceRef = newSourceRef;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET,
                    Bpmn2Package.ASSOCIATION__SOURCE_REF, oldSourceRef, sourceRef));
    }
View Full Code Here


     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setTargetRef(BaseElement newTargetRef) {
        BaseElement oldTargetRef = targetRef;
        targetRef = newTargetRef;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET,
                    Bpmn2Package.ASSOCIATION__TARGET_REF, oldTargetRef, targetRef));
    }
View Full Code Here

          }

          private void createNewProperty(final EObject baseElement, final EReference eReference) {
            Object eGet = baseElement.eGet(eReference);
            if (value instanceof BaseElement) {
              BaseElement e = ((BaseElement) value);
              if (e.getId() == null) {
//                e.setId(EcoreUtil.generateUUID());
                ModelUtil.setID(e,baseElement.eResource());
              }
            }
View Full Code Here

    PictogramElement foundElem = null;

    IPeService peService = Graphiti.getPeService();
    Collection<PictogramElement> elements = peService.getAllContainedPictogramElements(diagram);
    for (PictogramElement pe : elements) {
      BaseElement be = getFirstElementOfType(pe, e.getClass());
      if (be != null && be.equals(e)) {
        foundElem = pe;
        break;
      }
    }
View Full Code Here

    return true;
  }

  @Override
  public Object[] create(ICreateContext context) {
    BaseElement element = null;
    try {
      ModelHandler handler = ModelHandlerLocator.getModelHandler(getDiagram().eResource());
      element = add(context.getTargetContainer(), handler);
    } catch (IOException e) {
      Activator.logError(e);
View Full Code Here

      return new Dimension(newWidth, newHeight);
    }
  }

  private static Dimension resizeRecursively(ContainerShape root) {
    BaseElement elem = BusinessObjectUtil.getFirstElementOfType(root, BaseElement.class);
    List<Dimension> dimensions = new ArrayList<Dimension>();
    IGaService service = Graphiti.getGaService();
    int foundContainers = 0;

    for (Shape s : root.getChildren()) {
View Full Code Here

    return new Dimension(width, height);
  }

  private static void postResizeFixLenghts(ContainerShape root) {
    IGaService service = Graphiti.getGaService();
    BaseElement elem = BusinessObjectUtil.getFirstElementOfType(root, BaseElement.class);
    int width = root.getGraphicsAlgorithm().getWidth() - 15;

    for (Shape s : root.getChildren()) {
      Object o = BusinessObjectUtil.getFirstElementOfType(s, BaseElement.class);
      if (checkForResize(elem, s, o)) {
View Full Code Here

      }
      else {
        edge.setSourceElement(de);
      }
     
      BaseElement flow = BusinessObjectUtil.getFirstElementOfType(context.getConnection(), BaseElement.class);
      BaseElement be = BusinessObjectUtil.getFirstElementOfType(context.getTargetPictogramElement(), BaseElement.class);
      if (context.getReconnectType().equals(ReconnectionContext.RECONNECT_TARGET)) {
        EStructuralFeature feature = flow.eClass().getEStructuralFeature("targetRef");
        if (feature!=null)
          flow.eSet(feature, be);
      }
View Full Code Here

    super(fp);
  }

  @Override
  public boolean canUpdate(IUpdateContext context) {
    BaseElement element = (BaseElement) BusinessObjectUtil.getFirstElementOfType(context.getPictogramElement(),
            BaseElement.class);
    if (element == null) {
      return false;
    }
    return ModelUtil.hasName(element);
View Full Code Here

  @Override
  public IReason updateNeeded(IUpdateContext context) {
    PictogramElement container = context.getPictogramElement();

    BaseElement element = (BaseElement) BusinessObjectUtil.getFirstElementOfType(context.getPictogramElement(),
            BaseElement.class);

    String elementName = ModelUtil.getName(element);
    Shape textShape = getChildElementOfType(container, TEXT_ELEMENT, Boolean.toString(true), Shape.class);
    if (textShape!=null) {
View Full Code Here

TOP

Related Classes of org.eclipse.bpmn2.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.