Commit 0e8cb6d1 authored by Sarah Grebing's avatar Sarah Grebing

Nullpointer bug fix and added observable value for steppingmode

parent 298861e0
......@@ -107,6 +107,7 @@ public class DebuggerMain implements Initializable {
*/
private ObservableBooleanValue executeNotPossible = proofTreeController.executeNotPossibleProperty().or(FACADE.readyToExecuteProperty().not());
// private ObservableBooleanValue stepNotPossible = proofTreeController.stepNotPossibleProperty();
/**
*
*/
......@@ -398,8 +399,9 @@ public class DebuggerMain implements Initializable {
this.debugMode.set(addInitBreakpoint);
statusBar.publishMessage("Parse ...");
try {
//parsing
List<ProofScript> scripts = scriptController.getCombinedAST();
System.out.println("Parsed Scripts");
int n = 0;
if (scriptController.getMainScript() == null) {
MainScriptIdentifier msi = new MainScriptIdentifier();
......@@ -646,7 +648,7 @@ public class DebuggerMain implements Initializable {
/**
* Perform a step over
*
*TODO Uebergabe des selctirkten Knotens damit richtiges ausgewählt
* @param actionEvent
*/
public void stepOver(ActionEvent actionEvent) {
......@@ -656,7 +658,7 @@ public class DebuggerMain implements Initializable {
/**
* Perform a step back
*
*TODO Uebergabe des selctirkten Knotens damit richtiges ausgewählt
* @param actionEvent
*/
public void stepBack(ActionEvent actionEvent) {
......
......@@ -137,15 +137,19 @@ public class ProofTreeController {
});
blocker.currentGoalsProperty().addListener((observable, oldValue, newValue) -> {
Platform.runLater(() -> {
this.setCurrentGoals(newValue);
if (newValue != null) {
this.setCurrentGoals(newValue);
}
});
});
//add listener to nextcomputed node, that is updated whenever a new node is added to the stategraph
nextComputedNode.addListener((observable, oldValue, newValue) -> {
//update statepointer
this.statePointer = newValue;
setNewState(this.statePointer.getState());
if (newValue != null) {
this.statePointer = newValue;
setNewState(this.statePointer.getState());
}
});
......@@ -419,4 +423,7 @@ public class ProofTreeController {
return alreadyExecuted.get();
}
/* public ReadOnlyBooleanProperty stepNotPossibleProperty() {
}*/
}
// Please select one of the following scripts.
//
script test(){
}
script test1(){
impRight;
}
script test2(){
impRight;
impLeft;
cases{
case match `?X -> ?Y ==> not(?Z)`:
notLeft;
default:
notRight;
}
}
script cpClosable(){
impRight;
impRight;
......
......@@ -118,7 +118,7 @@
</SplitMenuButton>
<Button>
<Button disable="${controller.stepNotPossible}">
<graphic>
<MaterialDesignIconView glyphName="DEBUG_STEP_INTO" size="24.0"/>
</graphic>
......@@ -127,7 +127,7 @@
</tooltip>
</Button>
<Button onAction="#stepOver">
<Button onAction="#stepOver" disable="${controller.stepNotPossible}">
<graphic>
<MaterialDesignIconView glyphName="DEBUG_STEP_OVER" size="24.0"/>
</graphic>
......@@ -136,7 +136,7 @@
</tooltip>
</Button>
<Button onAction="#stepBack">
<Button onAction="#stepBack" disable="${controller.stepNotPossible}">
<graphic>
<MaterialDesignIconView glyphName="DEBUG_STEP_OVER" size="24.0" scaleX="-1"/>
</graphic>
......@@ -146,7 +146,7 @@
</Button>
<Button>
<Button disable="${controller.stepNotPossible}">
<graphic>
<MaterialDesignIconView glyphName="DEBUG_STEP_OUT" size="24.0"/>
</graphic>
......@@ -155,7 +155,7 @@
</tooltip>
</Button>
<Button onAction="#stopDebugMode">
<Button onAction="#stopDebugMode" disable="${controller.stepNotPossible}">
<!--disable="${! controller.debugMode}"-->
<graphic>
<MaterialDesignIconView glyphName="STOP" size="24.0"/>
......
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