How to update a property value of a concept?

I am a newer to MPS and trying to create a DSL for my research. I defined two concepts: C1 and C2 as follows:

concept Dim extends Statement         
            implements INamedConcept   

  instance can be root: false
  alias: dim
  short description: <no short description>

  properties:
  state : string

==============================================
concept Select extends Statement
implements <none>     
     
  instance can be root: false
  alias: select
  short description: <no short description>

  properties:
  whichAlt : string

  references:
  dim : Dim[1]

===============================================
In the demo code, I use them like this

public class Demo {
  public static void main() {
     
    Dim A;
    select A.left; // Defined in the editor of Select: [> select(%dim% -> {name}).{whichAlt}; <]
   
    int choice = A<1,2>;

  }
}


The generated Java code I want looks like this

public class Demo {
  public static void main() {

    int choice = 1;

  }
}

================================================
My question is how to pass the value of "whichAlt" property of Select concept to "state" property defined in Dim concept, when I use TextGen to generate Java code? Thanks.

Please sign in to leave a comment.