parentEvent = findParent(result);
}
// Update the method parameters
updateParameters(result, parentEvent);
IEventBrowser methodEvents;
if (isStepInto) {
methodEvents = this.getTODSession().getTODHandler().getStepIntoChildrenBrowser(parentEvent);
} else {
methodEvents = this.getTODSession().getTODHandler().getChildrenBrowser(parentEvent);
}
IBehaviorInfo parentBehavior = parentEvent.getOperationBehavior();
System.out.println("Local variable scope: " + parentBehavior.getDeclaringType().getJvmName() + " - " + parentBehavior.getName() + parentBehavior.getSignature());
IEventBrowser variableWrites = this.getTODSession().getTODHandler().filterLocalVariableWrites(methodEvents);
ILogEvent target = result.lastEvent;
if (!variableWrites.hasNext()) {
return;
}
ILogEvent currentEvent;
do {
currentEvent = variableWrites.next();
if (currentEvent instanceof LocalVariableWriteEvent) {
LocalVariableWriteEvent lvw = (LocalVariableWriteEvent)currentEvent;
String varName = lvw.getVariable().getVariableName();
System.out.println("LOCAL: " + varName);
if (eventInScope(lvw, target) && currentEvent.getDepth() == parentEvent.getDepth()+1) {
this.updateLocalVariable(lvw);
}
}
} while (variableWrites.hasNext() && currentEvent.getDepth() == parentEvent.getDepth()+1);
}