Review Request 112787: Completion filtering: Abbreviation expansion and "contains" filtering

Milian Wolff mail at milianw.de
Sat Oct 19 21:23:55 UTC 2013


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


nearly there :)


part/completion/katecompletionmodel.cpp
<http://git.reviewboard.kde.org/r/112787/#comment30651>

    put else if on same line



part/completion/katecompletionmodel.cpp
<http://git.reviewboard.kde.org/r/112787/#comment30654>

    rearrange conditional, the cheap bool check first



part/completion/katecompletionmodel.cpp
<http://git.reviewboard.kde.org/r/112787/#comment30653>

    instead, break after incrementing over typed.size().



part/completion/katecompletionmodel.cpp
<http://git.reviewboard.kde.org/r/112787/#comment30655>

    midRef



tests/completion_test.cpp
<http://git.reviewboard.kde.org/r/112787/#comment30656>

    some negative tests would be nice as well to ensure not too much is matched. but maybe thats overkill for now, if you cannot come up with any easy examples.


- Milian Wolff


On Oct. 18, 2013, 3:47 p.m., Sven Brauch wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/112787/
> -----------------------------------------------------------
> 
> (Updated Oct. 18, 2013, 3:47 p.m.)
> 
> 
> Review request for Kate and KDevelop.
> 
> 
> Repository: kate
> 
> 
> Description
> -------
> 
> (I'll put this up here for discussion, I think a bit more work is required before submission.)
> 
> This patch implements less restrictive rules for completion list filtering. Currently, an item is only displayed if it starts with the typed text. In addition to that, I'd like to allow:
> 
>  1) Abbreviation expansion; see first screnshot. This matches entries where the entered text matches the (beginning of) the camelCased or under_scored entry name's first letters.
> 
>  2) Match if the entry only contains the word. This probably needs a bit of thinking to not disrupt existing workflows. My current solution only uses this filter if the length of the entered text is 4 or more characters.
> 
> What do you think?
> 
> Do you think this should be configurable?
> 
> 
> Diffs
> -----
> 
>   part/completion/katecompletionmodel.h 088ac1988b0a591dc11466c4060d2c69196a544b 
>   part/completion/katecompletionmodel.cpp accd5e4adce12c7d2d4e7a69e4746d89d24bdf4a 
>   tests/codecompletiontestmodel.h c33a20004273149580659537dc1a7e5c6baec266 
>   tests/codecompletiontestmodel.cpp 5d77c0478ce3956b016a35ce9c5a7b54798e2b83 
>   tests/completion_test.h 0999fe144431677514876a2782c8acfddcdabe08 
>   tests/completion_test.cpp 5bc4d2c8b7cbd06c17888cecf12ba076b3ec7c3d 
> 
> Diff: http://git.reviewboard.kde.org/r/112787/diff/
> 
> 
> Testing
> -------
> 
> 
> File Attachments
> ----------------
> 
> abbreviation expansion
>   http://git.reviewboard.kde.org/media/uploaded/files/2013/09/17/matching.png
> "contains" matching (if length > 3)
>   http://git.reviewboard.kde.org/media/uploaded/files/2013/09/17/matching1.png
> 
> 
> Thanks,
> 
> Sven Brauch
> 
>

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


More information about the KDevelop-devel mailing list