Examples of Reference2Attribute


Examples of sg.edu.nus.comp.simTL.engine.tracing.Reference2Attribute

                ?Util.NO_POSITION
                :notification.getPosition();
     
      ReferenceFromParent referenceFromParent = null;
      if(newSFInSource instanceof EAttribute){
        referenceFromParent = new Reference2Attribute(source,(EAttribute)newSFInSource);
      } else {
        referenceFromParent = new Reference2Element(source,(EReference)newSFInSource, template);
      }
     
//      String notificS = null;
View Full Code Here

Examples of sg.edu.nus.comp.simTL.engine.tracing.Reference2Attribute

   
    log.info("Attribute in template instance model changed to " + newValue);
    for(TraceLinkNode corrTLN : modelCorrespondence.getCorrespondingElement(iPointer2Att)){
      if(corrTLN.getModel().getModelType()==ModelType.INPUT_MODEL){
        if(corrTLN.isAttribute()){
          Reference2Attribute pPointer2Att = corrTLN.getAttribute();
          if(pPointer2Att.getEAttribute().isMany()){
            log.error("TraceLinks between elements in a listAttribute " +
                "and a oneDimension Attribute in another model " +
                "not yet implemented");
          } else {
            parameterModelHandler.changeAttribute(
View Full Code Here

Examples of sg.edu.nus.comp.simTL.engine.tracing.Reference2Attribute

    //TODO since we have only negation no checks are needed
    ReferenceFromParent temp = embeddedMethodStatement.getReferenceFromParent();
    if(!(temp instanceof Reference2Attribute)){
      throw new ValidationException("Negation Operation only for referenced attributes!");
    }
    Reference2Attribute temp2 = (Reference2Attribute)temp;
    temp2.setNegateValue(!temp2.isNegateValue());
  }
View Full Code Here

Examples of sg.edu.nus.comp.simTL.engine.tracing.Reference2Attribute

    //TODO Implement casts for "primitive types". So that strings
    //TODO in model can be transformed to Integer in language if necessary
    EStructuralFeature structuralFeature = placeHolderReturnContainer.getStructuralFeature();
    EObject sfContainer = placeHolderReturnContainer.getSFContainer();
    if(structuralFeature instanceof EAttribute){
      referenceFromParent = new Reference2Attribute(sfContainer,(EAttribute)structuralFeature);
    } else {
      referenceFromParent = new Reference2Element(sfContainer,(EReference)structuralFeature, template);
    }
  }
View Full Code Here

Examples of sg.edu.nus.comp.simTL.engine.tracing.Reference2Attribute

            context);
        if(!phList.isEmpty()){
          EObject tAttPHEO = phList.iterator().next();
          //As we are in new context just set through placeHolder
          TPlaceholder placeHolder = new TPlaceholder(tAttPHEO, context, template);
          Reference2Attribute pPointer2Att = (Reference2Attribute)placeHolder.getTMethodStatement().getReferenceFromParent();
          Reference2Attribute iPointer2Att =
            new Reference2Attribute(iObject, iAtt);
         
          parameterModelHandler.changeAttribute(
              pPointer2Att, iPointer2Att, context);
         
          foundPlaceHolder = true;
View Full Code Here

Examples of sg.edu.nus.comp.simTL.engine.tracing.Reference2Attribute

      modelCorrespondence.add(
          new TraceLink(
            currentContext.saveToStaticContext(),
            new TraceLinkNode(
              template,
              new Reference2Attribute(
                tObject,
                tAttributeClass
              )
            ),
            new TraceLinkNode(
              instance,
              new Reference2Attribute(
                iObject,
                iAttributeClass
              )
            )
          ));
    } else{
      ReferenceFromParent refFromParent =
        checkPlaceholder(tAttributeClass,iAttributeClass,tObject,iObject);
      if(refFromParent!=null){
        //HANDLE TRACELINK
        //1) importedModel - resultModel
        StaticContext staticContext = currentContext.saveToStaticContext();
        modelCorrespondence.add(
          new TraceLink(
            staticContext,
            new TraceLinkNode(
              getImportedModel(refFromParent.getParent().eResource()),
              (Reference2Attribute)refFromParent
            ),
            new TraceLinkNode(
              instance,
              new Reference2Attribute(
                iObject,
                iAttributeClass
              )
            )
          )
View Full Code Here

Examples of sg.edu.nus.comp.simTL.engine.tracing.Reference2Attribute

    this.modelCorrespondence = modelCorrespondence;
  }
 
  public void negateCondition(TIfStatement ifStatement, Boolean embedFragment){
    //Remove parameter element when only one element is in bodyVersion
    Reference2Attribute pointerToCondition = (Reference2Attribute)ifStatement.getCondition().getReferenceFromParent();
    changeAttributeWithOperations(pointerToCondition, embedFragment);
   
    log.debug("Negated condition (boolean value in parameter model) of ifStatement "+Util.getFullName(ifStatement.getTElement()));
  }
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.