Skip to content

Commit

Permalink
Checkstyle fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver-Loeffler committed Sep 24, 2024
1 parent 5acbcab commit f6c889b
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1473,7 +1473,7 @@ void onLibraryRevealCustomFolder(ActionEvent event) {
File libraryPath = Paths.get(userLibraryPath).normalize().toFile();
try {
EditorPlatform.revealInFileBrowser(libraryPath);
} catch(Exception revealError) {
} catch (Exception revealError) {
handleRevealFolderException(revealError, String.valueOf(libraryPath));
}
}
Expand Down Expand Up @@ -2185,29 +2185,29 @@ ActionStatus performCloseAction() {
return closeConfirmed ? ActionStatus.DONE : ActionStatus.CANCELLED;
}


private void performRevealAction() {
assert editorController.getFxomDocument() != null;
assert editorController.getFxomDocument().getLocation() != null;

final URL location = editorController.getFxomDocument().getLocation();

File fxmlFile = null;
try {
/* Using Path.normalize().toAbsolutePath() ensures that forward and backward slashes are not mixed and
* the path matches the platform requirements. It also ensures, that the file:/ prefix is removed from
* paths and users can directly use the path in their attempt to investigate the error.
/*
* Using Path.normalize().toAbsolutePath() ensures that forward and backward slashes are not mixed
* and the path matches the platform requirements. It also ensures, that the file:/ prefix is
* removed from paths and users can directly use the path in their attempt to investigate the error.
*/
fxmlFile = Path.of(location.toURI()).normalize().toAbsolutePath().toFile();
} catch (URISyntaxException e) {
handleRevealResourceException(e, String.valueOf(location));
}

try {
EditorPlatform.revealInFileBrowser(fxmlFile);
} catch(FileBrowserRevealException re) {
} catch (FileBrowserRevealException re) {
handleRevealFileException(re, String.valueOf(fxmlFile));
} catch(IOException x) {
} catch (IOException x) {
handleRevealResourceException(x, String.valueOf(fxmlFile));
}
}
Expand Down

0 comments on commit f6c889b

Please sign in to comment.