From 6e15691ab744a5b57f03cdf622b96ad9da2920df Mon Sep 17 00:00:00 2001 From: Tom Graham Date: Tue, 15 Oct 2024 15:26:15 +1100 Subject: [PATCH 01/10] Change enum & localisation preferences from "General File Directory" to "Library File Directory" --- .../gui/collab/metedatachange/MetadataChangeDetailsView.java | 4 ++-- .../java/org/jabref/logic/bibtex/comparator/MetaDataDiff.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/jabref/gui/collab/metedatachange/MetadataChangeDetailsView.java b/src/main/java/org/jabref/gui/collab/metedatachange/MetadataChangeDetailsView.java index 7a6da5205b9..35589c2210c 100644 --- a/src/main/java/org/jabref/gui/collab/metedatachange/MetadataChangeDetailsView.java +++ b/src/main/java/org/jabref/gui/collab/metedatachange/MetadataChangeDetailsView.java @@ -51,8 +51,8 @@ private String getDifferenceString(MetaDataDiff.DifferenceType changeType) { Localization.lang("Save actions"); case MODE -> Localization.lang("Library mode"); - case GENERAL_FILE_DIRECTORY -> - Localization.lang("General file directory"); + case LIBRARY_FILE_DIRECTORY -> + Localization.lang("Library file directory"); case CONTENT_SELECTOR -> Localization.lang("Content selectors"); }; diff --git a/src/main/java/org/jabref/logic/bibtex/comparator/MetaDataDiff.java b/src/main/java/org/jabref/logic/bibtex/comparator/MetaDataDiff.java index be9a0fd8c0d..d47b2092f23 100644 --- a/src/main/java/org/jabref/logic/bibtex/comparator/MetaDataDiff.java +++ b/src/main/java/org/jabref/logic/bibtex/comparator/MetaDataDiff.java @@ -19,7 +19,7 @@ public enum DifferenceType { CONTENT_SELECTOR, DEFAULT_KEY_PATTERN, ENCODING, - GENERAL_FILE_DIRECTORY, + LIBRARY_FILE_DIRECTORY, GROUPS, KEY_PATTERNS, LATEX_FILE_DIRECTORY, @@ -114,7 +114,7 @@ public List getDifferences(GlobalCitationKeyPatterns globalCitationK addToListIfDiff(changes, DifferenceType.DEFAULT_KEY_PATTERN, originalMetaData.getDefaultCiteKeyPattern(), newMetaData.getDefaultCiteKeyPattern()); addToListIfDiff(changes, DifferenceType.SAVE_ACTIONS, originalMetaData.getSaveActions(), newMetaData.getSaveActions()); addToListIfDiff(changes, DifferenceType.MODE, originalMetaData.getMode(), newMetaData.getMode()); - addToListIfDiff(changes, DifferenceType.GENERAL_FILE_DIRECTORY, originalMetaData.getDefaultFileDirectory(), newMetaData.getDefaultFileDirectory()); + addToListIfDiff(changes, DifferenceType.LIBRARY_FILE_DIRECTORY, originalMetaData.getDefaultFileDirectory(), newMetaData.getDefaultFileDirectory()); addToListIfDiff(changes, DifferenceType.CONTENT_SELECTOR, originalMetaData.getContentSelectors(), newMetaData.getContentSelectors()); return changes; } From 4d200aab5ce5b9b58813a2f2e3baf73e5b7bef76 Mon Sep 17 00:00:00 2001 From: Tom Graham Date: Tue, 15 Oct 2024 15:30:45 +1100 Subject: [PATCH 02/10] change 'generalFileDirectory' to 'libraryFileDirectory' in codebase --- .../general/GeneralPropertiesViewModel.java | 6 +++--- .../logic/bibtex/comparator/MetaDataDiff.java | 2 +- .../logic/exporter/MetaDataSerializer.java | 2 +- .../logic/importer/util/MetaDataParser.java | 2 +- .../model/database/BibDatabaseContext.java | 2 +- .../org/jabref/model/metadata/MetaData.java | 20 +++++++++---------- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/main/java/org/jabref/gui/libraryproperties/general/GeneralPropertiesViewModel.java b/src/main/java/org/jabref/gui/libraryproperties/general/GeneralPropertiesViewModel.java index b42af859ead..b7daaa689fa 100644 --- a/src/main/java/org/jabref/gui/libraryproperties/general/GeneralPropertiesViewModel.java +++ b/src/main/java/org/jabref/gui/libraryproperties/general/GeneralPropertiesViewModel.java @@ -59,7 +59,7 @@ public void setValues() { selectedEncodingProperty.setValue(metaData.getEncoding().orElse(StandardCharsets.UTF_8)); selectedDatabaseModeProperty.setValue(metaData.getMode().orElse(BibDatabaseMode.BIBLATEX)); - generalFileDirectoryProperty.setValue(metaData.getDefaultFileDirectory().orElse("").trim()); + generalFileDirectoryProperty.setValue(metaData.getLibraryFileDirectory().orElse("").trim()); userSpecificFileDirectoryProperty.setValue(metaData.getUserFileDirectory(preferences.getFilePreferences().getUserAndHost()).orElse("").trim()); laTexFileDirectoryProperty.setValue(metaData.getLatexFileDirectory(preferences.getFilePreferences().getUserAndHost()).map(Path::toString).orElse("")); } @@ -73,9 +73,9 @@ public void storeSettings() { String generalFileDirectory = generalFileDirectoryProperty.getValue().trim(); if (generalFileDirectory.isEmpty()) { - newMetaData.clearDefaultFileDirectory(); + newMetaData.clearLibraryFileDirectory(); } else { - newMetaData.setDefaultFileDirectory(generalFileDirectory); + newMetaData.setLibraryFileDirectory(generalFileDirectory); } String userSpecificFileDirectory = userSpecificFileDirectoryProperty.getValue(); diff --git a/src/main/java/org/jabref/logic/bibtex/comparator/MetaDataDiff.java b/src/main/java/org/jabref/logic/bibtex/comparator/MetaDataDiff.java index d47b2092f23..90d8a4fd11f 100644 --- a/src/main/java/org/jabref/logic/bibtex/comparator/MetaDataDiff.java +++ b/src/main/java/org/jabref/logic/bibtex/comparator/MetaDataDiff.java @@ -114,7 +114,7 @@ public List getDifferences(GlobalCitationKeyPatterns globalCitationK addToListIfDiff(changes, DifferenceType.DEFAULT_KEY_PATTERN, originalMetaData.getDefaultCiteKeyPattern(), newMetaData.getDefaultCiteKeyPattern()); addToListIfDiff(changes, DifferenceType.SAVE_ACTIONS, originalMetaData.getSaveActions(), newMetaData.getSaveActions()); addToListIfDiff(changes, DifferenceType.MODE, originalMetaData.getMode(), newMetaData.getMode()); - addToListIfDiff(changes, DifferenceType.LIBRARY_FILE_DIRECTORY, originalMetaData.getDefaultFileDirectory(), newMetaData.getDefaultFileDirectory()); + addToListIfDiff(changes, DifferenceType.LIBRARY_FILE_DIRECTORY, originalMetaData.getLibraryFileDirectory(), newMetaData.getLibraryFileDirectory()); addToListIfDiff(changes, DifferenceType.CONTENT_SELECTOR, originalMetaData.getContentSelectors(), newMetaData.getContentSelectors()); return changes; } diff --git a/src/main/java/org/jabref/logic/exporter/MetaDataSerializer.java b/src/main/java/org/jabref/logic/exporter/MetaDataSerializer.java index 4b8f625ea15..e88d971077c 100644 --- a/src/main/java/org/jabref/logic/exporter/MetaDataSerializer.java +++ b/src/main/java/org/jabref/logic/exporter/MetaDataSerializer.java @@ -52,7 +52,7 @@ public static Map getSerializedStringMap(MetaData metaData, stringyMetaData.putAll(serializeCiteKeyPatterns(metaData, globalCiteKeyPatterns)); metaData.getMode().ifPresent( mode -> stringyMetaData.put(MetaData.DATABASE_TYPE, Collections.singletonList(mode.getAsString()))); - metaData.getDefaultFileDirectory().ifPresent( + metaData.getLibraryFileDirectory().ifPresent( path -> stringyMetaData.put(MetaData.FILE_DIRECTORY, Collections.singletonList(path.trim()))); metaData.getUserFileDirectories().forEach((user, path) -> stringyMetaData .put(MetaData.FILE_DIRECTORY + '-' + user, Collections.singletonList(path.trim()))); diff --git a/src/main/java/org/jabref/logic/importer/util/MetaDataParser.java b/src/main/java/org/jabref/logic/importer/util/MetaDataParser.java index 46b5bf7aeb9..44587f5287f 100644 --- a/src/main/java/org/jabref/logic/importer/util/MetaDataParser.java +++ b/src/main/java/org/jabref/logic/importer/util/MetaDataParser.java @@ -120,7 +120,7 @@ public MetaData parse(MetaData metaData, Map data, Character key // edge case, it might be one special field e.g. article from biblatex-apa, but we can't distinguish this from any other field and rather prefer to handle it as UnknownField metaData.addContentSelector(ContentSelectors.parse(FieldFactory.parseField(entry.getKey().substring(MetaData.SELECTOR_META_PREFIX.length())), StringUtil.unquote(entry.getValue(), MetaData.ESCAPE_CHARACTER))); } else if (entry.getKey().equals(MetaData.FILE_DIRECTORY)) { - metaData.setDefaultFileDirectory(parseDirectory(entry.getValue())); + metaData.setLibraryFileDirectory(parseDirectory(entry.getValue())); } else if (entry.getKey().startsWith(MetaData.FILE_DIRECTORY + '-')) { // The user name starts directly after FILE_DIRECTORY + '-' String user = entry.getKey().substring(MetaData.FILE_DIRECTORY.length() + 1); diff --git a/src/main/java/org/jabref/model/database/BibDatabaseContext.java b/src/main/java/org/jabref/model/database/BibDatabaseContext.java index 9d34e8398e8..cab503960c0 100644 --- a/src/main/java/org/jabref/model/database/BibDatabaseContext.java +++ b/src/main/java/org/jabref/model/database/BibDatabaseContext.java @@ -165,7 +165,7 @@ public List getFileDirectories(FilePreferences preferences) { Optional userFileDirectory = metaData.getUserFileDirectory(preferences.getUserAndHost()).map(dir -> getFileDirectoryPath(dir)); userFileDirectory.ifPresent(fileDirs::add); - Optional generalFileDirectory = metaData.getDefaultFileDirectory().map(dir -> getFileDirectoryPath(dir)); + Optional generalFileDirectory = metaData.getLibraryFileDirectory().map(dir -> getFileDirectoryPath(dir)); generalFileDirectory.ifPresent(fileDirs::add); // fileDirs.isEmpty() is true after these two if there are no directories set in the BIB file itself: diff --git a/src/main/java/org/jabref/model/metadata/MetaData.java b/src/main/java/org/jabref/model/metadata/MetaData.java index 8f7c4a1dcd2..bb04a4665a1 100644 --- a/src/main/java/org/jabref/model/metadata/MetaData.java +++ b/src/main/java/org/jabref/model/metadata/MetaData.java @@ -75,7 +75,7 @@ public class MetaData { private FieldFormatterCleanups saveActions; private BibDatabaseMode mode; private boolean isProtected; - private String defaultFileDirectory; + private String libraryFileDirectory; private final ContentSelectors contentSelectors = new ContentSelectors(); private final Map> unknownMetaData = new HashMap<>(); private boolean isEventPropagationEnabled = true; @@ -221,12 +221,12 @@ public List getContentSelectorValuesForField(Field field) { return contentSelectors.getSelectorValuesForField(field); } - public Optional getDefaultFileDirectory() { - return Optional.ofNullable(defaultFileDirectory); + public Optional getLibraryFileDirectory() { + return Optional.ofNullable(libraryFileDirectory); } - public void setDefaultFileDirectory(String path) { - defaultFileDirectory = Objects.requireNonNull(path).trim(); + public void setLibraryFileDirectory(String path) { + libraryFileDirectory = Objects.requireNonNull(path).trim(); postChange(); } @@ -248,8 +248,8 @@ public void markAsProtected() { postChange(); } - public void clearDefaultFileDirectory() { - defaultFileDirectory = null; + public void clearLibraryFileDirectory() { + libraryFileDirectory = null; postChange(); } @@ -398,7 +398,7 @@ public boolean equals(Object o) { && Objects.equals(defaultCiteKeyPattern, that.defaultCiteKeyPattern) && Objects.equals(saveActions, that.saveActions) && (mode == that.mode) - && Objects.equals(defaultFileDirectory, that.defaultFileDirectory) + && Objects.equals(libraryFileDirectory, that.libraryFileDirectory) && Objects.equals(contentSelectors, that.contentSelectors) && Objects.equals(versionDBStructure, that.versionDBStructure); } @@ -406,11 +406,11 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash(isProtected, groupsRoot.getValue(), encoding, encodingExplicitlySupplied, saveOrder, citeKeyPatterns, userFileDirectory, - laTexFileDirectory, defaultCiteKeyPattern, saveActions, mode, defaultFileDirectory, contentSelectors, versionDBStructure); + laTexFileDirectory, defaultCiteKeyPattern, saveActions, mode, libraryFileDirectory, contentSelectors, versionDBStructure); } @Override public String toString() { - return "MetaData [citeKeyPatterns=" + citeKeyPatterns + ", userFileDirectory=" + userFileDirectory + ", laTexFileDirectory=" + laTexFileDirectory + ", groupsRoot=" + groupsRoot + ", encoding=" + encoding + ", saveOrderConfig=" + saveOrder + ", defaultCiteKeyPattern=" + defaultCiteKeyPattern + ", saveActions=" + saveActions + ", mode=" + mode + ", isProtected=" + isProtected + ", defaultFileDirectory=" + defaultFileDirectory + ", contentSelectors=" + contentSelectors + ", encodingExplicitlySupplied=" + encodingExplicitlySupplied + ", VersionDBStructure=" + versionDBStructure + "]"; + return "MetaData [citeKeyPatterns=" + citeKeyPatterns + ", userFileDirectory=" + userFileDirectory + ", laTexFileDirectory=" + laTexFileDirectory + ", groupsRoot=" + groupsRoot + ", encoding=" + encoding + ", saveOrderConfig=" + saveOrder + ", defaultCiteKeyPattern=" + defaultCiteKeyPattern + ", saveActions=" + saveActions + ", mode=" + mode + ", isProtected=" + isProtected + ", libraryFileDirectory=" + libraryFileDirectory + ", contentSelectors=" + contentSelectors + ", encodingExplicitlySupplied=" + encodingExplicitlySupplied + ", VersionDBStructure=" + versionDBStructure + "]"; } } From fea698ade80393d0f5d35e2e59616ecf9360c9a2 Mon Sep 17 00:00:00 2001 From: Tom Graham Date: Tue, 15 Oct 2024 15:30:55 +1100 Subject: [PATCH 03/10] change 'generalFileDirectory' to 'libraryFileDirectory' in test code --- .../java/org/jabref/logic/cleanup/CleanupWorkerTest.java | 2 +- .../java/org/jabref/logic/cleanup/MoveFilesCleanupTest.java | 2 +- .../logic/cleanup/RemoveLinksToNotExistentFilesTest.java | 2 +- .../org/jabref/logic/exporter/BibtexDatabaseWriterTest.java | 2 +- .../jabref/logic/importer/fileformat/BibtexParserTest.java | 6 +++--- .../java/org/jabref/logic/integrity/IntegrityCheckTest.java | 2 +- src/test/java/org/jabref/logic/util/io/FileUtilTest.java | 2 +- .../org/jabref/model/database/BibDatabaseContextTest.java | 6 +++--- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/test/java/org/jabref/logic/cleanup/CleanupWorkerTest.java b/src/test/java/org/jabref/logic/cleanup/CleanupWorkerTest.java index 5a4be09156c..5c4f65588ea 100644 --- a/src/test/java/org/jabref/logic/cleanup/CleanupWorkerTest.java +++ b/src/test/java/org/jabref/logic/cleanup/CleanupWorkerTest.java @@ -60,7 +60,7 @@ void setUp(@TempDir Path bibFolder) throws IOException { Files.createDirectory(pdfPath); MetaData metaData = new MetaData(); - metaData.setDefaultFileDirectory(pdfPath.toAbsolutePath().toString()); + metaData.setLibraryFileDirectory(pdfPath.toAbsolutePath().toString()); BibDatabaseContext context = new BibDatabaseContext(new BibDatabase(), metaData); Files.createFile(bibFolder.resolve("test.bib")); context.setDatabasePath(bibFolder.resolve("test.bib")); diff --git a/src/test/java/org/jabref/logic/cleanup/MoveFilesCleanupTest.java b/src/test/java/org/jabref/logic/cleanup/MoveFilesCleanupTest.java index 6197e896cd1..06faf2da37f 100644 --- a/src/test/java/org/jabref/logic/cleanup/MoveFilesCleanupTest.java +++ b/src/test/java/org/jabref/logic/cleanup/MoveFilesCleanupTest.java @@ -50,7 +50,7 @@ void setUp(@TempDir Path bibFolder) throws IOException { Files.createFile(fileBefore); MetaData metaData = new MetaData(); - metaData.setDefaultFileDirectory(defaultFileFolder.toAbsolutePath().toString()); + metaData.setLibraryFileDirectory(defaultFileFolder.toAbsolutePath().toString()); databaseContext = new BibDatabaseContext(new BibDatabase(), metaData); Files.createFile(bibFolder.resolve("test.bib")); databaseContext.setDatabasePath(bibFolder.resolve("test.bib")); diff --git a/src/test/java/org/jabref/logic/cleanup/RemoveLinksToNotExistentFilesTest.java b/src/test/java/org/jabref/logic/cleanup/RemoveLinksToNotExistentFilesTest.java index 141fb75638a..23a09c80e88 100644 --- a/src/test/java/org/jabref/logic/cleanup/RemoveLinksToNotExistentFilesTest.java +++ b/src/test/java/org/jabref/logic/cleanup/RemoveLinksToNotExistentFilesTest.java @@ -42,7 +42,7 @@ void setUp(@TempDir Path bibFolder) throws IOException { Files.createFile(fileBefore); MetaData metaData = new MetaData(); - metaData.setDefaultFileDirectory(newFileFolder.toAbsolutePath().toString()); + metaData.setLibraryFileDirectory(newFileFolder.toAbsolutePath().toString()); BibDatabaseContext databaseContext = new BibDatabaseContext(new BibDatabase(), metaData); Files.createFile(testBibFolder); diff --git a/src/test/java/org/jabref/logic/exporter/BibtexDatabaseWriterTest.java b/src/test/java/org/jabref/logic/exporter/BibtexDatabaseWriterTest.java index 08fbd0698bf..ca147094480 100644 --- a/src/test/java/org/jabref/logic/exporter/BibtexDatabaseWriterTest.java +++ b/src/test/java/org/jabref/logic/exporter/BibtexDatabaseWriterTest.java @@ -810,7 +810,7 @@ void writeProtectedFlag() throws Exception { @Test void writeFileDirectories() throws Exception { - metaData.setDefaultFileDirectory("\\Literature\\"); + metaData.setLibraryFileDirectory("\\Literature\\"); metaData.setUserFileDirectory("defaultOwner-user", "D:\\Documents"); metaData.setLatexFileDirectory("defaultOwner-user", Path.of("D:\\Latex")); diff --git a/src/test/java/org/jabref/logic/importer/fileformat/BibtexParserTest.java b/src/test/java/org/jabref/logic/importer/fileformat/BibtexParserTest.java index b42755b8363..61fd6bebf11 100644 --- a/src/test/java/org/jabref/logic/importer/fileformat/BibtexParserTest.java +++ b/src/test/java/org/jabref/logic/importer/fileformat/BibtexParserTest.java @@ -1815,7 +1815,7 @@ void integrationTestFileDirectories() throws IOException { + "@comment{jabref-meta: fileDirectory-defaultOwner-user:D:\\\\Documents;}" + "@comment{jabref-meta: fileDirectoryLatex-defaultOwner-user:D:\\\\Latex;}")); - assertEquals("\\Literature\\", result.getMetaData().getDefaultFileDirectory().get()); + assertEquals("\\Literature\\", result.getMetaData().getLibraryFileDirectory().get()); assertEquals("D:\\Documents", result.getMetaData().getUserFileDirectory("defaultOwner-user").get()); assertEquals("D:\\Latex", result.getMetaData().getLatexFileDirectory("defaultOwner-user").get().toString()); } @@ -1830,7 +1830,7 @@ void integrationTestFileDirectories() throws IOException { void fileDirectoriesUnmodified(String directory) throws IOException { ParserResult result = parser.parse( new StringReader("@comment{jabref-meta: fileDirectory:" + directory + "}")); - assertEquals(directory, result.getMetaData().getDefaultFileDirectory().get()); + assertEquals(directory, result.getMetaData().getLibraryFileDirectory().get()); } @ParameterizedTest @@ -1840,7 +1840,7 @@ void fileDirectoriesUnmodified(String directory) throws IOException { void fileDirectoryWithDoubleEscapeIsRead(String expected, String provided) throws IOException { ParserResult result = parser.parse( new StringReader("@comment{jabref-meta: fileDirectory: " + provided + "}")); - assertEquals(expected, result.getMetaData().getDefaultFileDirectory().get()); + assertEquals(expected, result.getMetaData().getLibraryFileDirectory().get()); } @Test diff --git a/src/test/java/org/jabref/logic/integrity/IntegrityCheckTest.java b/src/test/java/org/jabref/logic/integrity/IntegrityCheckTest.java index afc8b5852be..098d8025e84 100644 --- a/src/test/java/org/jabref/logic/integrity/IntegrityCheckTest.java +++ b/src/test/java/org/jabref/logic/integrity/IntegrityCheckTest.java @@ -94,7 +94,7 @@ private static Stream provideIncorrectFormat() { @Test void fileChecks() throws Exception { MetaData metaData = mock(MetaData.class); - Mockito.when(metaData.getDefaultFileDirectory()).thenReturn(Optional.of(".")); + Mockito.when(metaData.getLibraryFileDirectory()).thenReturn(Optional.of(".")); Mockito.when(metaData.getUserFileDirectory(any(String.class))).thenReturn(Optional.empty()); // FIXME: must be set as checkBibtexDatabase only activates title checker based on database mode Mockito.when(metaData.getMode()).thenReturn(Optional.of(BibDatabaseMode.BIBTEX)); diff --git a/src/test/java/org/jabref/logic/util/io/FileUtilTest.java b/src/test/java/org/jabref/logic/util/io/FileUtilTest.java index 2256c23789f..ff80ca1e9aa 100644 --- a/src/test/java/org/jabref/logic/util/io/FileUtilTest.java +++ b/src/test/java/org/jabref/logic/util/io/FileUtilTest.java @@ -440,7 +440,7 @@ public static Stream relativize() { BibDatabaseContext database = new BibDatabaseContext(); database.setDatabasePath(bibPath); - database.getMetaData().setDefaultFileDirectory(filesPath.toString()); + database.getMetaData().setLibraryFileDirectory(filesPath.toString()); FilePreferences fileDirPrefs = mock(FilePreferences.class); when(fileDirPrefs.shouldStoreFilesRelativeToBibFile()).thenReturn(true); diff --git a/src/test/java/org/jabref/model/database/BibDatabaseContextTest.java b/src/test/java/org/jabref/model/database/BibDatabaseContextTest.java index 4af7d610682..f797573e4e1 100644 --- a/src/test/java/org/jabref/model/database/BibDatabaseContextTest.java +++ b/src/test/java/org/jabref/model/database/BibDatabaseContextTest.java @@ -64,7 +64,7 @@ void getFileDirectoriesWithDotAsDirectory() { Path file = Path.of("biblio.bib"); BibDatabaseContext database = new BibDatabaseContext(); database.setDatabasePath(currentWorkingDir.resolve(file)); - database.getMetaData().setDefaultFileDirectory("."); + database.getMetaData().setLibraryFileDirectory("."); assertEquals(List.of(currentWorkingDir), database.getFileDirectories(fileDirPrefs)); } @@ -83,7 +83,7 @@ void getFileDirectoriesWithRelativeMetadata() { BibDatabaseContext database = new BibDatabaseContext(); database.setDatabasePath(file); - database.getMetaData().setDefaultFileDirectory("../Literature"); + database.getMetaData().setLibraryFileDirectory("../Literature"); assertEquals(List.of( // first directory originates from the metadata Path.of("/absolute/Literature").toAbsolutePath(), @@ -98,7 +98,7 @@ void getFileDirectoriesWithMetadata() { BibDatabaseContext database = new BibDatabaseContext(); database.setDatabasePath(file); - database.getMetaData().setDefaultFileDirectory("Literature"); + database.getMetaData().setLibraryFileDirectory("Literature"); assertEquals(List.of( // first directory originates from the metadata Path.of("/absolute/subdir/Literature").toAbsolutePath(), From 8c604953193bcea53491d05402235e3ddfa9efa7 Mon Sep 17 00:00:00 2001 From: tom Date: Sat, 19 Oct 2024 15:42:10 +1100 Subject: [PATCH 04/10] change 'General file directory' to 'Library file directory' in places that were previously missed. --- .../jabref/gui/libraryproperties/general/GeneralProperties.fxml | 2 +- .../java/org/jabref/logic/importer/util/MetaDataParser.java | 2 +- src/main/java/org/jabref/model/database/BibDatabaseContext.java | 2 +- src/main/resources/l10n/JabRef_en.properties | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/jabref/gui/libraryproperties/general/GeneralProperties.fxml b/src/main/java/org/jabref/gui/libraryproperties/general/GeneralProperties.fxml index b843840f6e6..e7dd6163784 100644 --- a/src/main/java/org/jabref/gui/libraryproperties/general/GeneralProperties.fxml +++ b/src/main/java/org/jabref/gui/libraryproperties/general/GeneralProperties.fxml @@ -31,7 +31,7 @@