Write XMP Button should be disabled when action is in progress
See original GitHub issueWe offer the functionality to write XMP to a PDF:
We tried to fix it at https://github.com/JabRef/jabref/pull/8658
However, the fix does not work:
com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalStateException: 1-based index not found: 8
at org.jabref.merged.module@5.6.160/com.google.common.cache.LocalCache$Segment.get(Unknown Source)
at org.jabref.merged.module@5.6.160/com.google.common.cache.LocalCache.get(Unknown Source)
at org.jabref.merged.module@5.6.160/com.google.common.cache.LocalCache.getOrLoad(Unknown Source)
at org.jabref.merged.module@5.6.160/com.google.common.cache.LocalCache$LocalLoadingCache.get(Unknown Source)
at org.jabref.merged.module@5.6.160/com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(Unknown Source)
at org.jabref@5.6.160/org.jabref.logic.pdf.FileAnnotationCache.getFromCache(Unknown Source)
at org.jabref@5.6.160/org.jabref.gui.entryeditor.fileannotationtab.FileAnnotationTabViewModel.lambda$reloadAnnotations$1(Unknown Source)
at org.jabref.merged.module@5.6.160/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Unknown Source)
at org.jabref.merged.module@5.6.160/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(Unknown Source)
at org.jabref.merged.module@5.6.160/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
at org.jabref.merged.module@5.6.160/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at org.jabref.merged.module@5.6.160/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalStateException: 1-based index not found: 8
at org.jabref.merged.module@5.6.160/org.apache.pdfbox.pdmodel.PDPageTree.get(Unknown Source)
at org.jabref.merged.module@5.6.160/org.apache.pdfbox.pdmodel.PDPageTree.get(Unknown Source)
at org.jabref.merged.module@5.6.160/org.apache.pdfbox.pdmodel.PDPageTree.get(Unknown Source)
at org.jabref.merged.module@5.6.160/org.apache.pdfbox.pdmodel.PDPageTree.get(Unknown Source)
at org.jabref@5.6.160/org.jabref.logic.pdf.PdfAnnotationImporter.importAnnotations(Unknown Source)
at org.jabref@5.6.160/org.jabref.logic.pdf.EntryAnnotationImporter.lambda$importAnnotationsFromFiles$2(Unknown Source)
at java.base/java.util.Optional.ifPresent(Unknown Source)
at org.jabref@5.6.160/org.jabref.logic.pdf.EntryAnnotationImporter.importAnnotationsFromFiles(Unknown Source)
at org.jabref@5.6.160/org.jabref.logic.pdf.FileAnnotationCache$1.load(Unknown Source)
at org.jabref@5.6.160/org.jabref.logic.pdf.FileAnnotationCache$1.load(Unknown Source)
at org.jabref.merged.module@5.6.160/com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(Unknown Source)
at org.jabref.merged.module@5.6.160/com.google.common.cache.LocalCache$Segment.loadSync(Unknown Source)
at org.jabref.merged.module@5.6.160/com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(Unknown Source)
... 14 more
Proposal: When clicking on the button
- JabRef disalbes the button
- JabRef does its work
- JabRef enabled the button
This a) provides the user a feedback that JabRef is working and b) removes synchronized
statements from the code.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Friendly reminder to enable XMP profile when buying RAM ...
XMP is very safe. How to enable XMP: First restart your pc and mash the F2/DEL button (varies per manufacturer) get to the...
Read more >HTML attribute: disabled - HTML: HyperText Markup Language
This Boolean disabled attribute indicates that the user cannot interact with the control or its descendant controls.
Read more >XMP file for *** cannot be created or updated. - FastRawViewer
Cannot write to XMP file. Check card write lock switch, available disk space, and folder access rights. This message comes up 95% of...
Read more >Manage Camera Raw settings - Adobe Support
Learn how to manage Adobe Camera Raw settings to work with your images to ... The Camera Raw plug-in cannot write an XMP...
Read more >Making Disabled Buttons More Inclusive - CSS-Tricks
Let's talk about disabled buttons. ... the traditional disabled attribute in HTML (e.g. <button disabled> ) to mark a button as disabled.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you @ThiloteE ! 😃 - I’m planning to push the proposed enhancement to disable the button once it’s clicked then re-enable it once the write is done, will have a look at the contribution guidelines before pushing the change though, let me know please if you have any suggestions.
Thank you for your interest by the way! 😃
If you are here, you are at the right place: