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 {
Events.register(this);
// model.setDebugMode(false);
scriptController = new ScriptController(dockStation);
interactiveModeController = new InteractiveModeController(scriptController);
btnInteractiveMode.setSelected(false);
inspectionViewsController = new InspectionViewsController(dockStation);
......@@ -348,7 +349,9 @@ public class DebuggerMain implements Initializable {
BooleanBinding disableStepping = FACADE.loadingProperty().
or(FACADE.proofProperty().isNull()).
or(model.interpreterStateProperty().isNotEqualTo(InterpreterThreadState.WAIT));
FACADE.loadingProperty().addListener((observable, oldValue, newValue) -> {
scriptController.disablePropertyForAreasProperty().set(newValue);
});
/* model.statePointerProperty().addListener((observable, oldValue, newValue) -> {
//set all steppings -> remove binding
......
......@@ -90,6 +90,7 @@ public class ScriptArea extends BorderPane {
public static final FileReloadingService FILE_RELOADING_SERVICE = new FileReloadingService();
/**
* Underlying filepath, should not be null
*/
......@@ -425,8 +426,11 @@ public class ScriptArea extends BorderPane {
if (p.includeTextPosition(chIdx)) {
Label lbl = new Label(p.getMessage());
lbl.getStyleClass().addAll("problem-popup-label",
"problem-popup-label-" + p.getIssue().getRulename(),
"problem-popup-label-" + p.getIssue().getSeverity());
"problem-popup-label-" + p.getIssue(),
//.getRulename(),
"problem-popup-label-" + p.getIssue()
//.getSeverity()
);
box.getChildren().add(lbl);
}
}
......
......@@ -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.CallStatement;
import edu.kit.iti.formal.psdbg.parser.ast.ProofScript;
import javafx.beans.property.ListProperty;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleListProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.beans.property.*;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.collections.FXCollections;
......@@ -52,6 +49,23 @@ public class ScriptController {
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 ListProperty<SavePoint> mainScriptSavePoints
= new SimpleListProperty<>(FXCollections.observableArrayList());
......@@ -209,7 +223,9 @@ public class ScriptController {
area.setAutoCompletionController(getAutoCompleter());
area.mainScriptProperty().bindBidirectional(mainScript);
area.setFilePath(filePath);
area.disableProperty().bindBidirectional(this.disablePropertyForAreas);
DockNode dockNode = createDockNode(area);
openScripts.put(area, dockNode);
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