When one does a change in the editor, for example changing an identifier, the color of this identifier gets immediately invalidated, which means that its color is removed from the editor and the default text color is shown anymore. It takes some time until the compiler is jumping in and calculates the new color, which then can be displayed again.
The problem is that the new color is most of the time the same as the old one - renaming a method doesn't change the fact that it is a method. The invalidation and recolor process takes to long which makes the edited identifier ugly. The better behavior is to invalidate the color only in the background when a change happens but not updating the editor until a new color is calculated and is ready to be displayed.
The problem is that the new color is most of the time the same as the old one - renaming a method doesn't change the fact that it is a method. The invalidation and recolor process takes to long which makes the edited identifier ugly. The better behavior is to invalidate the color only in the background when a change happens but not updating the editor until a new color is calculated and is ready to be displayed.
Leave a comment
on 2014-03-04 13:54 *
By Mirco Dotta
Hi Simon, my suggestion is to put a breakpoint here and debug how the position invalidation logic works. If I'm not mistaken, at every keystroke the listener I linked before is called, and styled positions may get deleted, which I believe causes the editor to refresh, causing the problem described in this ticket.
However, fixing this may be tricky, as I believe you need to add an extra level of indirection, as you will want to keep track of invalidated positions and eventually flush the changes back in the document. Anyway, I think it's good to invest time on this, and I agree it is an annoying behaviour, just pointing out some of the challenges I see.
However, fixing this may be tricky, as I believe you need to add an extra level of indirection, as you will want to keep track of invalidated positions and eventually flush the changes back in the document. Anyway, I think it's good to invest time on this, and I agree it is an annoying behaviour, just pointing out some of the challenges I see.
on 2014-03-04 14:12 *
By Simon Schäfer
Thanks, that's a good starting point.
No file chosen
You have an empty file field. Please select or remove it.
Name | Size |
---|