From 3f85f675ff9d4465bee1348d543ab25b27cc66c6 Mon Sep 17 00:00:00 2001 From: Prashant Singh Date: Mon, 2 May 2022 17:45:29 +0930 Subject: [PATCH 01/20] added ui component to ignore unlinked files --- .idea/runConfigurations/JabRef_Main.xml | 5 +++-- .../FileIgnoreUnlinkedFiles.java | 20 +++++++++++++++++++ .../externalfiles/UnlinkedFilesDialog.fxml | 12 ++++++----- .../UnlinkedFilesDialogView.java | 7 +++++++ .../UnlinkedFilesDialogViewModel.java | 14 +++++++++++++ .../jabref/logic/util/StandardFileType.java | 4 +++- src/main/resources/l10n/JabRef_en.properties | 1 + 7 files changed, 55 insertions(+), 8 deletions(-) create mode 100644 src/main/java/org/jabref/gui/externalfiles/FileIgnoreUnlinkedFiles.java diff --git a/.idea/runConfigurations/JabRef_Main.xml b/.idea/runConfigurations/JabRef_Main.xml index a588730b31a..7b96690299e 100644 --- a/.idea/runConfigurations/JabRef_Main.xml +++ b/.idea/runConfigurations/JabRef_Main.xml @@ -1,7 +1,8 @@ + - + \ No newline at end of file diff --git a/src/main/java/org/jabref/gui/externalfiles/FileIgnoreUnlinkedFiles.java b/src/main/java/org/jabref/gui/externalfiles/FileIgnoreUnlinkedFiles.java new file mode 100644 index 00000000000..584e64a4f7b --- /dev/null +++ b/src/main/java/org/jabref/gui/externalfiles/FileIgnoreUnlinkedFiles.java @@ -0,0 +1,20 @@ +package org.jabref.gui.externalfiles; + +import java.util.List; + +import org.jabref.logic.l10n.Localization; +import org.jabref.logic.util.FileType; + +public class FileIgnoreUnlinkedFiles { + private final String description; + private final List filesToIgnore; + + FileIgnoreUnlinkedFiles(FileType fileType) { + this.description = Localization.lang("%0", fileType.getName()); + this.filesToIgnore = fileType.getExtensionsWithDot(); + } + + public String getDescription() { + return this.description; + } +} diff --git a/src/main/java/org/jabref/gui/externalfiles/UnlinkedFilesDialog.fxml b/src/main/java/org/jabref/gui/externalfiles/UnlinkedFilesDialog.fxml index e3d2b8b9133..15155694716 100644 --- a/src/main/java/org/jabref/gui/externalfiles/UnlinkedFilesDialog.fxml +++ b/src/main/java/org/jabref/gui/externalfiles/UnlinkedFilesDialog.fxml @@ -52,12 +52,14 @@