On 26 November 2010 16:10, David Nolden <span dir="ltr"><<a href="mailto:zwabel@googlemail.com">zwabel@googlemail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
2010/11/26 Silvère LESTANG <<a href="mailto:silvere.lestang@gmail.com">silvere.lestang@gmail.com</a>>:<br>
<div class="im">>><br>
>> The things you have to compare are only the upper completion box in<br>
>> KDevelop<br>
>> with the box you see in Qt-Creator. The rest, below, is just normal code<br>
>> completion.<br>
><br>
> In KDevelop, the above completion pop-up appears only when we press<br>
> Ctrl+space, I think it will be better if it was always displayed. But then<br>
> it's need<br>
> to be smaller than the actual one if we want it to be more useful than<br>
> disturbing<br>
> for the users.<br>
> I suggest that I implement firstly a tooltip like in Qt Creator, where you<br>
> can select the parameters that you want with arrow down and up, and the<br>
> actual parameters in bold. The actual pop-up would be still here if we press<br>
> Ctrl+space.<br>
> If you don't thinks its a good solution, I can make the actual pop-up<br>
> display<br>
> all the time, and then modify it to display only useful information.<br>
<br>
</div>Showing the argument-hints always would be easy, however it was simply<br>
too heavy for that until now. The problem is that this all is<br>
implemented in kate, and connected to KDevelop through an interface,<br>
so you cannot simply "show a tooltip instead".<br>
<br>
However I agree that it would be nice if we had a very simply popup<br>
above in autocempletion mode, but it should look similar to the<br>
argument-hints in normal code completion for consistency. We show<br>
information which Qt-Creator does not show or even know (how well the<br>
parameters match for example), and this should stay that way.<br>
<br>
I think it would be ideal if we would only show the best-matching<br>
argument hint (similar to what Qt-Creator does), and eventually a<br>
selectable "Show more argument hints" button. This is already nearly<br>
implemented. Here's how it could be easily achieved:<br>
- Add a "bool isAutomaticCompletion" argument to<br>
MoreArgumentHintsCompletionItem::resetMaxArgumentHints<br>
- In resetMaxArgumentHints, set the maximum number of argument hints<br>
to 1 if "isAutomaticCompletion == true"<br>
<br>
The only remaining issues would be some styling issues that have to be<br>
solved in kate (see kdelibs/kate/completion/kateargumenthinttree.h).<br>
You could style the list in a way so that it looks more like a<br>
tooltip, and make sure that the blue header is not displayed somehow.<br>
<div class="im"><br>
>><br>
>> So, if we compare those two, what's the issue exactly? I'd personally say:<br>
>> The KDevelop solution is too crowded and it looks too similar to the rest<br>
>> of<br>
>> the completion item, even though you cannot execute them.<br>
>><br>
>> So indeed, we might want to improve this situation by changing the visuals<br>
>> of<br>
>> the pure-informatic items in the group. The question is how, as far as I<br>
>> know<br>
>> the internals it will be quite some work... Afaik it's all in a model and<br>
>> maybe the group-index of the information list could get some flag set that<br>
>> makes it clear that it's pure-informatic.<br>
>><br>
>> And of course the question is: What's better? The item should still be<br>
>> expandable via the keyboard (so you can read documentation etc. pp.), just<br>
>> like you do know. If we break the visual association, users might not know<br>
>> they can do this...<br>
>><br>
> How do you expand and collapse item with the keyboard? Left and right arrows<br>
> doesn't work, they make the cursor move.<br>
<br>
</div>Try the ALT key (short press for toggling, long press for peeking into<br>
the documentation, ALT+direction for navigation, ALT+enter to execute<br>
something). This works everywhere in the IDE (in the editor window,<br>
quickopen, etc.), it's called "The Magic Modifier" ;-)<br>
<br>
Greetings, David<font color="#888888"><br></font></blockquote><div><br> So I can try do to :<br>* Add an option in KDevelop Settings >> Language support to choose if we want to<br>show always or not the auto completion popup for parameters<br>
* Make this popup still showing after writing the first parameter<br>* Transform this popup to show only the best-matching arguments argument hint<br>* Add a button or/and a shortcut (arrow up and down?)  in this popup to show the others hints<br>
(one in a time or all in the same time?)<br>* Change the style of this popup to make it lighter: remove the blue header, see if something<br>else needs some change<br><br>Bye,<br>Silvère<br></div></div><br>