Adds progress count to Possible Duplicates dialog#7602
Conversation
resolves JabRef#7366 When processing duplicate entries, Possible Duplicates dialog gave no indication as to progress. To address this lack of feedback, a progress counter was added to the title bar. The title property now contains two updatable properties: 1) A total count of all duplicates 2) a count of how many duplicates have already been addressed They are updated with listeners and bindings to provide real time feedback.
|
The Background Tasks have already a ProgessValue and progressText property you can bind to, have a look at the umportFilesInBackground here jabref/src/main/java/org/jabref/gui/externalfiles/ImportHandler.java Lines 68 to 88 in 2948e6d And the binding in UnlinkedFilesDialog |
|
@Siedlerchr I think this is a different kind of progress. Here the user is clicking and thus changing the "progress" while for your solution something is happening in the background. |
|
@Siedlerchr The progress count is indeed a user paced progress, which changes as the user clicks options for resolving duplicates and in a few cases increments automatically without presenting a user a dialog window but still only as a response to a previous dialog click. This value I didn't think would be appropriate to use the background task. The other value, the total, is only a count of total pairs found. While it may be possible to take advantage of the background progress monitoring, it's really not a true progress count that is needed for this value. I would have liked to simply request the value from the AtomicInteger duplicateCount (like the notify at the end) but I wasn't able to use this directly because the dialog pops up before many of the pairs have been made often giving an artificially low count of 1/1. This ends up being a progress count of a user working through the end result of the of the find-possible-pairs task. |
|
Ah thanks for the explanation |
|
@Siedlerchr would you like to see revisions? |
Siedlerchr
left a comment
There was a problem hiding this comment.
Thanks again for your work, lgtm so far
|
@tp-1000 Thanks for your contribution! And sorry for the delay! |
resolves #7366
When processing duplicate entries,
Possible Duplicates dialog gave no indication as to progress.
To address this lack of feedback,
a progress counter was added to the title bar.
The title property now contains two updatable properties:
They are updated with listeners and bindings to
provide real time feedback.
Note: because of the use of different threads, the total-count could not be directly bound so an extra variable and listener are required. Also line 88 was removed and
duplicateCount.getAndIncrement()was changed fromgetAndIncrement()toincrementAndGet()so returned value could be used.CHANGELOG.mddescribed in a way that is understandable for the average user (if applicable)