MovingRanges: Should we expand on edits? Should we invalidate on empty?

David Nolden zwabel at googlemail.com
Sat Nov 13 15:18:24 UTC 2010


a) Contra, because the highlighting also shows the current state of
the "code understanding", and the user might get a completely wrong
impression of what's going on if the ranges are always extended. For
example, you reference an existing variable "a", but you change it to
"ab". Now until the next parse has finished, the highlighting would
look like "ab" exists, even if there is no such declaration. Apart
from that, "ab" might also get a completely different highlighting, in
which case we would only add more UI flickering by intermediately
extending the highlighting of "a" to "ab".
b) Contra, because it would lead to strange bugs when code that
expects a sorted list of ranges suddenly encounteres 'invalid' ranges.
You discard information that might still be useful, namely the
position where the range has been. It would need additional logic
where we currently don't need any logic, thus I don't see an advantage
in doing this.

Greetings, David




More information about the KDevelop-devel mailing list