diff --git a/src/main/java/org/jabref/gui/desktop/os/DefaultDesktop.java b/src/main/java/org/jabref/gui/desktop/os/DefaultDesktop.java index e33180068d1..30f651bbbbd 100644 --- a/src/main/java/org/jabref/gui/desktop/os/DefaultDesktop.java +++ b/src/main/java/org/jabref/gui/desktop/os/DefaultDesktop.java @@ -6,10 +6,17 @@ import java.nio.file.Path; import org.jabref.architecture.AllowedToUseAwt; +import org.jabref.cli.Launcher; import org.jabref.gui.DialogService; import org.slf4j.LoggerFactory; +/** + * This class contains some default implementations (if OS is neither linux, windows or osx) file directories and file/application open handling methods
+ * We cannot use a static logger instance here in this class as the Logger first needs to be configured in the {@link Launcher#addLogToDisk} + * The configuration of tinylog will become immutable as soon as the first log entry is issued. + * https://tinylog.org/v2/configuration/ + **/ @AllowedToUseAwt("Requires AWT to open a file") public class DefaultDesktop implements NativeDesktop { diff --git a/src/main/java/org/jabref/gui/desktop/os/Linux.java b/src/main/java/org/jabref/gui/desktop/os/Linux.java index aee7ed57fc3..a81a81bca55 100644 --- a/src/main/java/org/jabref/gui/desktop/os/Linux.java +++ b/src/main/java/org/jabref/gui/desktop/os/Linux.java @@ -12,6 +12,7 @@ import java.util.Optional; import org.jabref.architecture.AllowedToUseAwt; +import org.jabref.cli.Launcher; import org.jabref.gui.DialogService; import org.jabref.gui.Globals; import org.jabref.gui.JabRefExecutorService; @@ -22,6 +23,12 @@ import org.slf4j.LoggerFactory; +/** + * This class contains Linux specific implementations for file directories and file/application open handling methods
+ * We cannot use a static logger instance here in this class as the Logger first needs to be configured in the {@link Launcher#addLogToDisk} + * The configuration of tinylog will become immutable as soon as the first log entry is issued. + * https://tinylog.org/v2/configuration/ + **/ @AllowedToUseAwt("Requires AWT to open a file with the native method") public class Linux implements NativeDesktop { diff --git a/src/main/java/org/jabref/gui/desktop/os/OSX.java b/src/main/java/org/jabref/gui/desktop/os/OSX.java index ece1d553d56..ccd0ca56f92 100644 --- a/src/main/java/org/jabref/gui/desktop/os/OSX.java +++ b/src/main/java/org/jabref/gui/desktop/os/OSX.java @@ -5,11 +5,18 @@ import java.util.Optional; import org.jabref.architecture.AllowedToUseAwt; +import org.jabref.cli.Launcher; import org.jabref.gui.DialogService; import org.jabref.gui.Globals; import org.jabref.gui.externalfiletype.ExternalFileType; import org.jabref.gui.externalfiletype.ExternalFileTypes; +/** + * This class contains macOS (OSX) specific implementations for file directories and file/application open handling methods
+ * We cannot use a static logger instance here in this class as the Logger first needs to be configured in the {@link Launcher#addLogToDisk} + * The configuration of tinylog will become immutable as soon as the first log entry is issued. + * https://tinylog.org/v2/configuration/ + **/ @AllowedToUseAwt("Requires AWT to open a file") public class OSX implements NativeDesktop { diff --git a/src/main/java/org/jabref/gui/desktop/os/Windows.java b/src/main/java/org/jabref/gui/desktop/os/Windows.java index 7e5c2069703..e559f7dd033 100644 --- a/src/main/java/org/jabref/gui/desktop/os/Windows.java +++ b/src/main/java/org/jabref/gui/desktop/os/Windows.java @@ -6,6 +6,7 @@ import java.nio.file.Path; import java.util.Optional; +import org.jabref.cli.Launcher; import org.jabref.gui.DialogService; import org.jabref.gui.Globals; import org.jabref.gui.externalfiletype.ExternalFileType; @@ -17,6 +18,12 @@ import com.sun.jna.platform.win32.Win32Exception; import org.slf4j.LoggerFactory; +/** + * This class contains Windows specific implementations for file directories and file/application open handling methods
+ * We cannot use a static logger instance here in this class as the Logger first needs to be configured in the {@link Launcher#addLogToDisk} + * The configuration of tinylog will become immutable as soon as the first log entry is issued. + * https://tinylog.org/v2/configuration/ + **/ public class Windows implements NativeDesktop { private static final String DEFAULT_EXECUTABLE_EXTENSION = ".exe";