Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Refactoring C++ in Eclipse CDT

I've installed the Galileo release (Eclipse 3.5/CDT 5.1) in hopes of utilizing the better refactoring support mentioned in

What is the state of C++ refactor support in Eclipse?

However I do not see all the mentioned refactoring options listed. I don't see any plug-ins related to refactoring on

http://download.eclipse.org/tools/cdt/releases/galileo

Attempts to add the plugin directly from the refactoring site fails http://ifs.hsr.ch/cdtrefactoring/updatesite/ due to outdated dependencies, so I'm assuming the newest release should have the latest refactoring abilities.

Am I correct in this?

How do others refactor in Eclipse CDT? Do people use other tools/plugins?

like image 762
phillipwei Avatar asked Jul 28 '09 14:07

phillipwei


People also ask

Does Eclipse support refactoring?

In particular, EMF Refactor supports metrics reporting, smell detection, and refactoring for models being based on the Eclipse Modeling Framework, a widely used open source technology in model-based software development.

What is CDT in C?

The C/C++ Development Toolkit (CDT) is a set of Eclipse plug-ins that provide C and C++ extensions to the Eclipse workbench. For more information about Eclipse, see Workbench User Guide > Concepts > Workbench. The CDT provides a C/C++ IDE that simplifies many of the same tools that you can use from the command line.

What is refactoring in Eclipse?

On refactoring.com, we read that “refactoring is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior.”

What is code refactoring in C++?

The idea behind code refactoring is to make improvements to existing code without changing what it does. Essentially, the design and overall readability are enhanced, whereas functionality remains intact. The benefits of code refactoring are improved efficiency, readability, maintainability, and extensibility.


1 Answers

You should install CDT 6.0. However, my guess is that the options mentioned in the question you linked are not yet ready for mainline.

My CDT offers Rename, Extract Variable/Constant/Function, Hide Method.

From those, I only use Rename regularly, the others do not yet seem finished.

One of the problems with such tools for C++ is that the language is way more complex than other languages (think templates, macros etc.) so implementing such a tool needs tremendously more effort than for, say, Java.

like image 102
Tobias Avatar answered Sep 28 '22 05:09

Tobias