Review Request: Allow language plugins to choose whether a file must be reparsed on whitespace changes or not
Sven Brauch
svenbrauch at gmx.de
Wed Apr 4 14:49:22 UTC 2012
> On April 3, 2012, 1:49 p.m., Milian Wolff wrote:
> > language/backgroundparser/documentchangetracker.cpp, line 80
> > <http://git.reviewboard.kde.org/r/104453/diff/5/?file=55553#file55553line80>
> >
> > can either of this really happen?
lang = 0 seems to be possible, at least the docstring suggests this if I read it correctly:
> If it is called from a background thread, it can not
> be loaded, and thus zero will be returned.
(ilanguagecontroller.h:51)
And the language support... I don't know, but couldn't you imagine a plugin which does not provide a language support object? Don't know.
If the check for the language is unnecessary, then I can remove the whole thing... if it's not, it doesn't hurt to leave the other check in there, too imo.
- Sven
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/104453/#review12135
-----------------------------------------------------------
On April 3, 2012, 1:26 p.m., Sven Brauch wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/104453/
> -----------------------------------------------------------
>
> (Updated April 3, 2012, 1:26 p.m.)
>
>
> Review request for KDevelop.
>
>
> 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
> -----
>
> language/backgroundparser/documentchangetracker.h f4651a4
> 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/20120404/7efd89e4/attachment.html>
More information about the KDevelop-devel
mailing list