private void updateChangedFields(IVariable[] oldVariables, IVariable[] newVariables ) throws DebugException {
for (IVariable nV : newVariables) {
BaseCamelVariable newVar = (BaseCamelVariable)nV;
for (IVariable oldVar : oldVariables) {
if (newVar.getName().equals(oldVar.getName())) {
IValue oldValue = oldVar.getValue();
IValue newValue = newVar.getValue();
// first check only values
if (!oldValue.getValueString().equals(newValue.getValueString())) {
newVar.markChanged();
}
// also check for changed nested variables
if (newValue.hasVariables() && oldValue.hasVariables()) {
updateChangedFields(oldValue.getVariables(), newValue.getVariables());
}
}
}
}
}