Commit 49085499 authored by Sarah Grebing's avatar Sarah Grebing

Bugfix for handling post mortem states

parent d963c3eb
Pipeline #23718 passed with stages
in 2 minutes and 43 seconds
......@@ -47,7 +47,9 @@ public class Statements extends ASTNode<ScriptLanguageParser.StmtListContext>
@Override
public ASTNode[] getChildren() {
return (ASTNode[]) toArray();
Object[] arr = toArray();
return toArray(new ASTNode[arr.length]);
//return (ASTNode[]) toArray();
}
public Statements(Statements body) {
......
......@@ -189,7 +189,7 @@ public class DebuggerMain implements Initializable {
.filter(it -> Objects.equals(fna.childOrMe(it.getStatement()), it.getStatement()))
.collect(Collectors.toList());
System.out.println(result);
LOGGER.info(result);
for (PTreeNode<KeyData> statePointerToPostMortem : result) {
......@@ -213,13 +213,18 @@ public class DebuggerMain implements Initializable {
if (stateAfterStmt.getSelectedGoalNode() != null) {
im.setSelectedGoalNodeToShow(stateAfterStmt.getSelectedGoalNode());
} else {
im.setSelectedGoalNodeToShow(goals.get(0));
if(goals.size() > 0) {
im.setSelectedGoalNodeToShow(goals.get(0));
} else {
im.setSelectedGoalNodeToShow(stateBeforeStmt.getSelectedGoalNode());
statusBar.publishMessage("This goal node was closed by the selected mutator.");
}
}
inspectionViewsController.newPostMortemInspector(im)
.dock(dockStation, DockPos.CENTER, getActiveInspectorDock());
} else {
statusBar.publishErrorMessage("There is no post mortem state to show to this node, because this node was not executed.");
statusBar.publishErrorMessage("There is no post mortem state to show to this node, because this node was not executed or is a selector statement.");
}
}
}
......
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