Ejemplo n.º 1
0
  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * Update the middleName Label
   *
   * @generated NOT
   */
  private void updateMiddleNameLabel() {
    Association association = (Association) Utils.getElement(getGraphEdge());

    AssociationFigure fig = ((AssociationFigure) getFigure());
    EdgeObjectOffsetEditableLabel label =
        (EdgeObjectOffsetEditableLabel) fig.getmiddleNameEdgeObjectFigure();
    label.setText(association.getName());
  }
Ejemplo n.º 2
0
 /**
  * Gets the association name.
  *
  * @param association the association
  * @return the association name
  */
 public String getAssociationName(Association association) {
   EList<Comment> comments = association.getComments();
   for (Comment comment : comments) {
     EList<Stereotype> stereotypes = comment.getStereotypes();
     for (Stereotype stereotype : stereotypes) {
       if (stereotype.getName().equals(FormGeneratorsManager.ALFRESCO_NAME_ASSOCIATION)) {
         return comment.getValue();
       }
     }
   }
   return association.getName();
 }
Ejemplo n.º 3
0
  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated NOT
   */
  protected void refreshEdgeObjects() {
    super.refreshEdgeObjects();

    // Check whether the association has its two Properties set
    if (((GraphEdge) getModel()).getAnchor().size() != 0) {
      Association association = (Association) Utils.getElement(getGraphEdge());
      if (association.getName() == null) {
        association.setName("Association");
      }
      // create associationEnd objects
      AssociationHelper.createAssociationsEnds(this, association);
      updateSourceDecoration();
      updateTargetDecoration();
      updateSrcCountLabel();
      updateSrcNameLabel();
      updateTargetCountLabel();
      updateTargetNameLabel();
    }

    updateMiddleNameLabel();
  }