Review Request: Allow language plugins to choose whether a file must be reparsed on whitespace changes or not
Sven Brauch
svenbrauch at gmx.de
Mon Apr 2 12:19:13 UTC 2012
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/104453/
-----------------------------------------------------------
(Updated April 2, 2012, 12:19 p.m.)
Review request for KDevelop.
Changes
-------
Extended version of the patch, as proposed. There's now an enum describing the exact type of whitespace change sensitivity. The default is Insensitive, which is the old behaviour; in addition there's IndentOnly, which will reparse only if the change is at the beginning of a line (i.e. all chars before the change in that line are space), and Sensitive, which will always reparse when the document is changed.
Description
-------
Python requires files to be re-parsed on whitespace changes, because the indentation is part of the language syntax. This patch adds a virtual function to ILanguageSupport which can be overwritten by language plugins if they require files to be re-parsed on whitespace changes. The default implementation returns false, so all existing plugins are unaffected.
Diffs (updated)
-----
language/backgroundparser/documentchangetracker.cpp 79e63a9
language/interfaces/ilanguagesupport.h b3cc9eb
language/interfaces/ilanguagesupport.cpp 94c1f72
Diff: http://git.reviewboard.kde.org/r/104453/diff/
Testing
-------
Seems to work okay.
Thanks,
Sven Brauch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20120402/786de2ef/attachment.html>
More information about the KDevelop-devel
mailing list