Assignment Precedence

With five different mechanisms for passing preferences, there is a possibility that the same preference will be assigned via more than one mechanism. The order of precedence for preference passing mechanisms is shown below. This precedence is fixed and unmodifiable. Preference assignments that are overridden by higher precedence mechanisms have no effect.

Figure 10: Preference Assignment Precedence

Preference Assignment Precedence

Within a given mechanism, there is also a possibility of conflicting preference assignments. The rules of precedence for each mechanism are similar: later assignments of a preference override earlier assignments. Thus for environment files (and the preferences file), assignments that appear later in a file will override conflicting definitions that appear earlier in the file. Likewise, command line flags that appear later on the command line will override conflicting flags on the same line. Shell variable assignments are similar: later assignments overwrite ones that appear earlier.

An exception to the precedence rule is that an assignment of the form <program name>.<preference> overrides assignments of the form <preference>, even if the latter is from a higher precedence source. For example, if modeler.icons is defined in a shell variable but icons is defined in an environment file, Modeler uses modeler.icons as the value of its icons preference, even though icons is assigned in a higher-precedence source (an environment file).