Review Request: Refactoring and bugfixing for the cpp code completion context + tests.

Olivier Jean de Gaalon olivier.jg at gmail.com
Wed Jan 12 23:30:10 UTC 2011



> On Jan. 12, 2011, 5:50 p.m., David Nolden wrote:
> > I agree on the comments from Milian. The changes to expressionAt are a bit hard to comprehend, please add some explanations for them.

OK, I'll add a comment, but basically given:

"if (int i > 0)" expressionAt will return everything from indice 0 to the '>', because it considers '>' to be a template bracket, and tries to find the other end. My changes basically just make sure that if it doesn't find it, it gives you an empty expression.
The problem with returning everything from 0 to '>' is that it's impossible to differentiate between the times that's correct (which are vanishingly few), and the times when it's just trying to annoy me.

I made the same changes to the '{' bracket and the '(' bracket matching just for consistency, but it actually shouldn't be done with the '(' bracket, thus the commented out part which I forgot to remove.


- Olivier Jean de


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/100367/#review856
-----------------------------------------------------------


On Jan. 12, 2011, 3:51 a.m., Olivier Jean de Gaalon wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/100367/
> -----------------------------------------------------------
> 
> (Updated Jan. 12, 2011, 3:51 a.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Summary
> -------
> 
> Refactoring and bugfixing for the cpp code completion context + tests.
> 
> 
> Diffs
> -----
> 
>   languages/cpp/codecompletion/context.h dd7416f 
>   languages/cpp/codecompletion/context.cpp 79e0bf3 
>   languages/cpp/codecompletion/helpers.cpp 125739a 
>   languages/cpp/codecompletion/item.cpp 5fea5fd 
>   languages/cpp/stringhelpers.cpp ace90e6 
>   languages/cpp/tests/test_cppcodecompletion.h f2e50b7 
>   languages/cpp/tests/test_cppcodecompletion.cpp 8218346 
> 
> Diff: http://git.reviewboard.kde.org/r/100367/diff
> 
> 
> Testing
> -------
> 
> About a week of use and writing tests.
> 
> 
> Thanks,
> 
> Olivier Jean de
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20110112/1be8d037/attachment.html>


More information about the KDevelop-devel mailing list