Customizing the metamodel : Keywords for USRPROPS : CONTROL
  
CONTROL
The Control keyword is equivalent to the Property keyword, when used with TESTPROCs to set up a switch in a definition.
There are two ways to specify that a property appears in a definition dialog depending on the value of a switch. You may use #ifdefs, which act upon values that you set for the encyclopedia in the Encyclopedia Configuration dialog (for example, setting the language type of the encyclopedia to Java or C++). The Encyclopedia Configuration dialog actually sets values in the sadeclar.cfg file.
You may also specify that a PROPERTY appears in a dialog (and what its initial value is) based on a switch that is itself a property (TESTPROPERTY) in the definition dialog. For example, you may specify in an entity that its DBMS type is Oracle or SQL Server. Subsequent properties will appear or not appear in the definition, and have certain default values, based on the value that you set for DBMS type. You use the TESTPROC keyword to specify the TESTPROPERTY switch.
You use the PROPERTY keyword the first time you specify a particular property in the definition, and the Control keyword for every other occurrence of that property in the definition. The REFPROP keyword is used to specify what PROPERTY each CONTROL is referencing. For this reason, the CONTROL and REFPROP keywords are often used in conjunction with TESTPROCs.
To summarize, for a CONTROL to be used, there must be an initial reference to the PROPERTY that the CONTROL references, at the top of the definition. The REFPROP keyword is used in conjunction with the CONTROL keyword.
Example
Definition "Index"
{
CHAPTER "Modeling Properties"
{ TESTPROC TestPropertyNotValue TESTPROPERTY "DBMS" TESTSTRING { "ORACLE 8" } }
PROPERTY "Primary Key" {EDIT Boolean LENGTH 1 DEFAULT "F" READONLY }
PROPERTY "Unique" {EDIT Boolean LENGTH 1 VALUESCRIPT ProcessIndexUnique DEFAULT "F" }
PROPERTY "Clustered" {EDIT Boolean LENGTH 1 DEFAULT "F" }
..
CHAPTER "Modeling Properties "
{ TESTPROC TestPropertyValue TESTPROPERTY "DBMS"
TESTSTRING { "ORACLE 8" } }
CONTROL "Primary Key" { REFPROP "Primary Key" }
CONTROL "Unique" { REFPROP "Unique" }
CONTROL "Clustered"{REFPROP "Clustered"}
..
}
In the example above, the REFPROP keyword is used in conjunction with the CONTROL keyword to specify that the "Primary Key", "Unique", and "Clustered" properties are provided to the Index definition when Oracle 8 is selected as the DBMS: these properties will be exactly the same as their referenced property.