private void loadDefaultEditors() { tabPane.getTabs().clear(); addEditor(new File(Sandbox.SANDBOX_SOURCE_DIR.toFile(), "SimpleInliningTest.java")); saveEditorPaneConfig(); }
private void chooseFile() { FileChooser fc = new FileChooser(); fc.setTitle("Choose source file"); fc.setInitialDirectory(Sandbox.SANDBOX_SOURCE_DIR.toFile()); File result = fc.showOpenDialog(sandboxStage.getStageForChooser()); if (result != null) { loadSource(result); } }
private void saveFile() { if (sourceFile == null) { FileChooser fc = new FileChooser(); fc.setTitle("Save file as"); fc.setInitialDirectory(Sandbox.SANDBOX_SOURCE_DIR.toFile()); sourceFile = fc.showSaveDialog(sandboxStage.getStageForChooser()); } if (sourceFile != null) { saveFile(sourceFile); setModified(false); } }