Format settings file

See this answer https://stackoverflow.com/questions/22950542/pretty-printing-xml-with-jackson-library
This commit is contained in:
Nathan McRae 2025-02-17 22:28:53 -08:00
parent 15192e04e4
commit 6e86e660a7
3 changed files with 3 additions and 0 deletions

View File

@ -3,6 +3,7 @@ $Env:PATH = "C:\Users\nathanm\Downloads\openjdk-23.0.1_windows-x64_bin\jdk-23.0.
$Env:PATH_TO_FX="C:\Users\nathanm\Downloads\openjfx-23.0.1_windows-x64_bin-sdk\javafx-sdk-23.0.1\lib"
$modulePath = "$Env:PATH_TO_FX;P:\personal_root\projects\number-station\lib"
$modules = $(
"com.ctc.wstx",
"com.fasterxml.jackson.annotation",
"com.fasterxml.jackson.core",
"com.fasterxml.jackson.dataformat.xml",

View File

@ -4,6 +4,7 @@ $Env:PATH = "C:\Users\nathanm\Downloads\openjdk-23.0.1_windows-x64_bin\jdk-23.0.
$Env:PATH_TO_FX="C:\Users\nathanm\Downloads\openjfx-23.0.1_windows-x64_bin-sdk\javafx-sdk-23.0.1\lib"
$modulePath = "$Env:PATH_TO_FX;P:\personal_root\projects\number-station\lib"
$modules = $(
"com.ctc.wstx",
"com.fasterxml.jackson.annotation",
"com.fasterxml.jackson.core",
"com.fasterxml.jackson.dataformat.xml",

View File

@ -110,6 +110,7 @@ public class MainSettings {
XmlMapper xmlMapper = new XmlMapper();
xmlMapper.registerModule(new JavaTimeModule());
xmlMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
xmlMapper.enable(SerializationFeature.INDENT_OUTPUT);
try {
Path filePath = getSettingsFilePath();
Path directoryPath = filePath.getParent();