First Commercial C++ Development Refactoring Tool
swrittenb writes "According to their recent press release, SlickEdit Inc. announced Visual SlickEdit® v9, the first commercially available development tool with C++ refactoring. Although this area has been studied, and non-commercial refactoring tools for C++ exist, how comfortable are people using an automated solution for refactoring with this particular language?"
http://www.refactoring.com/tools.html
Creative Demolition
Eclipse http://www.eclipse.org does something akin to what you describe. I am not sure if it will work for anything except java. Check it out.
IBM's VisualAge C++ has been around for a long, time. All the VisualAge products include powerful refactoring tools.
Description reads as:
I just took a look at the specs and found the "refactoring"-features:
- Rename
- Extract Method
- Encapsulate Field
- Convert Local to Field
- Convert Global to Field Instance
- Convert Static Method to Instance Method
- Move Static Field
- Move Method
- Replace Literal with Constant
- Create Standard Methods
It does not seem overly complicated to me, to implement these.
Most of the features are simple search and replace operations. Just add some knowledge the compiler would have to the editor and it becomes quite easy to do.
Just plain and simply marketing fuzz...
Keep open minded - but not that open your brain falls out...
> How comfortable are people using an automated
> solution for refactoring
It is not possible to automate (as in "without any human intervention") refactoring because it requires understanding how the entire project works. Any tools you create may help, but they do not obviate the need for thinking and redesigning, the two tasks the computer is incapable of doing.
From Refactoring.com
What is Refactoring?
Refactoring is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior. Its heart is a series of small behavior preserving transformations. Each transformation (called a 'refactoring') does little, but a sequence of transformations can produce a significant restructuring. Since each refactoring is small, it's less likely to go wrong. The system is also kept fully working after each small refactoring, reducing the chances that a system can get seriously broken during the restructuring.
...
So not really...
http://efil.blogspot.com/
I can't speak for C++, but in the Java world most of these checks are built into the IDEs. Eclipse needs to compile the source to show most errors (which it does every time you save a file). It's a bit of a pain in my opinion. I've gotten used to IntelliJ IDEA, which parses the file with every keystroke. I assume it doesn't do this from scratch each time, since it's still very responsive. It also keeps some sort of index in memory so it can quickly show bindings to other source code (this method is an implementation of this interface, for example). The markup for these links are updated with every keystroke without pegging the CPU.
That said, I doubt this is as feasible with C++. Java IDEs can use type information to provide these messages without any assumptions. Managed C++ may have access to these features, but I haven't played with that to know what type info is available.