-
-
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
Duplication when using entry editor #3352
Comments
This is neat and it was an overlook by the reviewers (including myself) who approved the PR #3333 from @tobiasdiez. What happens is that on moving to a new entry we call It should be an easy fix and maybe the right time to review if the communication flow does really what we intend. What I would suggest is:
Currently, this does not work correctly. Making changes that invalidate the entry will be silently ignored when you switch tabs or entries. |
The source tab with its dependencies on the other tabs is always a problem... It would be good if this got fixed before we release 4.1. Most of what you write seems reasonable, except for reflecting changes while a user is typing in the source tab. If we immediately store every character change (as was the case for some time during development between 3.8.2 and 4.0), then we really annoy all users who have autosave or a sync to a database enabled. I think it would be best if we store the contents every time the text area looses focus or the entry changes. |
@lenhard didn't you implement the CoarseChangeFilter which only fires, if one leaves the field? Can't we re-use that here? |
I understand. I was just talking from experience with IDEA development where of course not each newly typed character triggers a sync with the lexer and parser. They have a very clever way of deferring this so that the user has a fluid typing experience. Nevertheless, the reparse is almost immediately available so that code correctness and highlighting can kick in. There are additional flaws in the logic. One that I could identify is the following: Change something in the source editor and press |
I have implemented a quickfix for the problem described in the op's comment: #3360 The problem didn't come from the focus binding linked above, but from the binding that was triggered when an entry change happened. Essentially that binding is useless in the new structure, because the source tab gets the notification of an entry change via This gets rid of the critical issue of overriding the data of a different entry, but there are several other flaws still present in the source tab. Content in the source tab is not stored if you change it and save and quit or if you just move to a different entry. It is very easy to store the source for every character change, instead of binding to the focus property you just have to bind to the text property like this:
The update might not be a problem, because as @Siedlerchr said if the listeners use the |
All the remaining issues should be fixed now with #3366 |
This is 4.1dev Oct.25 on Linux x86_64 with java 1.8.0_152.
I also had a problem with changes done via the source editor not being saved. It may be related to
above. Will investigate further.
The text was updated successfully, but these errors were encountered: