system/src/sc/lang/sc/PropertyAssignment.java
public Expression convertToAssignmentExpression(String prefix, boolean copy, String operator, boolean removeReverseSet) {
      Expression newInit;
      // Since we are converting this and moving it elsewhere in the model, don't transform this guy
      suppressGeneration = true;

      // For reverse bindings, we do not generate an initializer - instead, just an expression
      // that will init the binding, i.e. foo =: bar turns into just what the initializer transforms into
      // after it is converted to a binding expression, i.e. Bind.bind(...)
      if ((bindingDirection != null && !bindingDirection.doForward()) && removeReverseSet) {
         if (copy) {
            newInit = (Expression) getInitializerExpr().deepCopy(CopyNormal, null);
            newInit.setBindingInfo(bindingDirection, this, false);
            newInit.parentNode = this;
         }
         else {
            newInit = getInitializerExpr();
         }
         if (newInit.fromStatement == null)
            newInit.fromStatement = fromStatement;
         /*
         if (!removeReverseSet) {
            ParseUtil.initAndStartComponent(newInit);
            ParseUtil.processComponent(newInit);
            newInit.transform(ILanguageModel.RuntimeType.JAVA);
         }
         */
         return newInit;
      }
      else {
         IdentifierExpression ie = new IdentifierExpression();
         ie.setProperty("identifiers", new SemanticNodeList<IString>(ie, prefix == null ? 1 : 2));
         if (prefix != null)
            ie.identifiers.add(PString.toIString(prefix));
         ie.identifiers.add(PString.toIString(propertyName));

         AssignmentExpression ae = new AssignmentExpression();
         ae.fromDefinition = this;
         ie.parentNode = ae;
         ae.setProperty("lhs", ie);
         //ae.operator = bindingDirection != null ? "=" : operator;
         ae.operator = operator;

         if (copy) {
            newInit = (Expression) getInitializerExpr().deepCopy(CopyNormal, null);
         }
         else {
            newInit = getInitializerExpr();
         }
         ae.setProperty("rhs", newInit);
         TransformUtil.convertArrayInitializerToNewExpression(ae);
         return ae;
      }
   }
/**
    * Used in two situations - one where we are converting this node to an assignment.  We also use it
    * to move a copy of this initializer to the getX method of a constructor.
    */
Used in two situations - one where we are converting this node to an assignment.  We also use it
to move a copy of this initializer to the getX method of a constructor.
Used in two situations - one where we are converting this node to an assignment . We also use it to move a copy of this initializer to the getX method of a constructor .
public Expression convertToAssignmentExpression(String prefix, boolean copy, String operator, boolean removeReverseSet) {
      Expression newInit;
      suppressGeneration = true;
      if ((bindingDirection != null && !bindingDirection.doForward()) && removeReverseSet) {
         if (copy) {
            newInit = (Expression) getInitializerExpr().deepCopy(CopyNormal, null);
            newInit.setBindingInfo(bindingDirection, this, false);
            newInit.parentNode = this;
         }
         else {
            newInit = getInitializerExpr();
         }
         if (newInit.fromStatement == null)
            newInit.fromStatement = fromStatement;
         /*
         if (!removeReverseSet) {
            ParseUtil.initAndStartComponent(newInit);
            ParseUtil.processComponent(newInit);
            newInit.transform(ILanguageModel.RuntimeType.JAVA);
         }
         */
         return newInit;
      }
      else {
         IdentifierExpression ie = new IdentifierExpression();
         ie.setProperty("identifiers", new SemanticNodeList<IString>(ie, prefix == null ? 1 : 2));
         if (prefix != null)
            ie.identifiers.add(PString.toIString(prefix));
         ie.identifiers.add(PString.toIString(propertyName));
         AssignmentExpression ae = new AssignmentExpression();
         ae.fromDefinition = this;
         ie.parentNode = ae;
         ae.setProperty("lhs", ie);
         ae.operator = operator;
         if (copy) {
            newInit = (Expression) getInitializerExpr().deepCopy(CopyNormal, null);
         }
         else {
            newInit = getInitializerExpr();
         }
         ae.setProperty("rhs", newInit);
         TransformUtil.convertArrayInitializerToNewExpression(ae);
         return ae;
      }
   }
public Expression convertToAssignmentExpression ( String prefix , boolean copy , String operator , boolean removeReverseSet ) { Expression newInit ; suppressGeneration = true ; if ( ( bindingDirection != null && ! bindingDirection . doForward ( ) ) && removeReverseSet ) { if ( copy ) { newInit = ( Expression ) getInitializerExpr ( ) . deepCopy ( CopyNormal , null ) ; newInit . setBindingInfo ( bindingDirection , this , false ) ; newInit . parentNode = this ; } else { newInit = getInitializerExpr ( ) ; } if ( newInit . fromStatement == null ) newInit . fromStatement = fromStatement ; /*
         if (!removeReverseSet) {
            ParseUtil.initAndStartComponent(newInit);
            ParseUtil.processComponent(newInit);
            newInit.transform(ILanguageModel.RuntimeType.JAVA);
         }
         */ return newInit ; } else { IdentifierExpression ie = new IdentifierExpression ( ) ; ie . setProperty ( "identifiers" , new SemanticNodeList < IString > ( ie , prefix == null ? 1 : 2 ) ) ; if ( prefix != null ) ie . identifiers . add ( PString . toIString ( prefix ) ) ; ie . identifiers . add ( PString . toIString ( propertyName ) ) ; AssignmentExpression ae = new AssignmentExpression ( ) ; ae . fromDefinition = this ; ie . parentNode = ae ; ae . setProperty ( "lhs" , ie ) ; ae . operator = operator ; if ( copy ) { newInit = ( Expression ) getInitializerExpr ( ) . deepCopy ( CopyNormal , null ) ; } else { newInit = getInitializerExpr ( ) ; } ae . setProperty ( "rhs" , newInit ) ; TransformUtil . convertArrayInitializerToNewExpression ( ae ) ; return ae ; } }
Used in two situations - one where we are converting this node to an assignment.
Used in two situations - one where we are converting this node to an assignment .
// Since we are converting this and moving it elsewhere in the model, don't transform this guy // For reverse bindings, we do not generate an initializer - instead, just an expression // that will init the binding, i.e. foo =: bar turns into just what the initializer transforms into // after it is converted to a binding expression, i.e. Bind.bind(...) //ae.operator = bindingDirection != null ? "=" : operator;