-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates to colored group indicator for cited entries #7173
Updates to colored group indicator for cited entries #7173
Conversation
Matched groups should update both on changes in the BibEntry and changes in groups.
Would any of the following be more/less valid approaches?
|
I added a minimum working example of implementing the |
Thanks for tackling this! It would be interesting to see how it performs with many group (can provide you a test file via mail or so, cause its confidential) |
I can't observe impactful slowdowns/memory leaks, but there shouldn't be many changes that affects the large database. Most potential memory leaks will only occur when an I have update the description with what I think is left, and commented on a change that can mostly be reverted if performance is an issue. Sorry about the slow going, JavaFX is somewhat new to me. |
src/main/java/org/jabref/gui/maintable/BibEntryTableViewModel.java
Outdated
Show resolved
Hide resolved
Hey there! |
Hey @DominikVoigt . I am sorry but no, I thought I would make a 30 min fix in #7210 but unfortunately it didn't turn out that way o.O |
@k3KAW8Pnf7mkmdSMPHz27 The bib file is changed can be also #5967 |
Thank you for the link!
It might be both o.O
I should have time to continue on this later today *knock on wood*
…On December 21, 2020 at 14:36:12, Christoph ***@***.******@***.***)) wrote:
@k3KAW8Pnf7mkmdSMPHz27(https://github.com/k3KAW8Pnf7mkmdSMPHz27) The bib file is changed can be also #5967(#5967)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub(#7173 (comment)), or unsubscribe(https://github.com/notifications/unsubscribe-auth/AAT2NZ45K4ZHUSSHHOJCE4DSV6PSZANCNFSM4USF5PMQ).
|
As a first workaround try disabling autosave. |
@Siedlerchr at least for now it happens independently of autosave. The reason why JabRef believes that the database has changed is that I wanted to use jabref/src/main/java/org/jabref/gui/LibraryTab.java Lines 356 to 359 in 08e824f
among others. (I wanted to view it as a change to the
I think it is the only group with these characteristics, hence I don't see it motivated to extend the I'll figure something out but I am temporarily a bit stuck 😱 |
Hum... |
It might make sense to make |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you still have open questions or is this already ready for review?
Hey @k3KAW8Pnf7mkmdSMPHz27 , you didn't change anything on this PR for 5 days. Is this PR ready for review? |
Sorry. Yes, it is ready for review
…On January 8, 2021 at 20:26:53, Carl Christian Snethlage ***@***.******@***.***)) wrote:
Hey @k3KAW8Pnf7mkmdSMPHz27(https://github.com/k3KAW8Pnf7mkmdSMPHz27) , you didn't change anything on this PR for 5 days. Is this PR ready for review?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub(#7173 (comment)), or unsubscribe(https://github.com/notifications/unsubscribe-auth/AAT2NZ3MSNH2XHRIYUKLINTSY6WF3ANCNFSM4USF5PMQ).
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
The code looks very good to me. The only problem I see is that the UI-binding already happens in the model class. This should be moved to the gui classes that need such a wrapping.
import org.jabref.architecture.AllowedToUseLogic; | ||
import org.jabref.gui.util.uithreadaware.UiThreadOptionalBinding; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The model and logic packages need to be free of gui stuff. The wrapping on the JavaFX thread should happen right before it is displayed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JabRef/developers Our architecture tests don't work anymore?! This is clearly a violation but the tests pass.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd appreciate an opinion on what should create an update of the group color region in the maintable (entry.getObservables()
?). Also, should that part of #7325 be addressed in this PR? (the group color region not updating)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worked myself through the changes. Looks good also to me, so I will merge this PR.
Thanks for your work on this issue!
…dtask * upstream/master: Update guidelines-for-setting-up-a-local-workspace.md (#7339) Updates to colored group indicator for cited entries (#7173) Add some special fields as default columns (#7286) Add a more descriptive path when Directory cannot be found (#7232) Bump antlr4 from 4.9 to 4.9.1 (#7327) Bump unirest-java from 3.11.09 to 3.11.10 (#7329) Bump mockito-core from 3.6.28 to 3.7.0 (#7328) Bump antlr4-runtime from 4.9 to 4.9.1 (#7330) Bump gittools/actions from v0.9.7 to v0.9.8 (#7331) Update to gradle 6.8 (#7324) Link to GitHub contributors in about dialog (#7319) Fix snapcraft upload (#7263)
I have just tried this fix with the current master build on Ubuntu 16.04. Unfortunately, it seems, neither the colored group indicator, nor the badge icon are updated automatically in my situation:
|
Sorry about that. I am using Texpad with Mac OS X and the group gets updated of the .aux file as I'd expect on JabRef 5.3--2021-01-26--034cf8c. |
I have used a test |
Yup. Adding/removing entries in that fashion works for me in OS X. I'll look into it. I don't really have a hypothesis for why it doesn't work in Ubuntu (yet) |
You are using a local drive? (not remote) Is it possible your editor is generating a "create event" instead of a "modify event"? (This doesn't have to be the same issue as with TeXstudio) |
Yes, on a local drive. You are right: I have created a small java test program of your provided link.
If this file is already opened in TeXstudio (and it has been modified within it before), it detects the change and it asks whether the file should be reloaded.
Apparently, other programs also observe re-ceating files, since I have never had such problems elsewhere before.
But when building the
But still no event gets triggered in JabRef. The same applies when editing the |
@tobiasdiez @k3KAW8Pnf7mkmdSMPHz27 Do you think, that it would make sense to also observe the |
Yes, I guess it's a good idea to also listen for entry_create. At least I cannot think of a negative sideeffect. |
Fixes #6394.
An entry can belong to a specific group depending on,
BibEntry
Hence,
any changes in a field or type in theany change in the groups should reevaluation wether or not the entry is still in any given group.BibEntry
, orI am not very comfortable with the JavaFX/MVVC structure yet, so I have attempted an approach with as few structural changes as possible.
ConcurrentModificationException
Fix performance bottleneckOccurs when switching library and the group is selectedObservable
inTexGroup.java
(how should the listeners be stored?)GroupTreeNode#setGroup(AbstractGroup newGroup)
EventBus
without unregistering listenerisFilteredOut
attribute ofBibDatabaseContextChangedEvent
is used to prevent savingHow does the currentGroupInvalidationEvent
affect the hierarchical group structure? (should it be fired from elsewhere so that only partial recalculations of group colors are necessary)Tests created for changes (if applicable)Screenshots added in PR description (for UI changes)