Examples of eSet()


Examples of org.eclipse.emf.ecore.EObject.eSet()

        if(corrTLN.isAttribute()){
          EObject tObject = corrTLN.getAttribute().getParent();
          EAttribute tAtt = (EAttribute)tObject.eClass().getEStructuralFeature(iPointer2Att.getEAttribute().getName());
          if(tAtt==null) throw new SynchronizingException("No AttributeReference found with name " + iPointer2Att.getEAttribute().getName());

          tObject.eSet(tAtt, newValue);
        }
      }
    }
  }
 
View Full Code Here

Examples of org.eclipse.emf.ecore.EObject.eSet()

      //Set condition to false, and if negateValue then to true!
      //XOR
      newValue = !(bValue&&negate)&&(bValue||negate);
    }
    log.info("Set " + pPointer2Att + " to " + newValue);
    pParent.eSet(pAtt,newValue);
  }
 
  public void removeElement(EObject pElement, ReferenceFromParent pointerToList) throws SimTLException{
    log.debug("Remove element from parameterModel: " + Util.getFullName(pElement));
    List<?> parameterList = (List<?>)pointerToList.getReferencedValue();
View Full Code Here

Examples of org.eclipse.emf.ecore.EObject.eSet()

    //findInPackageAndInstantiate(eObject.eClass().getName(),copiedObjectRootPackage);
   
    //copy attributes
    for(EAttribute eAtt : eObject.eClass().getEAllAttributes()){
      EAttribute copiedAtt = (EAttribute)copiedObject.eClass().getEStructuralFeature(eAtt.getName());
      copiedObject.eSet(copiedAtt, eObject.eGet(eAtt));
    }
    //copy references
    for(EReference eRef : eObject.eClass().getEAllReferences()){
      EReference copiedRef = (EReference)copiedObject.eClass().getEStructuralFeature(eRef.getName());
      if(eRef.isMany()){
View Full Code Here

Examples of org.eclipse.emf.ecore.EObject.eSet()

        List<EObject> copiedObjectChildList = (List<EObject>)copiedObject.eGet(copiedRef);
        for(EObject eObjectChild : (List<EObject>)eObject.eGet(eRef)){
          copiedObjectChildList.add(copyElement(eObjectChild, copiedRef.getEReferenceType().getEPackage()));
        }
      } else {
        copiedObject.eSet(copiedRef, copyElement((EObject)eObject.eGet(eRef),copiedRef.getEReferenceType().getEPackage()));
      }
    }
    return copiedObject;
  }
 
View Full Code Here

Examples of org.eclipse.emf.ecore.EObject.eSet()

    List<EObject> classMembers = (List<EObject>)javaClass.eGet(memberFeature);
    assert(Util.getElementName(classMembers.get(1)).matches("p1"));
   
    EObject fieldP1 = classMembers.get(1);
    EObject fieldP4 = EObjectCopier.copyElement(fieldP1, fieldP1.eClass().getEPackage());
    fieldP4.eSet(fieldP4.eClass().getEStructuralFeature("name"),"p4");
    classMembers.add(2, fieldP4);
    SimTLFactory.createInterpreter().interprete(
        template,
        URI.createFileURI(new File("output/TV_templateInstance_NewIteration.java").getAbsolutePath()));
  }
View Full Code Here

Examples of org.eclipse.emf.ecore.EObject.eSet()

    List<EObject> classMembers = (List<EObject>)javaClass.eGet(memberFeature);
    assert(Util.getElementName(classMembers.get(2)).matches("p2"));
   
    EObject fieldP2 = classMembers.get(2);
    EObject fieldP4 = EObjectCopier.copyElement(fieldP2, fieldP2.eClass().getEPackage());
    fieldP4.eSet(fieldP4.eClass().getEStructuralFeature("name"),"p4");
    classMembers.add(0, fieldP4);
   
    //Look at templateInstance_ManyAddAlloc.java
    SimTLFactory.createInterpreter().interprete(
        template,
View Full Code Here

Examples of org.eclipse.emf.ecore.EObject.eSet()

    assert(Util.getElementName(classMembers.get(3)).matches("p3"));
   
    EObject methodP3 = classMembers.get(3);
    EObject methodP4 = EObjectCopier.copyElement(methodP3, methodP3.eClass().getEPackage());
    //Set name, delete children
    methodP4.eSet(methodP4.eClass().getEStructuralFeature("name"),"p4");
    List<EObject> p4Statements = (List<EObject>)methodP4.eGet(methodP4.eClass().getEStructuralFeature("statements"));
    p4Statements.clear();
    classMembers.add(2, methodP4);
   
    //Look at templateInstance_NewIteration_DiffElement.java
View Full Code Here

Examples of org.eclipse.emf.ecore.EObject.eSet()

    List<EObject> classMembers = (List<EObject>)javaClass.eGet(memberFeature);
    assert(Util.getElementName(classMembers.get(1)).matches("p1"));
   
    EObject fieldP1 = classMembers.get(1);
    EObject fieldP4 = EObjectCopier.copyElement(fieldP1, fieldP1.eClass().getEPackage());
    fieldP4.eSet(fieldP4.eClass().getEStructuralFeature("name"),"p4");
    classMembers.add(2, fieldP4);
  }
 
  /**
   * templateInstance_NewIteration_DiffElement.java:
 
View Full Code Here

Examples of org.eclipse.emf.ecore.EObject.eSet()

    assert(Util.getElementName(classMembers.get(3)).matches("p3"));
   
    EObject methodP3 = classMembers.get(3);
    EObject methodP4 = EObjectCopier.copyElement(methodP3, methodP3.eClass().getEPackage());
    //Set name, delete children
    methodP4.eSet(methodP4.eClass().getEStructuralFeature("name"),"p4");
    List<EObject> p4Statements = (List<EObject>)methodP4.eGet(methodP4.eClass().getEStructuralFeature("statements"));
    p4Statements.clear();
    classMembers.add(2, methodP4);
   
    //Look at templateInstance_NewIteration_DiffElement.java
View Full Code Here

Examples of org.eclipse.emf.ecore.EObject.eSet()

    List<EObject> classMembers = (List<EObject>)javaClass.eGet(memberFeature);
    assert(Util.getElementName(classMembers.get(2)).matches("p2"));
   
    EObject fieldP2 = classMembers.get(2);
    EObject fieldP4 = EObjectCopier.copyElement(fieldP2, fieldP2.eClass().getEPackage());
    fieldP4.eSet(fieldP4.eClass().getEStructuralFeature("name"),"p4");
    classMembers.add(3, fieldP4);
   
    //Look at templateInstance_ManyAddAlloc.java
    SimTLFactory.createInterpreter().interprete(
        template,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.