diff --git a/.github/workflows/add-greeting-to-issue.yml b/.github/workflows/add-greeting-to-issue.yml index 5af62f225ce..06075eef0e2 100644 --- a/.github/workflows/add-greeting-to-issue.yml +++ b/.github/workflows/add-greeting-to-issue.yml @@ -1,10 +1,13 @@ name: Add greeting to issues for first time contributors -on: +on: issues: types: - labeled - + pull_request_target: + types: + - labeled + jobs: GreetingFirstTimeCodeContribution: if: ${{ github.event.label.name == 'FirstTimeCodeContribution' }} @@ -15,8 +18,8 @@ jobs: - name: GreetingFirstTimeCodeContribution uses: peter-evans/create-or-update-comment@v3 with: - issue-number: ${{ github.event.issue.number }} + issue-number: ${{ github.event.issue.number || github.event.pull_request.number }} body: | As a general advice for newcomers: check out [Contributing](https://github.com/JabRef/jabref/blob/main/CONTRIBUTING.md) for a start. Also, [guidelines for setting up a local workspace](https://devdocs.jabref.org/getting-into-the-code/guidelines-for-setting-up-a-local-workspace) is worth having a look at. - + Feel free to ask here at GitHub, if you have any issue related questions. If you have questions about how to setup your workspace use JabRef's [Gitter](https://gitter.im/JabRef/jabref) chat. Try to open a (draft) pull-request early on, so that people can see you are working on the issue and so that they can see the direction the pull request is heading towards. This way, you will likely receive valuable feedback. diff --git a/CHANGELOG.md b/CHANGELOG.md index 744c6d801b0..bcbd2265a9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv - The index directories for full text search have now more readable names to increase debugging possibilities using Apache Lucense's Lurk. [#10193](https://github.com/JabRef/jabref/issues/10193) - The fulltext search also indexes files ending with .pdf (but do not having an explicit file type set). [#10193](https://github.com/JabRef/jabref/issues/10193) - We changed the order of the lists in the "Citation relations" tab. `Cites` are now on the left and `Cited by` on the right [#10572](https://github.com/JabRef/jabref/pull/10752) +- Sub libraries based on `aux` file can now also be generated if some citeations are not found library. [#10775](https://github.com/JabRef/jabref/pull/10775) ### Fixed diff --git a/src/main/java/org/jabref/gui/auximport/FromAuxDialog.java b/src/main/java/org/jabref/gui/auximport/FromAuxDialog.java index 02e947dc0f0..7a16c262b71 100644 --- a/src/main/java/org/jabref/gui/auximport/FromAuxDialog.java +++ b/src/main/java/org/jabref/gui/auximport/FromAuxDialog.java @@ -49,7 +49,7 @@ public FromAuxDialog(LibraryTabContainer tabContainer) { .setAsDialogPane(this); Button generateButton = (Button) this.getDialogPane().lookupButton(generateButtonType); - generateButton.disableProperty().bind(viewModel.parseFailedProperty().or(viewModel.notFoundList().emptyProperty().not())); + generateButton.disableProperty().bind(viewModel.parseFailedProperty()); generateButton.defaultButtonProperty().bind(generateButton.disableProperty().not()); setResultConverter(button -> { if (button == generateButtonType) { diff --git a/src/main/java/org/jabref/gui/entryeditor/EntryEditor.java b/src/main/java/org/jabref/gui/entryeditor/EntryEditor.java index 802c04194b4..98bcf351354 100644 --- a/src/main/java/org/jabref/gui/entryeditor/EntryEditor.java +++ b/src/main/java/org/jabref/gui/entryeditor/EntryEditor.java @@ -45,7 +45,7 @@ import org.jabref.gui.undo.CountingUndoManager; import org.jabref.gui.util.DefaultTaskExecutor; import org.jabref.gui.util.TaskExecutor; -import org.jabref.logic.TypedBibEntry; +import org.jabref.logic.bibtex.TypedBibEntry; import org.jabref.logic.help.HelpFile; import org.jabref.logic.importer.EntryBasedFetcher; import org.jabref.logic.importer.WebFetchers; diff --git a/src/main/java/org/jabref/gui/theme/ThemeManager.java b/src/main/java/org/jabref/gui/theme/ThemeManager.java index d92586a615d..0c18f2fd658 100644 --- a/src/main/java/org/jabref/gui/theme/ThemeManager.java +++ b/src/main/java/org/jabref/gui/theme/ThemeManager.java @@ -48,9 +48,10 @@ public class ThemeManager { private final StyleSheet baseStyleSheet; private Theme theme; + private OsThemeDetector detector; + private Scene mainWindowScene; private final Set webEngines = Collections.newSetFromMap(new WeakHashMap<>()); - private final OsThemeDetector detector = OsThemeDetector.getDetector(); public ThemeManager(WorkspacePreferences workspacePreferences, FileUpdateMonitor fileUpdateMonitor, @@ -71,13 +72,20 @@ public ThemeManager(WorkspacePreferences workspacePreferences, EasyBind.subscribe(workspacePreferences.themeSyncOsProperty(), theme -> updateThemeSettings()); EasyBind.subscribe(workspacePreferences.shouldOverrideDefaultFontSizeProperty(), should -> updateFontSettings()); EasyBind.subscribe(workspacePreferences.mainFontSizeProperty(), size -> updateFontSettings()); - detector.registerListener(isDark -> updateThemeSettings()); + + try { + detector = OsThemeDetector.getDetector(); + detector.registerListener(isDark -> updateThemeSettings()); + } catch (Exception ex) { + LOGGER.error("Could not initialize Theme detector!", ex); + workspacePreferences.setThemeSyncOs(false); + } } private void updateThemeSettings() { Theme newTheme = Objects.requireNonNull(workspacePreferences.getTheme()); - if (workspacePreferences.themeSyncOsProperty().getValue()) { + if (workspacePreferences.themeSyncOsProperty().getValue() && detector != null) { if (detector.isDark()) { newTheme = Theme.dark(); } else { @@ -162,10 +170,10 @@ private void updateBaseCss() { getMainWindowScene().ifPresent(scene -> { List stylesheets = scene.getStylesheets(); if (!stylesheets.isEmpty()) { - stylesheets.remove(0); + stylesheets.removeFirst(); } - stylesheets.add(0, baseStyleSheet.getSceneStylesheet().toExternalForm()); + stylesheets.addFirst(baseStyleSheet.getSceneStylesheet().toExternalForm()); }); } diff --git a/src/main/java/org/jabref/logic/bibtex/BibEntryWriter.java b/src/main/java/org/jabref/logic/bibtex/BibEntryWriter.java index 663fa3e3fee..eaa23b7f6f2 100644 --- a/src/main/java/org/jabref/logic/bibtex/BibEntryWriter.java +++ b/src/main/java/org/jabref/logic/bibtex/BibEntryWriter.java @@ -14,7 +14,6 @@ import java.util.function.Predicate; import java.util.stream.Collectors; -import org.jabref.logic.TypedBibEntry; import org.jabref.logic.exporter.BibWriter; import org.jabref.logic.util.OS; import org.jabref.model.database.BibDatabaseMode; diff --git a/src/main/java/org/jabref/logic/TypedBibEntry.java b/src/main/java/org/jabref/logic/bibtex/TypedBibEntry.java similarity index 98% rename from src/main/java/org/jabref/logic/TypedBibEntry.java rename to src/main/java/org/jabref/logic/bibtex/TypedBibEntry.java index a4da3dbcb80..bbdfd08e69d 100644 --- a/src/main/java/org/jabref/logic/TypedBibEntry.java +++ b/src/main/java/org/jabref/logic/bibtex/TypedBibEntry.java @@ -1,4 +1,4 @@ -package org.jabref.logic; +package org.jabref.logic.bibtex; import java.util.Objects; import java.util.Optional; diff --git a/src/main/java/org/jabref/logic/citationstyle/CitationStyle.java b/src/main/java/org/jabref/logic/citationstyle/CitationStyle.java index fb0aab7dc97..0ebd516e5b2 100644 --- a/src/main/java/org/jabref/logic/citationstyle/CitationStyle.java +++ b/src/main/java/org/jabref/logic/citationstyle/CitationStyle.java @@ -141,8 +141,11 @@ public static List discoverCitationStyles() { return STYLES; } - URL url = CitationStyle.class.getResource(STYLES_ROOT + "/acm-siggraph.csl"); - Objects.requireNonNull(url); + URL url = CitationStyle.class.getResource(STYLES_ROOT + DEFAULT); + if (url == null) { + LOGGER.error("Could not find any citation style. Tried with {}.", DEFAULT); + return Collections.emptyList(); + } try { URI uri = url.toURI(); diff --git a/src/main/java/org/jabref/logic/citationstyle/JabRefLocaleProvider.java b/src/main/java/org/jabref/logic/citationstyle/JabRefLocaleProvider.java index 376303c7caf..142b87bb375 100644 --- a/src/main/java/org/jabref/logic/citationstyle/JabRefLocaleProvider.java +++ b/src/main/java/org/jabref/logic/citationstyle/JabRefLocaleProvider.java @@ -28,7 +28,6 @@ public String retrieveLocale(String lang) { if (url == null) { throw new IllegalArgumentException("Unable to load locale " + locale); } - return CSLUtils.readURLToString(url, "UTF-8"); } catch (IOException e) { throw new UncheckedIOException("failed to read locale " + locale, e); diff --git a/src/main/java/org/jabref/logic/xmp/DublinCoreExtractor.java b/src/main/java/org/jabref/logic/xmp/DublinCoreExtractor.java index 8df2f2ed770..f79c5d5616c 100644 --- a/src/main/java/org/jabref/logic/xmp/DublinCoreExtractor.java +++ b/src/main/java/org/jabref/logic/xmp/DublinCoreExtractor.java @@ -9,7 +9,7 @@ import java.util.function.Consumer; import java.util.function.Predicate; -import org.jabref.logic.TypedBibEntry; +import org.jabref.logic.bibtex.TypedBibEntry; import org.jabref.logic.formatter.casechanger.UnprotectTermsFormatter; import org.jabref.model.database.BibDatabase; import org.jabref.model.database.BibDatabaseMode; diff --git a/src/test/java/org/jabref/logic/TypedBibEntryTest.java b/src/test/java/org/jabref/logic/TypedBibEntryTest.java index 683d636e7c2..18ec51769db 100644 --- a/src/test/java/org/jabref/logic/TypedBibEntryTest.java +++ b/src/test/java/org/jabref/logic/TypedBibEntryTest.java @@ -1,5 +1,6 @@ package org.jabref.logic; +import org.jabref.logic.bibtex.TypedBibEntry; import org.jabref.model.database.BibDatabaseMode; import org.jabref.model.entry.BibEntry; import org.jabref.model.entry.BibEntryTypesManager;