NamedObj container = _component;
if (_variable != null) {
container = _variable.getContainer();
}
Variable result = getScopedVariable(_variable, container, name);
if (result != null) {
// If the variable found is a modified variable, which means
// its vaule can be directly changed during execution
// (e.g., in commit action of a modal controller), then this
// variable is declared in the target language and should be
// referenced by the name anywhere it is used.
if (_codeGenerator._modifiedVariables.contains(result)) {
return new ObjectToken(_codeGenerator
.generateVariableName(result));
} else {
// This will lead to recursive call until a variable found
// is either directly specified by a constant or it is a
// modified variable.
return new ObjectToken("("
+ getParameterValue(name, result.getContainer())
+ ")");
}
} else {
return null;
}