Custom range for CodeCompletion

David Nolden zwabel at googlemail.com
Mon Nov 24 11:22:29 UTC 2008


Hi! Good work, really. I was a bit worried about performance, but that 
shouldn't be a problem with your implementation. There's just one thing I 
don't understand: How to actually modify the completion-range or allowed text 
regexp, they're both const &  :-)

Also I cannot see where modifyCompletionRange is emitted. It would be useful 
if it was emitted after every single change to the completion-range, for 
example by typing. Then it could be used to dynamically insert new items into 
the completion-list(This is needed in C++ support), and other plugins like 
word-completion could use it to correctly manage the set of inserted items.

So the function should probably look like this:
modifyCompletionRange(KTextEditor::Range& completionWord, QRegExp& 
allowedText)

I'm also a bit worried about regressions, since this touched quite fragile 
code. So it needs thorough testing.

Greetings, David




More information about the KDevelop-devel mailing list