Issue: not complete refactoring

General questions regarding the usage of CodeLite
varnie
CodeLite Veteran
Posts: 64
Joined: Wed Jun 11, 2008 3:48 am
Contact:

Issue: not complete refactoring

Post by varnie »

hello, eranif!~

today i've tried renaming one of my C++ classes by invoking context menu on 'workspace view' tree and great was my wonder after i've seen CodeLite IDE didn't refactor my project making appropriate changes in "includes" sections. Therefore i've had to fix all these 'includes' became incorrect by hand, changing them from '#include classFoo.h' to '#include classBar.h'... not funny :-/

i wonder whether this issue could be fixed? :oops:
many thanks!
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Issue: not complete refactoring

Post by eranif »

Hi Varnie,

Can you explain the steps you took to perform the refactoring?

Eran
Make sure you have read the HOW TO POST thread
varnie
CodeLite Veteran
Posts: 64
Joined: Wed Jun 11, 2008 3:48 am
Contact:

Re: Issue: not complete refactoring

Post by varnie »

Okey..

i have a project with, say, 10 classes: classA.h, classB.h ... classX.h. they are present in the left panel "Workspace View", which allows me to easily navigate between them.

say, classes ClassA.h and classB.h use classX, and therefore they both have the following code in theirs declarations:

Code: Select all

#include "classX.h"
it is obvious and works well.

now i want to rename classX to, say, classFoo.
to achieve this, i click on "classX.h" in the tree on the left panel "workspace view", and click "Rename..." on it in popupped context menu. this action invokes modal dialog "Rename file:" where i enter "classFoo" in textfield instead of current "classX". now i have my classFoo and it looks fine in the tree.
*BUT* all these 2 declarations in classA and classB described above (#include "classX") DID NOT changed. now we have classFoo but our old good classA and classB are still include "classX", i.e.they are in incorrect state.

solution is pretty easy: change "include "classX.h" to "include "classFoo.h"" in classA.h and classB.h manually. but it is too boring.
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Issue: not complete refactoring

Post by eranif »

Ok, now I get it...

This was never planned to rename all declarations in the workspace - only the file name.

Please submit a FR for this.

Eran
Make sure you have read the HOW TO POST thread
varnie
CodeLite Veteran
Posts: 64
Joined: Wed Jun 11, 2008 3:48 am
Contact:

Re: Issue: not complete refactoring

Post by varnie »

here is my Feature Request.
Post Reply