Package org.eclipse.uml2.uml

Examples of org.eclipse.uml2.uml.Dependency


    if(getBase_NamedElement() != null) {
      // Find Allocate link
      Iterator<Dependency> itDep = getBase_NamedElement().getClientDependencies().iterator();
      while(itDep.hasNext()) {
        Dependency currentDependency = itDep.next();
        currentAllocate = UMLUtil.getStereotypeApplication(currentDependency, Allocate.class);

        if(currentAllocate != null) {
          allocatedTo.addAll(currentAllocate.getBase_Abstraction().getSuppliers());
        }
View Full Code Here


    if(getBase_NamedElement() != null) {
      // Find Refine link
      Iterator<Dependency> itDep = getBase_NamedElement().getClientDependencies().iterator();

      while(itDep.hasNext()) {
        Dependency currentDependency = itDep.next();
        currentRefine = UMLUtil.getStereotypeApplication(currentDependency, Refine.class);

        if(currentRefine != null) {
          EList<NamedElement> suppliers = currentRefine.getBase_Abstraction().getSuppliers();
          Iterator<NamedElement> it = suppliers.iterator();
View Full Code Here

    if(getBase_NamedElement() != null) {
      // Find Satisfy link
      Iterator<Dependency> itDep = getBase_NamedElement().getClientDependencies().iterator();

      while(itDep.hasNext()) {
        Dependency currentDependency = itDep.next();
        currentSatisfy = UMLUtil.getStereotypeApplication(currentDependency, Satisfy.class);

        if(currentSatisfy != null) {
          EList<NamedElement> suppliers = currentSatisfy.getBase_Abstraction().getSuppliers();
          Iterator<NamedElement> it = suppliers.iterator();
View Full Code Here

    if(getBase_NamedElement() != null) {
      // Find Satisfy link
      Iterator<Dependency> itDep = getBase_NamedElement().getClientDependencies().iterator();

      while(itDep.hasNext()) {
        Dependency currentDependency = itDep.next();
        currentVerify = UMLUtil.getStereotypeApplication(currentDependency, Verify.class);

        if(currentVerify != null) {
          EList<NamedElement> suppliers = currentVerify.getBase_Abstraction().getSuppliers();
          Iterator<NamedElement> it = suppliers.iterator();
View Full Code Here

    if(getBase_Class() != null) {
      Iterator<Dependency> itDep = getBase_Class().getClientDependencies().iterator();

      // Find Copy link
      while(itDep.hasNext()) {
        Dependency currentDep = itDep.next();
        currentCopy = UMLUtil.getStereotypeApplication(currentDep, Copy.class);

        if(currentCopy != null) {
          EList<NamedElement> suppliers = currentCopy.getBase_Abstraction().getSuppliers();
          Iterator<NamedElement> it = suppliers.iterator();
View Full Code Here

      } else { // if (getBase_Operation() != null)
        itDep = getBase_Operation().getClientDependencies().iterator();
      }

      while(itDep.hasNext()) {
        Dependency currentDependency = itDep.next();
        currentVerify = UMLUtil.getStereotypeApplication(currentDependency, Verify.class);

        if(currentVerify != null) {
          EList<NamedElement> suppliers = currentVerify.getBase_Abstraction().getSuppliers();
          Iterator<NamedElement> it = suppliers.iterator();
View Full Code Here

    }

    EList<Dependency> depsFiltered = new UniqueEList<Dependency>();
    for (Iterator<Dependency> iter = dependencies.iterator(); iter
        .hasNext();) {
      Dependency e = iter.next();
      if (!(e instanceof InterfaceRealization)) {
        depsFiltered.add(e);
      }
    }
View Full Code Here

   */
  public void createAssociatedStereotype(Element e, String profileQualifiedName, String stereotypeName) {

    applySysMLProfile(e.getModel(), profileQualifiedName);

    final Element element = e;
    final String stereotypeQualifiedName = profileQualifiedName + "::" + stereotypeName;

    final Stereotype stereotype = element.getApplicableStereotype(stereotypeQualifiedName);
    final EList<Stereotype> appliedStereotypes = element.getAppliedStereotypes();

    if (stereotype == null) {
      final String message = "Can't apply the setereotype " + stereotypeQualifiedName + " on "
          + element.toString();
      Activator.log(Status.WARNING, message, null);
    } else if (appliedStereotypes != null && appliedStereotypes.contains(stereotype)) {
      final String message = "The stereotype " + stereotype.getQualifiedName()
          + " is already applied on " + element.toString();
      Activator.log(Status.INFO, message, null);
    } else {
      element.applyStereotype(stereotype);
    }
  }
View Full Code Here

   *            : the given element for which you want to delete the stereotype.
   * @param steQualified
   *            : the qualified name of the stereotype you want to delete (ex. : SysML::Blocks::Block).
   */
  public void deleteAssociatedStereotype(Element e, String steQualified) {
    final Element element = e;

    if (element != null && steQualified != null) {
      final Stereotype stereotype = element.getAppliedStereotype(steQualified);
      if (stereotype != null) {
        element.unapplyStereotype(stereotype);
      }
    } else {
      final String message = "Can't delete the stereotype application because the element or the stereotypeName keys are not correct";
      Activator.log(Status.INFO, message, null);
    }
View Full Code Here

    deleteAssociatedStereotype(e, SYSML_REQUIREMENT);
    final EObject root = getRootContainer(e);
    for (final Iterator<EObject> iterator = root.eAllContents(); iterator.hasNext();) {
      final EObject object = iterator.next();
      if (object instanceof Abstraction) {
        final Element supplier = ((Abstraction)object).getSupplier(e.getName());
        if (supplier != null) {
          Stereotype s = ((Abstraction)object).getAppliedStereotype("SysML::Requirements::Satisfy");
          if (s != null) {
            deleteAssociatedStereotype((Abstraction)object, "SysML::Requirements::Satisfy");
          } else {
View Full Code Here

TOP

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

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.