Customizing the metamodel : What you can do with USRPROPS/SAPROPS : Layout capabilities : Grids, list and text boxes : Restricted lists
  
Restricted lists
Restricted lists are activated by making the appropriate changes to the properties file(s) for the properties whose choices are to be restricted. There are two forms of restriction. They are:
PROPERTY property-name { EDIT of-edit-type of-typeOF DEFINITION AND SUPERSREFERENCED IN property-name and so on... }
and
PROPERTY property-name EDIT of-edit-type of-typeOF DEFINITION REFERENCED IN property-name and so on... }
Example
To restrict the choices available to the user when completing the “Operation” property to those methods which belong to the Class identified in the property “To Class”, use:
DEFINITION "Message" { PROPERTY "To Class" { KEY EDIT OneOf "Class" } ... PROPERTY "Operation" { EDIT ParmOneOf "Method" OF DEFINITION REFERENCED IN "To Class" KEYED BY { "Class Name" : "To Class", Name, "Formal Parameters"} LENGTH 1000 HELP "Choose an operation from the choices" } ... }
To restrict the choices to the methods of the “To Class” or any of its super classes, use:
DEFINITION "Message" { PROPERTY "To Class" { KEY EDIT OneOf "Class" } ... PROPERTY "Operation" { EDIT ParmOneOf "Method" OF DEFINITION AND SUPERS REFERENCED IN "To Class" KEYED BY { "Class Name" : "To Class", Name, "Formal Parameters"} LENGTH 1000 DISPLAY { FORMAT STRING LEGEND "$$NONE$$" } HELP "Choose an operation from the choices" } ... }