after reading these posts i did a little research on refactoring c++ code. i'm surprised that there are very few projects about it. anyway, let me share what i found.
cerp is a refactoring tool for eclipse/cdt. i don't know the development status, but it had a few releases and the latest is called 1.0.1
features:
CERP offers some refactorings for C++. these should'nt be too difficult to implement but they are already very useful.
* Declare Method -- method from .cpp to .h
* Extract Baseclass -- create abstract base class from existing class in new file
* Hide Method -- makes a method private
* Implement Method -- method from .h to .cpp
* Separate Class -- moves a class to an extra file
* Synchronize Method -- sync e.g. parameters of a function in header and source file
(german) homepage:
http://ifs.hsr.ch/374elsa seems to be a c++ parser that is worth a look:
http://www.cs.berkeley.edu/~smcpeak/elkhound/and the
harmonia project is very interesting. it provides lots of tools to analyse source code and applications that use this analysis. one application is programming with speech input for handicapped people. harmonia-mode can e.g. provide syntax highlighting of errors before compile time.
a few quotes from the page
http://harmonia.cs.berkeley.edu/harmonia/projects/shorthand/index.html :
shorthand project: The key idea behind this work is to use a combination of language awareness and contextual analysis to interpret the commands. The interface can then be made intuitive and natural. For example, inside a Java class, the input “p s v main ( s [ argv” would be taken to designate “public static void main ( String [] argv ) {}”.
codelink project: Studies have repeatedly shown that the majority of computer programs contain a lot duplicated source code. Existing research into this issue has assumed that the problem is in poor programming -- that programmers should abstract their code more extensively with functions and macros. However, we claim that the tools of abstraction (functions and macros) are the problem. They inadequately support the ergonomic and cognitive needs of programmers in real-life situations. We have developed a new editor-assisted alternative to functions and macros. This tool maintains a persistent editor-level "link" between similar regions of code in order to support high-level visualization, editing, and navigation. Our hypothesis is that this tool enables programmers to work faster and with fewer errors, and that in turn they are likely to use the tool in situations where they wouldn't use a traditional abstraction.