[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kdevelop-devel
Subject:    Re: Improvement of autocompletion
From:       Silvère_LESTANG <silvere.lestang () gmail ! com>
Date:       2010-11-27 13:10:41
Message-ID: AANLkTikKfOF0b-Wes7aSSHw5TnwBm0xqyaezwFMYi9L1 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On 26 November 2010 16:10, David Nolden <zwabel@googlemail.com> wrote:

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

 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
* Make this popup still showing after writing the first parameter
* Transform this popup to show only the best-matching arguments argument
hint
* 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?)
* Change the style of this popup to make it lighter: remove the blue header,
see if something
else needs some change

Bye,
Silvère

[Attachment #5 (text/html)]

On 26 November 2010 16:10, David Nolden <span dir="ltr">&lt;<a \
href="mailto:zwabel@googlemail.com">zwabel@googlemail.com</a>&gt;</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 \
&lt;<a href="mailto:silvere.lestang@gmail.com">silvere.lestang@gmail.com</a>&gt;:<br> \
<div class="im">&gt;&gt;<br> &gt;&gt; The things you have to compare are only the \
upper completion box in<br> &gt;&gt; KDevelop<br>
&gt;&gt; with the box you see in Qt-Creator. The rest, below, is just normal code<br>
&gt;&gt; completion.<br>
&gt;<br>
&gt; In KDevelop, the above completion pop-up appears only when we press<br>
&gt; Ctrl+space, I think it will be better if it was always displayed. But then<br>
&gt; it&#39;s need<br>
&gt; to be smaller than the actual one if we want it to be more useful than<br>
&gt; disturbing<br>
&gt; for the users.<br>
&gt; I suggest that I implement firstly a tooltip like in Qt Creator, where you<br>
&gt; can select the parameters that you want with arrow down and up, and the<br>
&gt; actual parameters in bold. The actual pop-up would be still here if we press<br>
&gt; Ctrl+space.<br>
&gt; If you don&#39;t thinks its a good solution, I can make the actual pop-up<br>
&gt; display<br>
&gt; 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 &quot;show a tooltip instead&quot;.<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 &quot;Show more argument hints&quot; button. This is already nearly<br>
implemented. Here&#39;s how it could be easily achieved:<br>
- Add a &quot;bool isAutomaticCompletion&quot; argument to<br>
MoreArgumentHintsCompletionItem::resetMaxArgumentHints<br>
- In resetMaxArgumentHints, set the maximum number of argument hints<br>
to 1 if &quot;isAutomaticCompletion == true&quot;<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>
&gt;&gt;<br>
&gt;&gt; So, if we compare those two, what&#39;s the issue exactly? I&#39;d \
personally say:<br> &gt;&gt; The KDevelop solution is too crowded and it looks too \
similar to the rest<br> &gt;&gt; of<br>
&gt;&gt; the completion item, even though you cannot execute them.<br>
&gt;&gt;<br>
&gt;&gt; So indeed, we might want to improve this situation by changing the \
visuals<br> &gt;&gt; of<br>
&gt;&gt; the pure-informatic items in the group. The question is how, as far as I<br>
&gt;&gt; know<br>
&gt;&gt; the internals it will be quite some work... Afaik it&#39;s all in a model \
and<br> &gt;&gt; maybe the group-index of the information list could get some flag \
set that<br> &gt;&gt; makes it clear that it&#39;s pure-informatic.<br>
&gt;&gt;<br>
&gt;&gt; And of course the question is: What&#39;s better? The item should still \
be<br> &gt;&gt; expandable via the keyboard (so you can read documentation etc. pp.), \
just<br> &gt;&gt; like you do know. If we break the visual association, users might \
not know<br> &gt;&gt; they can do this...<br>
&gt;&gt;<br>
&gt; How do you expand and collapse item with the keyboard? Left and right arrows<br>
&gt; doesn&#39;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&#39;s called &quot;The Magic Modifier&quot; ;-)<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 &gt;&gt; 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>



-- 
KDevelop-devel mailing list
KDevelop-devel@kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic