Commit 3675c5ae authored by Sarah Grebing's avatar Sarah Grebing

bugfix context in stepOverreverse

parent 3ae847f4
Pipeline #17018 failed with stages
in 3 minutes and 8 seconds
......@@ -16,10 +16,9 @@ public class StepIntoReverseCommand<T> extends DebuggerCommand<T> {
} else{
dbg.setStatePointer(statePointer);
} else {
if (statePointer.isLastNode() || statePointer.isFirstNode()) {
/*if (statePointer.isLastNode() || statePointer.isFirstNode()) {
System.out.println("We need Sonderbehandlung here");
}
}*/
}
}
}
......
......@@ -6,14 +6,19 @@ public class StepOverReverseCommand<T> extends DebuggerCommand<T> {
@Override
public void execute(DebuggerFramework<T> dbg) throws DebuggerException {
val statePointer = dbg.getCurrentStatePointer();
PTreeNode<T> stepOverReverse = statePointer.getStepInvInto() != null ?
statePointer.getStepInvInto() :
statePointer.getStepInvOver();
PTreeNode<T> stepOverReverse = statePointer.getStepInvOver();
if (stepOverReverse == null) {
info("There is no previous state to the current one.");
}
dbg.setStatePointer(stepOverReverse);
int size = statePointer.getContextNodes().size();
dbg.setStatePointer(statePointer.getContextNodes().get(size - 1));
/*if(statePointer.isAtomic()) {
dbg.setStatePointer(statePointer);
}else{
info("There is no previous state to the current one.");
}*/
//state before statement
} else {
dbg.setStatePointer(stepOverReverse);
}
}
}
......@@ -282,6 +282,7 @@ public class DebuggerMain implements Initializable {
* @see {@link #handleStatePointer(PTreeNode)}
*/
private void handleStatePointerUI(PTreeNode<KeyData> node) {
graph.addPartiallyAndMark(node);
if (node != null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment