Renaming a project

I've looked in IDEA's help pages, and searched this forum... it looks like there isn't anyway to rename an IDEA project. You can rename modules within a project but not the project itself. But I'd like to be able to do just that.

I tried renaming the project files themselves and all directories in IDEA's system folder that had the project's name, but that was a big mistake. When I told IDEA to reopen the project, pointing it to the newly renamed project files, a blank project was opened... all info regarding local history, etc. etc. was lost.

Can anyone confirm that there's no way to rename a project?

If there isn't, I'll make a feature request...

Thanks.

4 comments
Comment actions Permalink

2 ways:
1. rename the .ipr and .iml file, then search .ipr file for the old xxx.iml and replace it with the new yyy.iml. it is a xml file and easy to deal with

2. create a new project using the project wizard, if u did not have a lot of customization on the old project, point the source fold to your old dir, while giving the project a new name.

0
Comment actions Permalink

tc master,

Thanks for your reply.

I don't think your 2 ways work for my purposes, though I'm not entirely sure...

I should mention that one thing I really don't want to lose with the project name-change is the sort of IDEA specific project data that usually persists from one project session to the next, like local editing history, Run/Debug configurations, etc. That stuff is a big deal to me. So let me start with your 2nd way:

re 2: This way you'd have a brand new project with the same source packages, etc. but none of that IDEA data that persists from one session to the next.

re 1: When I tried doing it, what I did should have been pretty much what you suggested here as your first way... The only difference is that I had already used IDEA's rename/refactoring to rename the module with the relevant new name before I tried changing the project names. So I assume (could be wrong here) that the .ipr file had the new module name already. Then I altered the name of the .ipr and .iws filenames. Result: I opened the project andsurprisinglynone of the IDEA persisted data was retained!

Have you used approach 1. and found that the IDEA persisted data is still available when you re-open the newly named .ipr file?

0
Comment actions Permalink

Mark Aronszajn wrote:

I should mention that one thing I really don't want to lose with the project name-change is the sort of IDEA specific project data that usually persists from one project session to the next, like local editing history, Run/Debug configurations, etc. That stuff is a big deal to me. So let me start with your 2nd way:


I believe Run/Debug configurations are stored in the .iws, but local
history is stored in the IDEA system directory and is keyed off project
name. So renaming the project file will lose your local history I think.
Everything else should be retained however.

What you might try doing is to rename the project, load it up in IDEA
and then see what directory is created for it in IDEA's system\vcs
directory (something like "myproject_ipr.23f946a2"). Close IDEA, and
replace that new directory's contents with the contents of the old
project's directory from system\vcs. Restart IDEA and load up the
project and theoretically you should have local history. There may be
multiple directories with your old project's name if you've loaded
different copies from different directories (e.g. multiple checked out
CVS branches of a project).

This is an awful hack and I disclaim any responsibility for any damage
done to your computer, software or source code.

Really, you should file a JIRA issue requesting this feature,
specifically mentioning the continuation of local history, etc.

Ciao,
Gordon

--
Gordon Tyler (Software Developer)
Quest Software <http://www.quest.com/>
260 King Street East, Toronto, Ontario M5A 4L5, Canada
Voice: (416) 933-5046 | Fax: (416) 933-5001

0
Comment actions Permalink

Gordon Tyler wrote:

Really, you should file a JIRA issue requesting this feature,
specifically mentioning the continuation of local history, etc.

>

There is one already:

"FEATURE: rename project"
http://www.jetbrains.net/jira/browse/IDEABKL-656



Alain

0

Please sign in to leave a comment.