Code-Completion

Jens Dagerbo jens.dagerbo at swipnet.se
Mon May 1 23:58:02 UTC 2006


On Monday 01 May 2006 19:17, David Nolden wrote:
> Hi! I've worked a lot on it and now when I look at it, i've completely
> rewritten the vital parts of the cpp-code-completion. I've got it now
> working very well with templates, even STL. It isn't completely ready yet
> and still needs some polish.. 

Sounds very cool. Did you manage to acquire SVN access? 


> but there are two other thing's I'd like to 
> ask about.
> I've reactivated the type-display as prefix in the auto-completion-box(for
> some reason it was disabled), and I use to show the types completely
> template-processed. The problem is that it can really get a lot of text(so
> one can lose the overview), and that the there's a lot more to compute then
> until now(which takes especially long when the persistent repository is
> used).
>
> So first I'd like to know if it is somehow possible to specialize the
> popup-widget so I can vary the fonts to make the whole thing look nicer,
> similar to the way I did it with the class-view and navigator by just
> overriding the item-widget.. I couldn't find anything about that.

I haven't really used the CodeCompletionInterface myself, but since the 
completionbox is implemented in the editor plugin I doubt you will find a way 
to changes to it.


> Secondly I'd like to put the whole code-completion into another thread,
> since on a big project it even slowed down and shortly blocked the GUI
> without the new completion-system. Does anyone know how practicable that
> would be?

Perhaps it's my lacking imagination, but what would you do in the main thread 
while doing CC lookup in the work thread? Any additional typing would 
invalidate the running lookup and potentially cause a new one. The only thing 
I can think of that you might want is the ability to stop the CC work if it's 
taking too long - but this shouldn't happen. If code completion regularly 
takes more than a few seconds people will undoubtedly stop using it. What 
kind of computation times are we talking about?

Much as I hate to put in more options, if the template code completion ends up 
adding alot of time to CC lookup, perhaps we should make it optional. This is 
a bad idea in general, but since the usability of the feature will vary with 
the machine spec, I think it makes sense in this case.

// jens







More information about the KDevelop-devel mailing list