Automate switching between languages

This commit is contained in:
2021-02-23 00:46:43 +01:00
parent 1860d4c57f
commit 4e24363e63
14 changed files with 418 additions and 74 deletions

View File

@@ -1,12 +1,18 @@
package app.model;
import javafx.scene.Scene;
/**
* Data model of the application
* Data model of the application.
*
* Contains a static reference to state that has to be accessed
* by multiple pieces in the application, including the primary scene.
*/
public class Model {
private static String activeFilePath;
private static String currentProjectPath;
private static ProgrammingLanguage currentProgrammingLanguage;
private static Scene scene;
public static String getActiveFilePath() {
return activeFilePath;
@@ -20,7 +26,15 @@ public class Model {
return currentProgrammingLanguage;
}
public static Scene getScene() {
return scene;
}
public static void setLanguage(ProgrammingLanguage language) {
Model.currentProgrammingLanguage = language;
}
public static void setScene(Scene scene) {
Model.scene = scene;
}
}