final String whenElementName, final String id,
final List warningsToLog) {
// Check to see if we have an when expression.
final IConfigurationElement[] whenElements = parentElement
.getChildren(whenElementName);
Expression whenExpression = null;
if (whenElements.length > 0) {
// Check if we have too many when elements.
if (whenElements.length > 1) {
// There should only be one when element
addWarning(warningsToLog,