Package org.eclipse.uml2.uml

Examples of org.eclipse.uml2.uml.NamedElement


  }

  protected static String getDiagramName(EObject diagramDomainElement) {
    String result = null;
    if (diagramDomainElement instanceof NamedElement) {
      NamedElement named = (NamedElement) diagramDomainElement;
      result = named.getQualifiedName();
      if (result == null || result.length() == 0) {
        result = named.getName();
      }
    }
    return result;
  }
View Full Code Here


  }

  protected static String getDiagramName(EObject diagramDomainElement) {
    String result = null;
    if (diagramDomainElement instanceof NamedElement) {
      NamedElement named = (NamedElement) diagramDomainElement;
      result = named.getQualifiedName();
      if (result == null || result.length() == 0) {
        result = named.getName();
      }
    }
    return result;
  }
View Full Code Here

    if(in_oRegion.getClientDependencies().size() == 1)
    {
      Dependency oDep = in_oRegion.getClientDependencies().get(0);
      if(oDep.getSuppliers().size() == 1)
      {
        NamedElement oElem = oDep.getSuppliers().get(0);
        if(oElem instanceof org.eclipse.uml2.uml.Class)
        {
          return (org.eclipse.uml2.uml.Class)oElem;
        }
      }
View Full Code Here

    if(in_oRegion.getClientDependencies().size() == 1)
    {
      Dependency oDep = in_oRegion.getClientDependencies().get(0);
      if(oDep.getSuppliers().size() == 1)
      {
        NamedElement oElem = oDep.getSuppliers().get(0);
        if(oElem instanceof org.eclipse.uml2.uml.Class)
        {
          return (org.eclipse.uml2.uml.Class)oElem;
        }
      }
View Full Code Here

        if(colMatchedEventParameters.contains(oParameterInstance.getParameter().getReference())) {
          in_oFormattedOutput.append(
              TCGParameterHelperClass.
              getFullParameterInstanceAttributeName(oParameterInstance));
          if(oParameterInstance.getParameter().getValueType() instanceof NamedElement) {
            NamedElement oVTN = (NamedElement)oParameterInstance.getParameter().getValueType();
            in_oFormattedOutput.append(getTypeNameAccessFunction(oVTN.getName()));
          }
        }
      }
    }
    else if(in_oAtomExp.getOclReference() instanceof LiteralExp) {
View Full Code Here

    List<?> children = p.getChildren();
    if(children!=null) {
      Object child = null;
      EditPart childEditPart = null;
      String childName = null;
      NamedElement childElement = null;
      Node childModel = null;
      IElementHandling childH = null;
      for(int i=0 ; i<children.size() ; i++) {
        child = children.get(i);
        if((child!=null)&&(child instanceof EditPart)) {
          childEditPart = (EditPart)child;
          if(childEditPart.getModel() instanceof Node) {
            childModel = (Node)childEditPart.getModel();
            if(
                childModel.getElement()
                instanceof NamedElement
            ) {
              childElement =
                (NamedElement)childModel.getElement();
              childName =
                name
                +
                Resources.getParameter(
                    "constants.editingFileNamePrefix"
                )
                + childElement.getName();
              childH = getElementHandler(childName);
              if(
                  (
                      childEditPart instanceof
                      IGraphicalEditPart
View Full Code Here

   * <!-- begin-user-doc --> <!-- end-user-doc -->
   *
   * @generated
   */
  public void setBase_NamedElement(NamedElement newBase_NamedElement) {
    NamedElement oldBase_NamedElement = base_NamedElement;
    base_NamedElement = newBase_NamedElement;
    if(eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, AllocationsPackage.ALLOCATED__BASE_NAMED_ELEMENT, oldBase_NamedElement, base_NamedElement));
  }
View Full Code Here

   * <!-- begin-user-doc --> <!-- end-user-doc -->
   *
   * @generated
   */
  public void setBase_NamedElement(NamedElement newBase_NamedElement) {
    NamedElement oldBase_NamedElement = base_NamedElement;
    base_NamedElement = newBase_NamedElement;
    if(eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, RequirementsPackage.REQUIREMENT_RELATED__BASE_NAMED_ELEMENT, oldBase_NamedElement, base_NamedElement));
  }
View Full Code Here

  @Override
  protected void run(EObject element) {
    if (element == null) { // for design elements
      return;
    }
    NamedElement selectedNamedElement = ((NamedElement) element);
   
    this.activatePage();
   
    this._fd2uml.assignClass(selectedNamedElement.getName());
  }
View Full Code Here

import org.eclipse.uml2.uml.NamedElement;

public class NameIsValidClassicalBIdentifier extends AbstractModelConstraint {
  @Override
  public IStatus validate(IValidationContext ctx) {
    NamedElement element = (NamedElement) ctx.getTarget();
    String name = element.getName();
   
    if (name != null && !name.matches("[a-zA-Z][a-zA-Z0-9_]*")) {
      return ctx.createFailureStatus("The name '" + name + "' is not a valid Classical B identifier");
    }

View Full Code Here

TOP

Related Classes of org.eclipse.uml2.uml.NamedElement

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.