Commit 5aa118ac authored by Alexander Weigl's avatar Alexander Weigl

repair

parent a006bc8f
Pipeline #15281 passed with stages
in 10 minutes and 16 seconds
...@@ -502,9 +502,9 @@ public class DebuggerMain implements Initializable { ...@@ -502,9 +502,9 @@ public class DebuggerMain implements Initializable {
Platform.runLater(() -> { Platform.runLater(() -> {
scriptController.getDebugPositionHighlighter().remove(); scriptController.getDebugPositionHighlighter().remove();
statusBar.publishSuccessMessage("Interpreter finished."); statusBar.publishSuccessMessage("Interpreter finished.");
btnIM.setDisable(false); btnInteractiveMode.setDisable(false);
assert model.getDebuggerFramework() != null; assert model.getDebuggerFramework() != null;
btnIM.setSelected(true); btnInteractiveMode.setSelected(true);
/*PTreeNode<KeyData> statePointer = model.getDebuggerFramework().getStatePointer(); /*PTreeNode<KeyData> statePointer = model.getDebuggerFramework().getStatePointer();
assert statePointer!=null; assert statePointer!=null;
State<KeyData> lastState = statePointer.getStateAfterStmt(); State<KeyData> lastState = statePointer.getStateAfterStmt();
...@@ -871,8 +871,6 @@ public class DebuggerMain implements Initializable { ...@@ -871,8 +871,6 @@ public class DebuggerMain implements Initializable {
} }
} }
}
@FXML @FXML
public void showWelcomeDock(ActionEvent actionEvent) { public void showWelcomeDock(ActionEvent actionEvent) {
if (!welcomePaneDock.isDocked() && !welcomePaneDock.isFloating()) { if (!welcomePaneDock.isDocked() && !welcomePaneDock.isFloating()) {
......
...@@ -67,7 +67,7 @@ public class InteractiveModeController { ...@@ -67,7 +67,7 @@ public class InteractiveModeController {
public void stop() { public void stop() {
Events.unregister(this); Events.unregister(this);
String c = getCasesAsString(); String c = getCasesAsString();
scriptController.getDockNode(scripundocktArea).undock(); scriptController.getDockNode(scriptArea).undock();
Events.fire(new Events.InsertAtTheEndOfMainScript(c)); Events.fire(new Events.InsertAtTheEndOfMainScript(c));
} }
......
...@@ -120,14 +120,6 @@ public class ScriptController { ...@@ -120,14 +120,6 @@ public class ScriptController {
return getDockNode(findEditor(filepath)); return getDockNode(findEditor(filepath));
} }
<<<<<<< HEAD
public DockNode getDockNode(ScriptArea editor) {
if (editor == null) {
return null;
}
return openScripts.get(editor);
}
/** /**
* Create a new Tab in the ScriptTabPane containing the contents of the file given as argument * Create a new Tab in the ScriptTabPane containing the contents of the file given as argument
* *
...@@ -161,10 +153,7 @@ public class ScriptController { ...@@ -161,10 +153,7 @@ public class ScriptController {
} }
} }
======= /* Create new DockNode for ScriptArea Tab
>>>>>>> fe78f6e478dd00993310329ee09e52cb3af7a516
/**
* Create new DockNode for ScriptArea Tab
* *
* @param area ScriptAreaTab * @param area ScriptAreaTab
* @return * @return
...@@ -201,38 +190,6 @@ public class ScriptController { ...@@ -201,38 +190,6 @@ public class ScriptController {
return dockNode; return dockNode;
} }
/**
* Create a new Tab in the ScriptTabPane containing the contents of the file given as argument
*
* @param filePath to file that should be loaded to new tab
* @return refernce to new scriptArea in new tab
* @throws IOException if an Exception occurs while loading file
*/
public ScriptArea createNewTab(File filePath) throws IOException {
filePath = filePath.getAbsoluteFile();
if (findEditor(filePath) == null) {
ScriptArea area = new ScriptArea();
area.mainScriptProperty().bindBidirectional(mainScript);
area.setFilePath(filePath);
DockNode dockNode = createDockNode(area);
openScripts.put(area, dockNode);
if (filePath.exists()) {
String code = FileUtils.readFileToString(filePath, "utf-8");
if (!area.textProperty().getValue().isEmpty()) {
area.deleteText(0, area.textProperty().getValue().length());
}
area.setText(code);
}
return area;
} else {
logger.info("File already exists. Will not load it again");
ScriptArea area = findEditor(filePath);
return area;
}
}
public DockNode getDockNode(ScriptArea editor) { public DockNode getDockNode(ScriptArea editor) {
if (editor == null) { if (editor == null) {
......
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