Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
99c3cf7
Prevent bulk imports from adding entries to navigation history
shubhamk0205 Dec 7, 2025
6a390a5
Updated ImportHandlerTest
shubhamk0205 Dec 8, 2025
5787d36
fixed CI errors
shubhamk0205 Dec 8, 2025
408a46b
fixed CI errors
shubhamk0205 Dec 8, 2025
dd7811c
fixed CI errors
shubhamk0205 Dec 8, 2025
dc62aa1
fixed CI errors
shubhamk0205 Dec 8, 2025
0119f15
fixed CI errors
shubhamk0205 Dec 8, 2025
addcd66
fixed CI errors
shubhamk0205 Dec 8, 2025
8d8ab3d
fixed CI errors
shubhamk0205 Dec 8, 2025
5772178
Merge branch 'main' into fix-for-issue-13878
shubhamk0205 Dec 8, 2025
789b294
Fix link
koppor Dec 8, 2025
4b8ed07
Proxy Preference reset (#14554)
lalit2506verma Dec 8, 2025
37e5caf
Fix typos (#14552)
koppor Dec 8, 2025
d24aa92
Add LlmPlainCitationParserTest (#14553)
koppor Dec 8, 2025
dd95e05
Create README.md for JabKit project
koppor Dec 9, 2025
d101b2e
Add JDK24 for gradle (#14560)
koppor Dec 9, 2025
d5c3200
Add fallback (#14520)
koppor Dec 9, 2025
8286ff2
Rerun only on main repo
koppor Dec 10, 2025
8de881f
Add documentation link for jabsrv
koppor Dec 10, 2025
d228c46
Implement reset for MainTablePreferences (#14523)
nbelwang Dec 10, 2025
315fb42
change: Rename web labels 'Search pre-configured' to 'Search pre-sele…
mayank1008-tech Dec 11, 2025
7e1ddc6
Refactor PagesChecker: Extract duplicate regex constants (#14567)
Zeglow Dec 11, 2025
b6ab730
Refactor some formats tests to use parameterized tests (#14558)
merlinymy Dec 11, 2025
a23553c
New Crowdin updates (#14570)
Siedlerchr Dec 11, 2025
aafb809
Add 15 non-standard BibLaTeX entry types with .withType() method (#14…
shubhamk0205 Dec 11, 2025
9efbe2d
Fix link
koppor Dec 8, 2025
225fbb5
Proxy Preference reset (#14554)
lalit2506verma Dec 8, 2025
6825062
Fix typos (#14552)
koppor Dec 8, 2025
851a2e8
Add LlmPlainCitationParserTest (#14553)
koppor Dec 8, 2025
76351ea
Create README.md for JabKit project
koppor Dec 9, 2025
fde4401
Add JDK24 for gradle (#14560)
koppor Dec 9, 2025
f4cb182
Add fallback (#14520)
koppor Dec 9, 2025
db6a8fa
Rerun only on main repo
koppor Dec 10, 2025
8cae2f3
Add documentation link for jabsrv
koppor Dec 10, 2025
a82b2b0
Implement reset for MainTablePreferences (#14523)
nbelwang Dec 10, 2025
92d53ca
change: Rename web labels 'Search pre-configured' to 'Search pre-sele…
mayank1008-tech Dec 11, 2025
29e3986
Refactor PagesChecker: Extract duplicate regex constants (#14567)
Zeglow Dec 11, 2025
36b881c
Refactor some formats tests to use parameterized tests (#14558)
merlinymy Dec 11, 2025
dc89fc6
New Crowdin updates (#14570)
Siedlerchr Dec 11, 2025
d7451cf
Add 15 non-standard BibLaTeX entry types with .withType() method (#14…
shubhamk0205 Dec 11, 2025
cde171f
Fix bulk imports adding entries to navigation history
shubhamk0205 Dec 11, 2025
73119df
Prevent bulk imports from adding entries to navigation history
shubhamk0205 Dec 7, 2025
7857fc2
Updated ImportHandlerTest
shubhamk0205 Dec 8, 2025
c80dd53
fixed CI errors
shubhamk0205 Dec 8, 2025
9dedc3d
fixed CI errors
shubhamk0205 Dec 8, 2025
131221c
fixed CI errors
shubhamk0205 Dec 8, 2025
8d367a2
fixed CI errors
shubhamk0205 Dec 8, 2025
60d89e4
fixed CI errors
shubhamk0205 Dec 8, 2025
c305e47
fixed CI errors
shubhamk0205 Dec 8, 2025
e2bfbba
fixed CI errors
shubhamk0205 Dec 8, 2025
1e1f734
Fix bulk imports adding entries to navigation history
shubhamk0205 Dec 11, 2025
daa6d59
Merge branch 'fix-for-issue-13878' of https://github.com/shubhamk0205…
shubhamk0205 Dec 11, 2025
26461d4
Revert accidental merge daa6d595ad that pulled main into branch
shubhamk0205 Dec 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/rerun-merge-conflict-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

jobs:
rerun:
if: github.repository == 'JabRef/jabref'
runs-on: ubuntu-latest
permissions:
actions: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-openrewrite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: 24
java-version: 25
distribution: 'corretto'
check-latest: true
- name: Setup Gradle
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/tests-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ jobs:
with:
submodules: 'true'
show-progress: 'false'
- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: 24
distribution: 'corretto'
check-latest: true
- name: Set up JDK
uses: actions/setup-java@v5
with:
Expand Down Expand Up @@ -532,7 +538,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: 24
java-version: 25
distribution: 'corretto'
check-latest: true
- name: Generate JBang cache key
Expand Down
2 changes: 1 addition & 1 deletion .jbang/JabKitLauncher.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

//DESCRIPTION jabkit - mange BibTeX files using JabRef

//JAVA 24
//JAVA 24+
//RUNTIME_OPTIONS --enable-native-access=ALL-UNNAMED

// raw is for https://github.com/unicode-org/icu/pull/2127
Expand Down
2 changes: 1 addition & 1 deletion .jbang/JabLsLauncher.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

//DESCRIPTION jabls - start a bibtex languageserver

//JAVA 24
//JAVA 24+
//RUNTIME_OPTIONS --enable-native-access=ALL-UNNAMED

// raw is for https://github.com/unicode-org/icu/pull/2127
Expand Down
2 changes: 1 addition & 1 deletion .jbang/JabSrvLauncher.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

//DESCRIPTION jabsrv - serve BibTeX files using JabRef

//JAVA 24
//JAVA 24+
//RUNTIME_OPTIONS --enable-native-access=ALL-UNNAMED

// raw is for https://github.com/unicode-org/icu/pull/2127
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
### Added

- Improved merge dialog decisions for fields containing person names (e.g., `author`, `editor`) by using a new plausibility comparator. JabRef now prefers the side with more detailed/complete author information. [#14454](https://github.com/JabRef/jabref/issues/14454)
- We added 15 non-standard BibLaTeX entry types (Audio, Image, Legal, ...) to the group "Non-standard types" group in the New Entry dialog and in the context menu. [#12963](https://github.com/JabRef/jabref/issues/12963)
- We added a drop-down menu to those custom fields in the main table for which content selector values exists. [#14087](https://github.com/JabRef/jabref/issues/14087)
- We added a "Jump to Field" dialog (`Ctrl+J`) to quickly search for and navigate to any field across all tabs. [#12276](https://github.com/JabRef/jabref/issues/12276).
- We added "IEEE" as another option for parsing plain text citations. [#14233](github.com/JabRef/jabref/pull/14233)
Expand Down Expand Up @@ -42,10 +43,13 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
- After importing, now all imported entries are marked. [#13535](https://github.com/JabRef/jabref/pull/13535)
- The URL integrity check now checks the complete URL syntax. [#14370](https://github.com/JabRef/jabref/pull/14370)
- <kbd>Tab</kbd> in the last text field of a tab moves the focus to the next tab in the entry editor. [#11937](https://github.com/JabRef/jabref/issues/11937)
- When pasting invalid BibTeX data, the content is now pasted as `@Misc` with the raw data in the `comment` field. [#14520](https://github.com/JabRef/jabref/pull/14520)
- We changed fixed-value ComboBoxes to SearchableComboBox for better usability. [#14083](https://github.com/JabRef/jabref/issues/14083)
- We renamed "Search pre-configured" to "Search pre-selected" and "Web search fetchers" to "Pre-selected fetchers". [#14557](https://github.com/JabRef/jabref/issues/14557)

### Fixed

- We fixed an issue where bulk import operations polluted the navigation history, making the Back/Forward buttons navigate through imported entries instead of only user-selected entries. [#13878](https://github.com/JabRef/jabref/issues/13878)
- We fixed an issue where pressing <kbd>ESC</kbd> in the preferences dialog would not always close the dialog. [#8888](https://github.com/JabRef/jabref/issues/8888)
- We fixed the checkbox in merge dialog "Treat duplicates the same way" to make it functional. [#14224](https://github.com/JabRef/jabref/pull/14224)
- We fixed the fallback window height (786 → 768) in JabRefGUI. [#14295](https://github.com/JabRef/jabref/pull/14295)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//JAVA 24
//JAVA 24+
//RUNTIME_OPTIONS --enable-native-access=ALL-UNNAMED

//DEPS org.jspecify:jspecify:1.0.0
Expand Down
6 changes: 3 additions & 3 deletions build-support/src/main/java/JournalListMvGenerator.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
//JAVA 24
//JAVA 24+
//RUNTIME_OPTIONS --enable-native-access=ALL-UNNAMED

//DEPS com.h2database:h2:2.4.240
//DEPS info.debatty:java-string-similarity:2.0.0
//DEPS org.antlr:antlr4-runtime:4.13.2
//DEPS org.apache.commons:commons-csv:1.14.1
//DEPS info.debatty:java-string-similarity:2.0.0
//DEPS org.jooq:jool:0.9.15
//DEPS org.jspecify:jspecify:1.0.0
//DEPS org.openjfx:javafx-base:24.0.2
//DEPS org.slf4j:slf4j-api:2.0.17
//DEPS org.slf4j:slf4j-simple:2.0.17
//DEPS org.jspecify:jspecify:1.0.0

//SOURCES ../../../../jablib/src/main/java/org/jabref/logic/journals/Abbreviation.java
//SOURCES ../../../../jablib/src/main/java/org/jabref/logic/journals/AbbreviationFormat.java
Expand Down
4 changes: 2 additions & 2 deletions build-support/src/main/java/LtwaListMvGenerator.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
//JAVA 24
//JAVA 24+
//RUNTIME_OPTIONS --enable-native-access=ALL-UNNAMED

//DEPS com.h2database:h2:2.4.240
//DEPS org.antlr:antlr4-runtime:4.13.2
//DEPS org.apache.commons:commons-csv:1.14.1
//DEPS info.debatty:java-string-similarity:2.0.0
//DEPS org.jooq:jool:0.9.15
//DEPS org.openjfx:javafx-base:24.0.2
//DEPS org.jspecify:jspecify:1.0.0
//DEPS org.openjfx:javafx-base:24.0.2
//DEPS org.slf4j:slf4j-api:2.0.17
//DEPS org.slf4j:slf4j-simple:2.0.17

Expand Down
4 changes: 2 additions & 2 deletions docs/code-howtos/fetchers.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ Fetchers are the implementation of the [search using online services](https://do
| [Medline/Pubmed](https://pubmed.ncbi.nlm.nih.gov/) | [NCBI User account](https://account.ncbi.nlm.nih.gov/settings/) | `medlineApiKey` | 10 requests/seconds |
| [MathSciNet](http://www.ams.org/mathscinet) | (none) | (none) | Depending on the current network |
| [SAO/NASA Astrophysics Data System](https://docs.jabref.org/collect/import-using-online-bibliographic-database#sao-nasa-astrophysics-data-system) | [ADS UI](https://ui.adsabs.harvard.edu/user/settings/token) | `AstrophysicsDataSystemAPIKey` | 5000 calls/day |
| [ScienceDirect](https://www.sciencedirect.com) | [Elsevier Dev Portal](https://dev.elsevier.com/) | `ScienceDirectApiKey` | |
| [SemanticScholar](https://www.semanticscholar.org/) | <https://www.semanticscholar.org/product/api#api-key-form> | `SemanticScholarApiKey` | [20.000 calls/week](https://dev.elsevier.com/api_key_settings.html) |
| [ScienceDirect](https://www.sciencedirect.com) | [Elsevier Dev Portal](https://dev.elsevier.com/) | `ScienceDirectApiKey` | [20.000 calls/week](https://dev.elsevier.com/api_key_settings.html) |
| [SemanticScholar](https://www.semanticscholar.org/) | <https://www.semanticscholar.org/product/api#api-key-form> | `SemanticScholarApiKey` | |
| [Springer Nature](https://docs.jabref.org/collect/import-using-online-bibliographic-database#springer) | [Springer Nature API portal](https://dev.springernature.com). Use the "Meta API" API key. | `SpringerNatureAPIKey` | 5000 calls/day |
| [Zentralblatt Math](https://www.zbmath.org) | (none) | (none) | Depending on the current network |

Expand Down
62 changes: 52 additions & 10 deletions jabgui/src/main/java/org/jabref/gui/LibraryTab.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@
import org.jabref.model.entry.event.EntriesEventSource;
import org.jabref.model.entry.event.FieldChangedEvent;
import org.jabref.model.entry.field.FieldFactory;
import org.jabref.model.entry.field.StandardField;
import org.jabref.model.entry.types.StandardEntryType;
import org.jabref.model.groups.GroupTreeNode;
import org.jabref.model.search.query.SearchQuery;
import org.jabref.model.util.FileUpdateMonitor;
Expand All @@ -103,6 +105,7 @@
import org.controlsfx.control.NotificationPane;
import org.controlsfx.control.action.Action;
import org.jspecify.annotations.NonNull;
import org.jspecify.annotations.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand All @@ -126,6 +129,7 @@ public class LibraryTab extends Tab implements CommandSelectionTab {
private final BooleanProperty canGoBackProperty = new SimpleBooleanProperty(false);
private final BooleanProperty canGoForwardProperty = new SimpleBooleanProperty(false);
private boolean backOrForwardNavigationActionTriggered = false;
private NavigationHistory.@Nullable Suppression currentBulkImportSuppression;

private BibDatabaseContext bibDatabaseContext;

Expand Down Expand Up @@ -239,7 +243,9 @@ private void initializeComponentsAndListeners(boolean isDummyContext) {
undoManager,
stateManager,
dialogService,
taskExecutor);
taskExecutor,
this::startBulkImport,
this::endBulkImport);

setupMainPanel();
setupAutoCompletion();
Expand Down Expand Up @@ -821,18 +827,30 @@ public void insertEntry(final BibEntry bibEntry) {
}

public void insertEntries(final List<BibEntry> entries) {
insertEntries(entries, false);
}

/**
* Inserts entries into the library.
*
* @param entries the entries to insert
* @param suppressNavigation if true, navigation history will not be updated for these entries
*/
public void insertEntries(final List<BibEntry> entries, boolean suppressNavigation) {
if (entries.isEmpty()) {
return;
}

importHandler.importCleanedEntries(null, entries);
getUndoManager().addEdit(new UndoableInsertEntries(bibDatabaseContext.getDatabase(), entries));
markBaseChanged();
stateManager.setSelectedEntries(entries);
if (preferences.getEntryEditorPreferences().shouldOpenOnNewEntry()) {
showAndEdit(entries.getFirst());
} else {
clearAndSelect(entries.getFirst());
try (NavigationHistory.Suppression ignored = suppressNavigation ? navigationHistory.suppressUpdates() : NavigationHistory.Suppression.noOp()) {
importHandler.importCleanedEntries(null, entries);
getUndoManager().addEdit(new UndoableInsertEntries(bibDatabaseContext.getDatabase(), entries));
markBaseChanged();
stateManager.setSelectedEntries(entries);
if (preferences.getEntryEditorPreferences().shouldOpenOnNewEntry()) {
showAndEdit(entries.getFirst());
} else {
clearAndSelect(entries.getFirst());
}
}
}

Expand Down Expand Up @@ -894,7 +912,10 @@ private List<BibEntry> handleNonBibTeXStringData(String data) {
} else {
dialogService.showErrorDialogAndWait(exception);
}
return List.of();
BibEntry fallBack = new BibEntry(StandardEntryType.Misc)
.withField(StandardField.COMMENT, data)
.withChanged(true);
return List.of(fallBack);
}
}

Expand Down Expand Up @@ -1038,6 +1059,27 @@ public void updateNavigationState() {
canGoForwardProperty.set(canGoForward());
}

/**
* Called by ImportHandler when starting a bulk import operation.
* Suppresses navigation history updates during the import.
*/
private void startBulkImport() {
if (currentBulkImportSuppression == null) {
currentBulkImportSuppression = navigationHistory.suppressUpdates();
}
}

/**
* Called by ImportHandler when ending a bulk import operation.
* Resumes normal navigation history tracking.
*/
private void endBulkImport() {
if (currentBulkImportSuppression != null) {
currentBulkImportSuppression.close();
currentBulkImportSuppression = null;
}
}

/**
* Creates a new library tab. Contents are loaded by the {@code dataLoadingTask}. Most of the other parameters are required by {@code resetChangeMonitor()}.
*
Expand Down
66 changes: 66 additions & 0 deletions jabgui/src/main/java/org/jabref/gui/NavigationHistory.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public class NavigationHistory {
private final List<BibEntry> previousEntries = new ArrayList<>();
private final List<BibEntry> nextEntries = new ArrayList<>();
private BibEntry currentEntry;
private int suppressionDepth;

/**
* Sets a new entry as the current one, clearing the forward history.
Expand All @@ -24,6 +25,10 @@ public class NavigationHistory {
* @param entry The BibEntry to add to the history.
*/
public void add(BibEntry entry) {
if (isSuppressed()) {
return;
}

if (Objects.equals(currentEntry, entry)) {
return;
}
Expand Down Expand Up @@ -74,4 +79,65 @@ public boolean canGoBack() {
public boolean canGoForward() {
return !nextEntries.isEmpty();
}

/**
* Suppresses navigation history updates while the returned guard is open.
* Intended for bulk operations that perform multiple selection changes.
*/
public Suppression suppressUpdates() {
return new Suppression(this);
}

/**
* Convenience helper to suppress updates conditionally.
*/
public Suppression suppressUpdatesIf(boolean active) {
return active ? suppressUpdates() : Suppression.noOp();
}

private boolean isSuppressed() {
return suppressionDepth > 0;
}

private void beginSuppression() {
suppressionDepth++;
}

private void endSuppression() {
if (suppressionDepth > 0) {
suppressionDepth--;
}
}

public static final class Suppression implements AutoCloseable {
private static final Suppression NO_OP = new Suppression();

private final NavigationHistory owner;
private boolean closed;
private final boolean active;

private Suppression() {
this.owner = null;
this.active = false;
}

private Suppression(NavigationHistory owner) {
this.owner = owner;
this.active = true;
owner.beginSuppression();
}

@Override
public void close() {
if (closed || !active) {
return;
}
closed = true;
owner.endSuppression();
}

public static Suppression noOp() {
return NO_OP;
}
}
}
Loading
Loading