Home » Newcomers » Newcomers » Refactoring (renaming) a project 
| Refactoring (renaming) a project [message #146820] | 
Tue, 04 April 2006 16:38   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: wojtek.a.com 
 
Our illustrious PHB decided that the project name was wrong. So I went  
through the I18N files and renamed as required. I changed the  
application configuration files. 
 
The final step was to rename the project within Ecplise. 
 
So. 
 
RMB on the project name (at the top of the tree), choose  
refacter/rename, typed in the new name. Update references was checked. 
 
After about 1 1/2 hours, I killed the java process (WinXP). This caused  
the RAM usage to climb to 5.1Gbytes (yes, that IS a G) before eclipse  
finally shut down (with a JVM death warning message). 
 
Restarted the computer as some phantom process was still holding over  
1.5Gbytes. 
 
Went to start Eclipse. Got a warning that the old project was not found.  
Fair enough. I shut down all the editors, then went to open the project. 
 
The old project name was in the project list. In the directory  
structure, in the workspace directory, the new project name is there. In  
its .project file, the new project name is there. 
 
Re-started Eclipse with -clean. Same problem. 
 
So: 
- why did this fail? 
- where does Eclipse store which projects are in the workspace, so I can  
rename the project, so Eclipse can "see" it (did a search, no joy) 
- barring all else, how do I recover from this? 
 
/ dead in the water :-(
 |  
 |  
  |   |  
| Re: Refactoring (renaming) a project [message #146849 is a reply to message #146825] | 
Wed, 05 April 2006 05:41    | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: hendrik_maryns.despammed.com 
 
-----BEGIN PGP SIGNED MESSAGE----- 
Hash: SHA1 
 
Wojtek schreef: 
> Wojtek wrote: 
>  
>> So: 
>> - why did this fail? 
>> - where does Eclipse store which projects are in the workspace, so I 
>> can rename the project, so Eclipse can "see" it (did a search, no joy) 
>> - barring all else, how do I recover from this? 
>  
> Ok, I imported the newly renamed project (pointed to the new name in the 
> same workspace), and all is well. Though I lost ALL of my history. 
 
Then wouldn?t it be wiser to (copy outside Eclipse and) delete the new 
project, and retry the renaming?  Could have been a red herring. 
 
> BUT, I still have the old project name showing. How do I delete it? 
 
What do you mean, that the old project is still there, or that the new 
project has the old name? 
 
H. 
- -- 
Hendrik Maryns 
 
================== 
www.lieverleven.be 
http://aouw.org 
-----BEGIN PGP SIGNATURE----- 
Version: GnuPG v1.4.2 (GNU/Linux) 
 
 iD8DBQFEM5DGe+7xMGD3itQRAtToAJ99XS3hCC2LaD0OslfBqmCv/LPwxwCe P0jV 
pr3uaRyfsCXm7dGSq0C86EY= 
=GIIl 
-----END PGP SIGNATURE-----
 |  
 |  
  |  
| Re: Refactoring (renaming) a project [message #146875 is a reply to message #146849] | 
Wed, 05 April 2006 10:02    | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: wojtek.a.com 
 
Hendrik Maryns wrote: 
> -----BEGIN PGP SIGNED MESSAGE----- 
> Hash: SHA1 
>  
> Wojtek schreef: 
>  
>>Wojtek wrote: 
>> 
>> 
>>>So: 
>>>- why did this fail? 
>>>- where does Eclipse store which projects are in the workspace, so I 
>>>can rename the project, so Eclipse can "see" it (did a search, no joy) 
>>>- barring all else, how do I recover from this? 
>> 
>>Ok, I imported the newly renamed project (pointed to the new name in the 
>>same workspace), and all is well. Though I lost ALL of my history. 
>  
> Then wouldn?t it be wiser to (copy outside Eclipse and) delete the new 
> project, and retry the renaming?  Could have been a red herring. 
 
After 1 1/2 hours? Why would it complete the second time if it did not  
complete the first time? 
 
>>BUT, I still have the old project name showing. How do I delete it? 
>  
>  
> What do you mean, that the old project is still there, or that the new 
> project has the old name? 
 
The original name is ProjectA. 
 
In Ecplise, when opening projects, the list of projects shows ProjectA. 
 
I renamed it to ProjectB. After a long time I killed the process. 
 
On the hard drive, the directory in the workspace shows ProjectB. 
 
In Ecplise the list of projects shows ProjectA. 
 
I imported ProjectB (from the workspace). 
 
The list of projects shows both ProjectA and ProjectB, even though  
ProjectA does not exist, and cannot (of course) be opened. 
 
So what do I edit to remove the reference to the non-existant ProjectA?
 |  
 |  
  |  
| Re: Refactoring (renaming) a project [message #146952 is a reply to message #146875] | 
Thu, 06 April 2006 06:20    | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: hendrik_maryns.despammed.com 
 
-----BEGIN PGP SIGNED MESSAGE----- 
Hash: SHA1 
 
Wojtek schreef: 
> Hendrik Maryns wrote: 
>> -----BEGIN PGP SIGNED MESSAGE----- 
>> Hash: SHA1 
>> 
>> Wojtek schreef: 
>> 
>>> Wojtek wrote: 
>>> 
>>> 
>>>> So: 
>>>> - why did this fail? 
>>>> - where does Eclipse store which projects are in the workspace, so I 
>>>> can rename the project, so Eclipse can "see" it (did a search, no joy) 
>>>> - barring all else, how do I recover from this? 
>>> 
>>> Ok, I imported the newly renamed project (pointed to the new name in the 
>>> same workspace), and all is well. Though I lost ALL of my history. 
>> 
>> Then wouldn?t it be wiser to (copy outside Eclipse and) delete the new 
>> project, and retry the renaming?  Could have been a red herring. 
>  
> After 1 1/2 hours? Why would it complete the second time if it did not 
> complete the first time? 
 
I do not know, but I suppose we both know that software does not always 
behave the same.  Far too many if statements around for that :-) 
 
>>> BUT, I still have the old project name showing. How do I delete it? 
>> 
>> 
>> What do you mean, that the old project is still there, or that the new 
>> project has the old name? 
>  
> The original name is ProjectA. 
>  
> In Ecplise, when opening projects, the list of projects shows ProjectA. 
>  
> I renamed it to ProjectB. After a long time I killed the process. 
 
You killed it in a non-friendly way?  Then I am not very surprised: 
Eclipse always needs some time at shutdown to write its configuration. 
If it didn?t get the chance, this might be one of the things that didn?t 
get written down properly. 
 
> On the hard drive, the directory in the workspace shows ProjectB. 
 
Indeed: the renaming occurred, but some xml properties file describing 
the projects in the workspace wasn?t updated. 
 
> In Ecplise the list of projects shows ProjectA. 
 
After restart, I suppose? 
 
> I imported ProjectB (from the workspace). 
>  
> The list of projects shows both ProjectA and ProjectB, even though 
> ProjectA does not exist, and cannot (of course) be opened. 
>  
> So what do I edit to remove the reference to the non-existant ProjectA? 
 
I would first make a backup of ProjectB (outside Eclipse), then try to 
delete ProjectA (inside Eclipse).  If that still doesn?t work, you can 
try to delete ProjectB (inside E) too, and look if it is possible to 
remove ProjectA now.  If ok, then re-import ProjectB from the backup. 
If this still didn?t work, look for the properties file in the .metadata 
directory which holds the list of projects, and, after backup of course, 
edit/remove it. (With Eclipse shut down). 
 
There are some more options, but try this out first. 
 
H. 
 
- -- 
Hendrik Maryns 
 
================== 
www.lieverleven.be 
http://aouw.org 
-----BEGIN PGP SIGNATURE----- 
Version: GnuPG v1.4.2 (GNU/Linux) 
 
 iD8DBQFENOtce+7xMGD3itQRAqxgAJ94Ybhl5SGjaL7uT26NdR6TNlREJQCd FxxH 
FqqfNSplRfuhsJf2sc/vXII= 
=4o9/ 
-----END PGP SIGNATURE-----
 |  
 |  
  |  
| Re: Refactoring (renaming) a project [message #146960 is a reply to message #146952] | 
Thu, 06 April 2006 10:51    | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: wojtek.a.com 
 
Hendrik Maryns wrote: 
>> After 1 1/2 hours? Why would it complete the second time if it did not 
>> complete the first time? 
>  
> I do not know, but I suppose we both know that software does not always 
> behave the same.  Far too many if statements around for that :-) 
>  
>> I renamed it to ProjectB. After a long time I killed the process. 
>  
> You killed it in a non-friendly way?  Then I am not very surprised: 
> Eclipse always needs some time at shutdown to write its configuration. 
> If it didn?t get the chance, this might be one of the things that didn?t 
> get written down properly. 
 
Yes I know :-) 
 
But there was no movement on the progress bar, the RAM usage was not  
changing, it was not using any CPU time, and I had finished lunch. 
 
It certainly appeared frozen. 
 
On a side note (just thought of it) I have a rather large history set  
(30+Mbytes). It may be that Eclipse was parsing the entire history set  
doing the rename. But, there was not visible activity. If any Eclipse  
devs are lurking, maybe you could add a detail button showing each file  
being processed? 
 
>> On the hard drive, the directory in the workspace shows ProjectB. 
>  
> Indeed: the renaming occurred, but some xml properties file describing 
> the projects in the workspace wasn?t updated. 
 
Which is my guess. Doing searches on the hard drive (Eclipse install  
directory tree and workspace directory tree) for files containing the  
old project name comes up empty. I also did a Registry search. 
 
>> So what do I edit to remove the reference to the non-existant ProjectA? 
>  
> I would first make a backup of ProjectB (outside Eclipse), then try to 
> delete ProjectA (inside Eclipse).  If that still doesn?t work, you can 
> try to delete ProjectB (inside E) too, and look if it is possible to 
> remove ProjectA now.  If ok, then re-import ProjectB from the backup. 
> If this still didn?t work, look for the properties file in the .metadata 
> directory which holds the list of projects, and, after backup of course, 
> edit/remove it. (With Eclipse shut down). 
 
Yes well, but how do I delete it? 
 
The usual path is to open the project, RMB on the name, the choose delete. 
 
I cannot open the project. Th error is that the old project name has an  
invalid .properties files. Which is correct as it does not exist any more.
 |  
 |  
  |  
| Re: Refactoring (renaming) a project [message #147076 is a reply to message #146825] | 
Thu, 06 April 2006 18:20    | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: eclipse3.rizzoweb.com 
 
Wojtek wrote: 
> Wojtek wrote: 
>  
>> So: 
>> - why did this fail? 
>> - where does Eclipse store which projects are in the workspace, so I  
>> can rename the project, so Eclipse can "see" it (did a search, no joy) 
>> - barring all else, how do I recover from this? 
>  
> Ok, I imported the newly renamed project (pointed to the new name in the  
> same workspace), and all is well. Though I lost ALL of my history. 
>  
> BUT, I still have the old project name showing. How do I delete it? 
 
A closed project can still be deleted. Right-click on it and choose Delete. 
Hopefully, that will work. If it gives you an error (it might because  
the project's directories/files don't exist any more), then you can shut  
down Eclipse and look in the  
..metadata\.plugins\org.eclipse.core.resources\.projects directory of  
your workspace to see if there is any residual junk related to the old  
project. 
 
Hope this helps, 
	Eric
 |  
 |  
  |  
| Re: Refactoring (renaming) a project [message #147176 is a reply to message #146960] | 
Fri, 07 April 2006 05:27    | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: hendrik_maryns.despammed.com 
 
-----BEGIN PGP SIGNED MESSAGE----- 
Hash: SHA1 
 
Wojtek schreef: 
> Hendrik Maryns wrote: 
>>> After 1 1/2 hours? Why would it complete the second time if it did not 
>>> complete the first time? 
>> 
>> I do not know, but I suppose we both know that software does not always 
>> behave the same.  Far too many if statements around for that :-) 
>> 
>>> I renamed it to ProjectB. After a long time I killed the process. 
>> 
>> You killed it in a non-friendly way?  Then I am not very surprised: 
>> Eclipse always needs some time at shutdown to write its configuration. 
>> If it didn?t get the chance, this might be one of the things that didn?t 
>> get written down properly. 
>  
> Yes I know :-) 
>  
> But there was no movement on the progress bar, the RAM usage was not 
> changing, it was not using any CPU time, and I had finished lunch. 
>  
> It certainly appeared frozen. 
 
It wasn?t meant accusatory, just an observation that could lead to the 
solution. 
 
> On a side note (just thought of it) I have a rather large history set 
> (30+Mbytes). It may be that Eclipse was parsing the entire history set 
> doing the rename. But, there was not visible activity. If any Eclipse 
> devs are lurking, maybe you could add a detail button showing each file 
> being processed? 
>  
>>> On the hard drive, the directory in the workspace shows ProjectB. 
>> 
>> Indeed: the renaming occurred, but some xml properties file describing 
>> the projects in the workspace wasn?t updated. 
>  
> Which is my guess. Doing searches on the hard drive (Eclipse install 
> directory tree and workspace directory tree) for files containing the 
> old project name comes up empty. I also did a Registry search. 
 
So there is no empty folder with the name ProjectA?  Otherwise, you 
could just delete it. 
 
What does ProjectB?s .project file say? 
 
>>> So what do I edit to remove the reference to the non-existant ProjectA? 
>> 
>> I would first make a backup of ProjectB (outside Eclipse), then try to 
>> delete ProjectA (inside Eclipse).  If that still doesn?t work, you can 
>> try to delete ProjectB (inside E) too, and look if it is possible to 
>> remove ProjectA now.  If ok, then re-import ProjectB from the backup. 
>> If this still didn?t work, look for the properties file in the .metadata 
>> directory which holds the list of projects, and, after backup of course, 
>> edit/remove it. (With Eclipse shut down). 
>  
> Yes well, but how do I delete it? 
>  
> The usual path is to open the project, RMB on the name, the choose delete. 
>  
> I cannot open the project. Th error is that the old project name has an 
> invalid .properties files. Which is correct as it does not exist any more. 
 
Then maybe you could create one.  Create an empty folder ProjectA in 
your workspace, copy ProjectB?s .project file into it, and change the 
necessary names.  Maybe then it will be possible to open the project and 
delete it? 
 
H. 
- -- 
Hendrik Maryns 
 
================== 
www.lieverleven.be 
http://aouw.org 
-----BEGIN PGP SIGNATURE----- 
Version: GnuPG v1.4.2 (GNU/Linux) 
 
 iD4DBQFENjCZe+7xMGD3itQRAjiYAJsFl7tgqM0lAMltkEcNV2secDir8QCX XSam 
9ObiLrLKJzD5hdZqLhsTaQ== 
=qyfX 
-----END PGP SIGNATURE-----
 |  
 |  
  |   |   |   |  
| Re: Refactoring (renaming) a project [message #147917 is a reply to message #147821] | 
Tue, 11 April 2006 10:04   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: wojtek.a.com 
 
David Wegener wrote: 
> Wojtek wrote: 
>> Eric Rizzo wrote: 
>>> Wojtek wrote: 
>>>> Wojtek wrote: 
>>>> BUT, I still have the old project name showing. How do I delete it? 
>>> 
>>> A closed project can still be deleted. Right-click on it and choose  
>>> Delete. 
>> 
>>  From which dialog? 
>> 
> snip 
>  
> The Navigator view in the Resource perspective will show projects that  
> are closed. 
 
Interesting. 
 
I closed the current project. 
 
I then RMB in the Package Explorer and clicked on Refresh. Got a warning  
message the the old project did not exist, did I want to delete the  
reference. Clicked on Yes, and now the old project is gone. 
 
I am still curious just where the reference was stored. 
 
Anyway, thanks for the help (both of you) :-)
 |  
 |  
  |   
Goto Forum:
 
 Current Time: Mon Nov 03 22:30:09 EST 2025 
 Powered by  FUDForum. Page generated in 0.33267 seconds  
 |