Feature: string filtering for code completion [Patch attached]

Eduardo Robles Elvira edulix at gmail.com
Thu Jul 15 10:58:06 UTC 2010


On Thu, Jul 15, 2010 at 12:39 PM, Milian Wolff <mail at milianw.de> wrote:
> Wow, I'm surprised that the patch is so small. Pretty cool.
>
> How slow exactly is it, do you notice it?
>
> And another point in favor of using a special shortcut for it, is that your
> code would "fail" (as percieved by the user) in cases where you have a
> member/method starting  with a string, that you actually want to find a
> function for that takes it as a argument or something like that. I mean e.g.:
>
> struct foo {
>  String stringVal();
>  void append(String);
> };
>
> foo.string => only stringVal() is returned.

The patch above shows that it can be easily done and it works, but
it's far from perfect as you say. It should show first the matches of
type StartsWithMatch, and currently that is not being done. I think
the best way to fix this is to create a new group: the same as we have
"Best Matches" group, we could have a "Other Matches" group (maybe
someone can come up with a better name?" for this new kind of matches.
That is going to need more than 10 lines though but I'll try to do it.

Regards,
   Eduardo RE.




More information about the KDevelop-devel mailing list