예제 #1
0
  private void loadDefaultEditors() {
    tabPane.getTabs().clear();

    addEditor(new File(Sandbox.SANDBOX_SOURCE_DIR.toFile(), "SimpleInliningTest.java"));

    saveEditorPaneConfig();
  }
예제 #2
0
  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);
    }
  }
예제 #3
0
  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);
    }
  }