Commit 2e7c295f authored by Sarah Grebing's avatar Sarah Grebing

Added shprtcut for handling terms, now git the whole Java bug

parent 88addd0e
Pipeline #22193 passed with stages
in 5 minutes and 27 seconds
......@@ -66,6 +66,7 @@ import org.reactfx.util.Timer;
import javax.annotation.Nullable;
import javax.swing.*;
import java.awt.im.InputContext;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
......@@ -277,6 +278,7 @@ public class DebuggerMain implements Initializable {
ImmutableList<Goal> openGoals = p.getSubtreeGoals(p.root());
KeyData kd = new KeyData(openGoals.get(0), env, p);
scriptController.getAutoCompleter().getArgumentCompleter().setDefaultKeyData(kd);
};
getFacade().environmentProperty().addListener(invalidationListener);
getFacade().proofProperty().addListener(invalidationListener);
......@@ -676,8 +678,8 @@ public class DebuggerMain implements Initializable {
private void onInterpreterError(DebuggerFramework<KeyData> keyDataDebuggerFramework, Throwable throwable) {
Platform.runLater(() -> {
Utils.showExceptionDialog("Error during Execution", "Error during Script Execution",
"Here should be some really good text...\nNothing will be the same. Everything broken.",
Utils.showExceptionDialog("An error has occurred during execution.", "Error during Script Execution",
"Please reload the problem to get a consistent proof state.",
throwable
);
});
......
......@@ -34,6 +34,7 @@ import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.control.*;
import javafx.scene.input.*;
import static javafx.scene.input.KeyCombination.CONTROL_ANY;
import javafx.scene.layout.*;
import javafx.scene.paint.Color;
import javafx.scene.paint.Paint;
......@@ -141,6 +142,7 @@ public class ScriptArea extends BorderPane {
private void init() {
codeArea.setAutoScrollOnDragDesired(false);
InputMap<KeyEvent> inputMap = sequence(
process(EventPattern.keyPressed(),
(e) -> {
......@@ -148,6 +150,8 @@ public class ScriptArea extends BorderPane {
inlineToolbar.hide();
return PROCEED;
}),
consume(keyPressed(new KeyCodeCombination(KeyCode.E, KeyCombination.CONTROL_DOWN))
, (e) -> addBackticks()),
consumeWhen(keyPressed(KeyCode.ENTER), autoCompletion::isVisible,
e -> autoCompletion.complete()),
consume(keyPressed(KeyCode.ENTER, SHORTCUT_DOWN),
......@@ -241,6 +245,7 @@ public class ScriptArea extends BorderPane {
//this.moveTo(characterPosition, NavigationActions.SelectionPolicy.CLEAR);
});
mainScript.addListener((observable) -> updateMainScriptMarker());
filePath.addListener((p, o, n) -> {
if (o != null)
......@@ -357,6 +362,14 @@ public class ScriptArea extends BorderPane {
}
private void addBackticks(){
int pos = codeArea.getCaretPosition();
insertText(pos, "``");
codeArea.displaceCaret(pos+1);
}
private void highlightProblems() {
LinterStrategy ls = LinterStrategy.getDefaultLinter();
try {
......
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