Add numeric suffix to distinguish multiple untitled libraries#203
Closed
Add numeric suffix to distinguish multiple untitled libraries#203
Conversation
Agent-Logs-Url: https://github.com/InAnYan/jabref/sessions/82ffdc32-51fd-4b8b-a46f-12e2466e7cf6 Co-authored-by: InAnYan <13097618+InAnYan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add numbering to empty library names on creation
Add numeric suffix to distinguish multiple untitled libraries
Mar 29, 2026
InAnYan
requested changes
Mar 30, 2026
| if (databaseLocation == DatabaseLocation.LOCAL) { | ||
| tabTitle.append('*'); | ||
| tabTitle.append(Localization.lang("untitled")); | ||
| List<LibraryTab> untitledTabs = tabContainer.getLibraryTabs().stream() |
Owner
There was a problem hiding this comment.
Can you put this to a separate method? Like determine untitled count or something
Author
There was a problem hiding this comment.
Extracted the logic into a private getUntitledTabTitle() method in 33d92f4.
Agent-Logs-Url: https://github.com/InAnYan/jabref/sessions/25302d6a-9bed-4b78-a894-de2239347af9 Co-authored-by: InAnYan <13097618+InAnYan@users.noreply.github.com>
InAnYan
requested changes
Mar 30, 2026
…sed at call site Agent-Logs-Url: https://github.com/InAnYan/jabref/sessions/e19d7098-4d32-469a-95ac-8ea969207b33 Co-authored-by: InAnYan <13097618+InAnYan@users.noreply.github.com>
Add method to get index for new untitled library.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When multiple unsaved libraries are open simultaneously, they all display as
*untitled, making them indistinguishable in the tab bar.Changes
LibraryTab.updateTabTitle(): When computing the title for an unsaved local library, enumerate all currently open untitled tabs from the tab container and use this tab's position index to generate a unique suffix:*untitled*untitled (1)*untitled (2), etc.Numbering is dynamic — tabs renumber when any untitled tab is closed. If the tab is not yet registered in the container (defensive fallback), it shows
*untitled.JabRef_en.properties: Added localization keyuntitled (%0)for the numbered form, following JabRef's placeholder convention.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
api.foojay.io/usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED -Xmx6g -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant(dns block)central.sonatype.com/usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED -Xmx6g -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant(dns block)files.jabref.org/usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java -Xmx64m -Xms64m -Dorg.gradle.appname=gradlew -jar /home/REDACTED/work/jabref/jabref/gradle/wrapper/gradle-wrapper.jar :jabgui:compileJava --no-daemon -q(dns block)If you need me to access, download, or install something from one of these locations, you can either:
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.