Moving SnippetCompletionItem to language/completion

Milian Wolff mail at milianw.de
Sun Sep 13 19:04:04 UTC 2009


Would it be OK to move the SnippetCompletionItem + the SelectionJumper to 
language/completion?

I'd like to reuse that code in PHP and I think others could leverage it as 
well. Especially the SelectionJumper should/could be used in quite a few more 
places.

Try it out, create a snippet and put this into it:

for ( int i = 0; i < $max$; ++i ) {
  $//code$
}

When you execute it, the following text will be inserted / completed:

for ( int i = 0; i < max; ++i ) {
  //code
}

max and //code have a colored background. max is preselected, typing will 
replace its contents. use Alt Left/Right for navigation. Esc will close the 
selection jumper.

I think nearly _every_ code completion item would benefit from the selection 
jumper:

function completion for example:
~~
void someFunc(type1 arg1, typ2 arg2);
// completion could e.g. lead to:
someFunc($type1 arg1$, $type2 arg2$)$$
~~

I'd appreciate reviews. Also I think it should be somehow made clearer that a 
selection jumper is running - ideas?
-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20090913/03089206/attachment.sig>


More information about the KDevelop-devel mailing list