34

Is there any way to configure or are there any 3rd party plug-ins available for Eclipse CDT (any version) that provide a rich set of refactorings? My refactoring menu only provides the following in Eclipse Indigo CDT:

  • Rename
  • Extract Constant
  • Extract Local Variable
  • Extract Function
  • Toggle Function Definition
  • Hide Method...

I am looking for something with the richness of either the Java refactorings:

http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.jdt.doc.user/concepts/concept-refactoring.htm

Or something like what DevExpress Refactor Pro offers:

http://www.devexpress.com/Products/Visual_Studio_Add-in/Refactoring/

Note that the DevExpress plug-in is not compatible with Eclipse. I am more than willing to pay for a good 3rd party plug-in (it just needs to support C++ in Eclipse).

ks1322
  • 33,961
  • 14
  • 109
  • 164
PatrickV
  • 2,057
  • 23
  • 30
  • 1
    Pickings look slim. See http://stackoverflow.com/questions/1388469/is-there-a-working-c-refactoring-tool – Ira Baxter Jul 26 '11 at 16:15
  • 2
    Thanks for the input Ira. I hadn't seen that post on SO, but it seems to contain the same information I'd found elsewhere. I guess I was hoping the landscape had changed in the last two years. Hoping - not expecting. I'm used to Visual Studio 2010 + CodeRush, this transition to Eclipse CDT is quite painful. – PatrickV Jul 26 '11 at 17:05

3 Answers3

3

Most of the refactoring features in Eclipse CDT are developed by people working and studying at the HSR Hochschule für Technik in Rapperswil Switzerland. There are students working on new refactorings and enhancements. After they had been reviewed they will be integrated into the official CDT.

For more information of the ongoing development get in contact with the leader of this projects Peter Sommerlad at the IFS.

Beside from this projects I think there is no other plugin/extension on the CDT platform.

Michael Klenk
  • 3,202
  • 2
  • 19
  • 19
  • 1
    Thanks for that link surffan. I believe those refactorings are all included in my Eclipse/CDT distribution. They are nice when they work, but when our codebase grew to a large size most of them stopped working. We are just left with Rename being functional, and even it fails sometimes. – PatrickV Jan 13 '12 at 16:26
1

I miss the additional features, too, but I guess, they are currently not available as eclipse plugins: at least I did not found any, except for announcements. C++ is hard to parse.

Olha Puzhay
  • 370
  • 2
  • 9
  • 4
    While it is true that C++ is relatively hard to parse, that isn't the problem; there are parsers out there that do this just fine (including ours). What is hard is doing the analysis of the code to determine how a refactoring should be accomplished, whether it is legal, and actually transforming the code. One of my team has spent the last 6 months get "rename" to work correctly in the face of all the kinds of renames one can do, and the conflicts that can result (especially shadowing a previously visible name). Its the refactoring itself and the supporting machinery which is tough. – Ira Baxter Jan 11 '12 at 12:05
-2

Is there any way to configure or are there any 3rd party plug-ins available for Eclipse CDT (any version) that provide a rich set of refactorings?

Sure, it's possible. For example: http://www.eclipse.org/articles/article.php?file=Article-Unleashing-the-Power-of-Refactoring/index.html

As far as finding exactly what you're looking for (either commercial or open source software) - and finding it for Eclipse (as opposed to simply purchasing a different IDE) - well, that's "iffy". For example, I make heavy use of Embarcadero Delphi at work. It's refactoring capabilities run RINGS around Visual Studio. Visual Studio, in turn, is far better than the default Eclipse. But hey - I use "vi" and a makefile whenever possible, so it's no big deal.

Suggestion: Try an eval version of a major vendor's C++ compiler, and see where it takes you. Two suggestions:

paulsm4
  • 114,292
  • 17
  • 138
  • 190
  • 5
    I appreciate the time you took to answer this, but the answer does not address the question. The article you linked is about re-factoring capabilities available in Eclipse for Java, not Eclipse CDT. Switching development environments is not an option for business reasons (the customer has invested heavily in plug-ins for eclipse and getting better re-factoring capability is not a good enough reason to lose those investments). – PatrickV Sep 09 '11 at 00:38