Request for feedback on Signature Assistant

Andreas Pakulat apaku at
Mon Nov 1 07:55:01 UTC 2010

On 01.11.10 09:01:34, Olivier JG wrote:
> On 10/31/2010 07:26 PM, David Nolden wrote:
> >IMO the signature-assistant has one big conceptual problem: It always
> >rewrites the whole function declaration line. Since in C++ there is
> >many redundant ways how to write type-names, this will always cause
> >problems.
> >
> >I think the right way to work would be remembering a sequence of
> >edits, like for example:
> >- Replace 1st argument with ...
> >- Remove 3rd argument
> >- Remove 4th argument
> >
> >And then replaying those changes on the other side. That way, we would
> >overwrite only those parts that were actually changed, and we might
> >also solve matching-problems in places where the argument-declaration
> >names don't match properly etc.
> This is precisely what I want to do, but the problem is accurate
> tracking, since I'm unable to get the ranges for the decls' types
> (and the const, but I'd settle for types).
> What happens, then, is a race against the clock: If the user can
> manage to change (add/remove/rename/retype) more than one parameter
> before the parse finishes, all bets are off on tracking.
> It seems the best I can do without the ability to get the return
> type range, is to simply not offer anything unless there's only one
> change per parse.
> Of course, even if I could get the ranges and therefore not have to
> wait for the parse, the user could, ie, remove two arguments at
> once, and I wouldn't be able to safely offer anything, but that's an
> acceptable compromise, I think (and likely one I could account for
> with a little extra work).
> As I see it, either I get those type ranges, or I have two options:
> 1. Cripple the sig assistant, but allow it to rename uses
> 2. Leave the sig assistant as is, unable to rename uses

I hope I'm totally misunderstanding something but is this really an
assistant to automatically adjust uses of a function/parameters when I
change the parameters? IMHO thats problematic as a human should verify
that those changes are really correct and the easiest way for that is to
get compile errors for each ocassion. Of course a simple rename of the
parameter is unproblematic, but it can also be done through a separate
dialog (would be nicer if this was inline like in eclipse). But changing
type or even adding/removing stuff shouldn't be followed by automated
changes elsewhere or in the function.

Of course I might just lacking context to fully understand what you're
talking about. In that case just ignore me :)


Time to be aggressive.  Go after a tattooed Virgo.

More information about the KDevelop-devel mailing list