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