Refactoring support

David Nolden zwabel at
Wed Feb 27 00:55:28 UTC 2008

On Wednesday 27 February 2008 01:29:36 Robert Knight wrote:
> Hello,
> Something that was mentioned as a long-term goal for KDevelop, at
> Akademy I believe, was refactoring support for C++ and possibly other
> languages.  This is the one aspect of an environment like Eclipse/JDT
> which is I greatly miss when dealing with KDE code.  I couldn't find
> any further documentation on the wiki about it though so I'm not sure
> if it has been discussed in detail yet.  This is something I'd be
> interested in helping to implement.
> I have been looking at the C++ language support (the DUChain) in
> KDevelop 4 and it seems to be pretty good shape apart from the lack of
> persistence - which I don't think is a problem for at least getting
> the basics of a refactoring framework working.
> Any thoughts about how to proceed on this?
> Regards,
> Robert.

Hi! The underlying C++ support is in a that good shape, that refactoring 
support is just around the corner. However a lot of testing and small-bug 
fixing will be needed before it can actually be reliable. Today I've tried 
for the first time enabling use-building(that means recording all places 
where a declaration is used) globally while parsing kdevelop, and the 
memory-usage and parsing-speed was not much higher than without.

We could implement a refactoring user-interface right now with just a few 
hundreds lines of code, but before it can actually be useful we definitely 
need DUChain persistence, because the parsing is slow, and the duchain needs 
too much memory to hold the whole thing in memory for a big project.

However duchain persistence is not that easy, because at least the C++ support 
part consists of many additional components that need to work together 
seamlessly. It's a too big project for me to start because of my limited 
time, so I try reducing my efforts to fixing bugs.

Kris Wong has written a mail to me last weekend that he wants to start working 
on duchain persistence, however I don't know how far he's gotten.

Btw. what exactly do you expect a "refactoring framework" to do?

Greetings, David

More information about the KDevelop-devel mailing list