Skip to content
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

Fix for multiple error messages in messed up source editor #5823

Merged
merged 7 commits into from
Jan 10, 2020

Conversation

calixtus
Copy link
Member

@calixtus calixtus commented Jan 10, 2020

Fixes #5820

JabRef created a new instance of CodeArea everytime an entry was selected and bound multiple listeners to the CodeArea and to the ValidationStatus in bindToEntry. Refactored it a little bit, so the CodeArea stays persistent and the error messages are only displayed once.

Did some minor refactorings to the other Validators and to modules.info too, to avoid warning messages from the IDE, and fixed a minor mistake from a previous PR in dark.css.

No screenshot, as there is no visual change.

@Siedlerchr
Copy link
Member

Thanks for the fix. I don't know exactly what , but I remember we had issues with the code area when going up and down in the main table with an open entry editor. And also when importing?. I know that there was a reason why it was created new every time.
Maybe @tobiasdiez remembers

Copy link
Member

@tobiasdiez tobiasdiez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot remember why the code area is re-created every time and I don't see any reason not to reuse it. I guess we simply took the original swing code, replaced the controls with javafx ones and didn't thought about reusing it. Let's try it and see if users report any problematic behavior.

The looks good to me. I've two small remarks/questions.

@calixtus
Copy link
Member Author

This should do the trick now. Apparently JavaFX fires the focus event after loading the next entry and registering a listener does not mean, it is also run.

What I don't understand is the failing GUI test. It fails somehow during setting the test up trying to call getSourceString with an empty BibEntry.
It does not fail with a real entry open in JabRef, but only with the test. Should I modify the test?

@tobiasdiez
Copy link
Member

tobiasdiez commented Jan 10, 2020

@calixtus calixtus added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Jan 10, 2020
@tobiasdiez tobiasdiez merged commit 5f2ffb2 into JabRef:master Jan 10, 2020
Siedlerchr added a commit that referenced this pull request Jan 10, 2020
* upstream/master:
  Fix for multiple error messages in messed up source editor (#5823)
  change to jdk 13
  Fix obsolete "
  Remove obsolete TOC
  Fix hostname
@koppor koppor removed the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Jan 15, 2020
@calixtus calixtus deleted the fix_messed_up branch January 15, 2020 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error when messing up bibtex
4 participants