C/C++ Experimental Refactoring - plugin detail

Experimental C/C++ Refactoring Support.

NetBeans Plugin - C/C++ Experimental Refactoring
Plugin owner: vv159170
Website: http://wiki.netbeans.org/CndRefactoring
Added: 2007-11-07
License: CDDL-GPLv2-no-CP
Category: Programming Languages
Downloaded: 9,269 times
 4.44, by 9 users

Plugin Log Show log

Versions available

Download plugin   Download size: 0.08 MB   Last Update: 2008-03-28

What's new in this version

Verifications for NetBeans versions

Plugin is not subject to any verification


Experimental C/C++ Refactoring Support.
Now it provides:
- instant rename of local variables in functions (Ctrl-R)
- global Rename (Ctrl-R)
- Find Usages (Alt-F7)

Note: without 100% guarantee on accuracy; use Refactoring Preview when possible

[ You have to be logged in to be able to comment. ]

User Comments


A reparsing symbols command is needed!

There has been a lot of progress in the code analysis engine in Netbeans, specially for the c++ side. The class browser and the code navigator work pretty fine. But sometimes the code navigator could get confused. Incremental code analysis stops working correctly sometimes when a large portion of the source is modified or refactored. However this issue is very common in every c++ IDE too, after all nothing is perfect.

The fact is that most IDEs have a command for clearing the symbols database and reparsing the entire source files on a project.

This feature is missing in Netbeans, but there is a workaround. I have to delete the /vars folder which is located into the netbeans settings folder (in my system is located at "~/.netbeans/dev" path ).

Implementing this new feature shouldn't be complicated, just removing the symbols database files.
Posted by superoptimo on Jul 19, 2009

Eclipse is moving faster...

Take a loon on this: http://wiki.eclipse.org/CDT/User/NewIn50#Refactoring .
Looks like there isn't a similar interest in the Netbeans team, bad...
Posted by flowolf on Jun 19, 2008

Very Good Feature!

The lack of the ability to find usages is the main reason I use Eclipse over Netbeans for C/C++ development. If you can get it working and get it to work faster (Eclipse's reference finding works almost instantaneously), then I would more than likely switch over. Keep up the good work!
Posted by sreque on Apr 28, 2008

Keep this way

I would really like to see some more efforts like this for the C/C++ environment...
Posted by flowolf on Mar 09, 2008

Re: 6.1

Hello, Joao Paulo,
yes. I meant, that all functionality of this plug-in will be built-in in NetBeans 6.1 (I'm one of C/C++ support developers). May be instant rename and rename will be disabled in release (because of not 100% accurate) . In this case I will write plug-in for 6.1 to enable them as "experimental" features :-)
Posted by vv159170 on Mar 07, 2008


Hey Vladimir, it's good to know that you've fixed this problem! But when you say "no plans to update 6.0 version of plug-in, try 6.1 trunk daily builds", do you mean that C/C++ refactoring will be already built-in on NetBeans 6.1? Because I can't see any update on this page...

Thanks, Joao Paulo.
Posted by joaopna on Mar 03, 2008

re: Subclass rename

Hi, joaopna,
Thanks for feedback. I just recently have fixed it in 6.1. But sorry, no plans to update 6.0 version of plug-in, try 6.1 trunk daily builds.
Posted by vv159170 on Feb 28, 2008

Subclass rename

Really nice plugin, very usefull! However, there's one thing I'd like to see on it: method renaming correctly. It's not working properly when I have subclasses. For example, if I have a class called Object, and it has a method called GetName, if I create a subclass from Object called Car and overide the method GetName, I can't use refactor to rename both methods. Do you think it can be implemented? If you could share the sources, I'd like learn and help developing this feature.
Posted by joaopna on Feb 20, 2008

Inner classes and find usages


please look at the case of "inner". I have a case of class defined inside the other class. The methods of inner class are used in the outer class. For most of them 0 usages were reported whereas it was not true....

Posted by nzero2002 on Jan 30, 2008

re: Inner classes and find usages

Hi, thanks for feedback. Could you, please, file IZ against cnd with simplest testcase? Thanks!
Posted by vv159170 on Jan 30, 2008

Thanks a lot

the feature is very nice and works well for me. I am using it constantly during the work and it helps a lot.
I am looking forward for other refactoring capabilities. Thanks!
Posted by nzero2002 on Jan 30, 2008


Posted by geertjan on Nov 07, 2007