Commit b31bfc68 authored by Sarah Grebing's avatar Sarah Grebing

Bigfix for exception in calling proof tree tab panes

parent 77f055d3
......@@ -10,8 +10,6 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.6" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-core:2.6" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.projectlombok:lombok:1.16.16" level="project" />
......
......@@ -200,8 +200,14 @@ public class ProofTreeController {
PTreeNode nextNode = stateGraphWrapper.getStepOver(currentPointer);
//if nextnode is null ask interpreter to execute next statement and compute next state
if (nextNode != null) {
State<KeyData> lastState = this.statePointer.getState();
this.statePointer = nextNode;
setNewState(statePointer.getState());
State<KeyData> state = this.statePointer.getState();
if (state.getGoals().isEmpty()) {
setNewState(lastState);
} else {
setNewState(state);
}
// setHighlightStmt(this.statePointer.getScriptstmt().getStartPosition(), this.statePointer.getScriptstmt().getStartPosition());
} else {
//no next node is present yet
......
......@@ -112,7 +112,14 @@ public class ProofTree extends BorderPane {
} else {
return object.name();
}*/
return object.sequent().toString();
String nodeLabel;
if (object.getAppliedRuleApp() != null) {
nodeLabel = object.getAppliedRuleApp().rule().displayName();
} else {
nodeLabel = object.isClosed() ? "Closed Goal" : "Open Goal";
}
return nodeLabel;
// return object.sequent().toString();
}
@Override
......
......@@ -235,4 +235,34 @@ public class Utils {
return String.valueOf(t.getData().getNode().serialNr());
}
public static void showClosedProofDialog(String scriptName) {
Alert alert = new Alert(Alert.AlertType.INFORMATION);
alert.setTitle("Proof Closed");
alert.setHeaderText("The proof is closed");
alert.setContentText("The proof using " + scriptName + " is closed");
/*StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
ex.printStackTrace(pw);
String exceptionText = sw.toString();
Label label = new Label("The exception stacktrace was:");
TextArea textArea = new TextArea(exceptionText);
textArea.setEditable(false);
textArea.setWrapText(true);
textArea.setMaxWidth(Double.MAX_VALUE);
textArea.setMaxHeight(Double.MAX_VALUE);
GridPane.setVgrow(textArea, Priority.ALWAYS);
GridPane.setHgrow(textArea, Priority.ALWAYS);
GridPane expContent = new GridPane();
expContent.setMaxWidth(Double.MAX_VALUE);
expContent.add(label, 0, 0);
expContent.add(textArea, 0, 1);
alert.getDialogPane().setExpandableContent(expContent);
*/
alert.showAndWait();
}
}
......@@ -283,7 +283,7 @@
}
.tab-pane {
-fx-skin: "edu.kit.iti.formal.psdb.gui.controls.CustomTabPaneSkin";
-fx-skin: "edu.kit.iti.formal.psdbg.gui.controls.CustomTabPaneSkin";
}
/**********************************************************************************************************************/
......
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