Commit 50f70803 authored by Sarah Grebing's avatar Sarah Grebing

Now script area is disabled while loading

parent 2e7c295f
Pipeline #22201 passed with stages
in 5 minutes and 31 seconds
...@@ -257,6 +257,7 @@ public class DebuggerMain implements Initializable { ...@@ -257,6 +257,7 @@ public class DebuggerMain implements Initializable {
Events.register(this); Events.register(this);
// model.setDebugMode(false); // model.setDebugMode(false);
scriptController = new ScriptController(dockStation); scriptController = new ScriptController(dockStation);
interactiveModeController = new InteractiveModeController(scriptController); interactiveModeController = new InteractiveModeController(scriptController);
btnInteractiveMode.setSelected(false); btnInteractiveMode.setSelected(false);
inspectionViewsController = new InspectionViewsController(dockStation); inspectionViewsController = new InspectionViewsController(dockStation);
...@@ -348,7 +349,9 @@ public class DebuggerMain implements Initializable { ...@@ -348,7 +349,9 @@ public class DebuggerMain implements Initializable {
BooleanBinding disableStepping = FACADE.loadingProperty(). BooleanBinding disableStepping = FACADE.loadingProperty().
or(FACADE.proofProperty().isNull()). or(FACADE.proofProperty().isNull()).
or(model.interpreterStateProperty().isNotEqualTo(InterpreterThreadState.WAIT)); or(model.interpreterStateProperty().isNotEqualTo(InterpreterThreadState.WAIT));
FACADE.loadingProperty().addListener((observable, oldValue, newValue) -> {
scriptController.disablePropertyForAreasProperty().set(newValue);
});
/* model.statePointerProperty().addListener((observable, oldValue, newValue) -> { /* model.statePointerProperty().addListener((observable, oldValue, newValue) -> {
//set all steppings -> remove binding //set all steppings -> remove binding
......
...@@ -90,6 +90,7 @@ public class ScriptArea extends BorderPane { ...@@ -90,6 +90,7 @@ public class ScriptArea extends BorderPane {
public static final FileReloadingService FILE_RELOADING_SERVICE = new FileReloadingService(); public static final FileReloadingService FILE_RELOADING_SERVICE = new FileReloadingService();
/** /**
* Underlying filepath, should not be null * Underlying filepath, should not be null
*/ */
...@@ -425,8 +426,11 @@ public class ScriptArea extends BorderPane { ...@@ -425,8 +426,11 @@ public class ScriptArea extends BorderPane {
if (p.includeTextPosition(chIdx)) { if (p.includeTextPosition(chIdx)) {
Label lbl = new Label(p.getMessage()); Label lbl = new Label(p.getMessage());
lbl.getStyleClass().addAll("problem-popup-label", lbl.getStyleClass().addAll("problem-popup-label",
"problem-popup-label-" + p.getIssue().getRulename(), "problem-popup-label-" + p.getIssue(),
"problem-popup-label-" + p.getIssue().getSeverity()); //.getRulename(),
"problem-popup-label-" + p.getIssue()
//.getSeverity()
);
box.getChildren().add(lbl); box.getChildren().add(lbl);
} }
} }
......
...@@ -15,10 +15,7 @@ import edu.kit.iti.formal.psdbg.parser.Facade; ...@@ -15,10 +15,7 @@ import edu.kit.iti.formal.psdbg.parser.Facade;
import edu.kit.iti.formal.psdbg.parser.ast.ASTNode; import edu.kit.iti.formal.psdbg.parser.ast.ASTNode;
import edu.kit.iti.formal.psdbg.parser.ast.CallStatement; import edu.kit.iti.formal.psdbg.parser.ast.CallStatement;
import edu.kit.iti.formal.psdbg.parser.ast.ProofScript; import edu.kit.iti.formal.psdbg.parser.ast.ProofScript;
import javafx.beans.property.ListProperty; import javafx.beans.property.*;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleListProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.beans.value.ChangeListener; import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue; import javafx.beans.value.ObservableValue;
import javafx.collections.FXCollections; import javafx.collections.FXCollections;
...@@ -52,6 +49,23 @@ public class ScriptController { ...@@ -52,6 +49,23 @@ public class ScriptController {
private final DockPane parent; private final DockPane parent;
public boolean isDisablePropertyForAreas() {
return disablePropertyForAreas.get();
}
public SimpleBooleanProperty disablePropertyForAreasProperty() {
return disablePropertyForAreas;
}
public void setDisablePropertyForAreas(boolean disablePropertyForAreas) {
this.disablePropertyForAreas.set(disablePropertyForAreas);
}
/**
* Property to globally disable or enable scriptareas
*/
private SimpleBooleanProperty disablePropertyForAreas = new SimpleBooleanProperty(true);
private final ObservableMap<ScriptArea, DockNode> openScripts = FXCollections.observableMap(new HashMap<>()); private final ObservableMap<ScriptArea, DockNode> openScripts = FXCollections.observableMap(new HashMap<>());
private final ListProperty<SavePoint> mainScriptSavePoints private final ListProperty<SavePoint> mainScriptSavePoints
= new SimpleListProperty<>(FXCollections.observableArrayList()); = new SimpleListProperty<>(FXCollections.observableArrayList());
...@@ -209,7 +223,9 @@ public class ScriptController { ...@@ -209,7 +223,9 @@ public class ScriptController {
area.setAutoCompletionController(getAutoCompleter()); area.setAutoCompletionController(getAutoCompleter());
area.mainScriptProperty().bindBidirectional(mainScript); area.mainScriptProperty().bindBidirectional(mainScript);
area.setFilePath(filePath); area.setFilePath(filePath);
area.disableProperty().bindBidirectional(this.disablePropertyForAreas);
DockNode dockNode = createDockNode(area); DockNode dockNode = createDockNode(area);
openScripts.put(area, dockNode); openScripts.put(area, dockNode);
if (filePath.exists()) { if (filePath.exists()) {
......
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