hostServices.showDocument(String.format("http://localhost:%d/index.html", tomcatPort));
}
@FXML
public void changeWorkingDir(ActionEvent actionEvent) {
DirectoryChooser directoryChooser = new DirectoryChooser();
initialDirectory.ifPresent(path -> {
if (Files.isDirectory(path))
directoryChooser.setInitialDirectory(path.toFile());
else
directoryChooser.setInitialDirectory(path.getParent().toFile());
});
directoryChooser.setTitle("Select Working Directory");
File selectedDir = directoryChooser.showDialog(null);
if (Objects.nonNull(selectedDir)) {
config.setWorkingDirectory(selectedDir.toString());
workingDirectory = Optional.of(selectedDir.toString());
initialDirectory = Optional.of(selectedDir.toPath());
fileBrowser.browse(treeView, this, selectedDir.toString());