Improvement of autocompletion
David Nolden
zwabel at googlemail.com
Sat Nov 27 13:30:26 UTC 2010
2010/11/27 Silvère LESTANG <silvere.lestang at gmail.com>:
> So I can try do to :
> * Add an option in KDevelop Settings >> Language support to choose if we
> want to
> show always or not the auto completion popup for parameters
Yes that would be nice.
> * Make this popup still showing after writing the first parameter
This might be a bit tricky, because a new code-completion is started
for the next parameter, and the popups are coupled to the
code-completion. Also, the code-completion is only after some text was
typed, while the argument-hint should already be shown after the user
typed "functionname( ", so this needs some further work. I would first
fix the other issues, and then go for this thing in a second step.
I already experimented with this thing. The simplest solution would be
to invoke automatic code-completion after the user has typed "(" or
",", see CodeCompletionModel::shouldStartCompletion in
kdevelop/languages/cpp/codecompletion/model.cpp . The corresponding
code-line is already there, behind the @todo, but is commented out.
The problem is that it will also show the full completion-list, and
this can be annoying when you didn't yet type anything. We might need
to add an option in kate, to hide the completion-list in "automatic"
mode until something was actually typed (the completion-range is
non-empty).
> * Transform this popup to show only the best-matching arguments argument
> hint
Yep (I wrote how this can be done)
> * Add a button or/and a shortcut (arrow up and down?) in this popup to show
> the others hints
> (one in a time or all in the same time?)
I actually think this is not required. You should _only_ show the best
argument hint (also not the "... more argument hints available" item).
If the user wants more information, he can simply press CTRL+Space to
invoke the full code completion.
> * Change the style of this popup to make it lighter: remove the blue header,
> see if something
> else needs some change
Yes that would be nice.
Greetings, David
More information about the KDevelop-devel
mailing list