Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » changing a project's location w/o moving it
changing a project's location w/o moving it [message #101844] Wed, 14 September 2005 23:20 Go to next message
Eclipse User
Originally posted by: brettREMOVE.rockREMOVEnut.com

howdy,

i need to change my project to point to a different location

i tried editing the .location file (binary) and, as expected, eclipse does
not like this

using the "move" option, moves the files (which i do not want to do)

i know this is kinda screwy

i searched the posts and did not find anything

tia,
brett

ps. bonus question: anybody know whey this file is binary? i'd expect
xml for everything.
Re: changing a project's location w/o moving it [message #101897 is a reply to message #101844] Thu, 15 September 2005 11:17 Go to previous messageGo to next message
Frederic Fusier is currently offline Frederic Fusier
Messages: 147
Registered: July 2009
Senior Member
You should not be surprised that eclipse does not like that you change
..location file. This is an ***internal**** file in ***internal*** .metadata
directory structure!
This also explains why this file is not a user-friendly readable format...

By the way, I'm not sure to understand what you need exactly...
Can you provide more details on what do you want to do exactly (project
name and location before and after the move)?

brett wrote:
> howdy,
>
> i need to change my project to point to a different location
>
> i tried editing the .location file (binary) and, as expected, eclipse
> does not like this
>
> using the "move" option, moves the files (which i do not want to do)
>
> i know this is kinda screwy
>
> i searched the posts and did not find anything
>
> tia,
> brett
>
> ps. bonus question: anybody know whey this file is binary? i'd expect
> xml for everything.
>
>
>
Re: changing a project's location w/o moving it [message #102107 is a reply to message #101897] Thu, 15 September 2005 14:51 Go to previous messageGo to next message
Eclipse User
Originally posted by: brettREMOVE.rockREMOVEnut.com

what i want to do is copy my workspace and my build directories to have a
new working copy of the code (this is to "seed" a workspace for work on a
code branch)

setting up a workspace at my company is kinda a pain - our SCM plugins are
painful - thought i'd try this before i spend hours doing it the "right"
way

i can search/replace the path in all but the .location file

what i want to do is modify a project's location (and i don't want to do
it by moving the files via the "move" popup command)

thanks,
brett
Re: changing a project's location w/o moving it [message #102132 is a reply to message #102107] Thu, 15 September 2005 15:00 Go to previous messageGo to next message
Frederic Fusier is currently offline Frederic Fusier
Messages: 147
Registered: July 2009
Senior Member
Then, just copy your workspace and open a new eclipse session on
this copied workspace. There's no need to change projects locations
in this new workspace as all resources pathes are relative to workspace
location...

Copy workspaces is something I do very often and never get any problem
since 3.0 with this action...

brett wrote:
>
> what i want to do is copy my workspace and my build directories to have
> a new working copy of the code (this is to "seed" a workspace for work
> on a code branch)
>
> setting up a workspace at my company is kinda a pain - our SCM plugins
> are painful - thought i'd try this before i spend hours doing it the
> "right" way
>
> i can search/replace the path in all but the .location file
>
> what i want to do is modify a project's location (and i don't want to
> do it by moving the files via the "move" popup command)
>
> thanks,
> brett
>
>
>
Re: changing a project's location w/o moving it [message #102249 is a reply to message #102132] Thu, 15 September 2005 18:30 Go to previous messageGo to next message
Eclipse User
Originally posted by: brettREMOVE.rockREMOVEnut.com

my source is outside my workspace - this might be the difference between
our environments - maybe this is unusual maybe this is why i couldn't find
posts on this topic

anyway, since there doesn't seem to be an "official" way to do this...

for future readers...

open .location w/ hex editor - edit the path - update the 2 bytes before
the path string to be the new length of the path

so far this seems to be working

if i don't post a reply to this you know i haven't had any issues w/ it

thanks,
brett
Re: changing a project's location w/o moving it [message #102396 is a reply to message #102249] Fri, 16 September 2005 06:18 Go to previous messageGo to next message
Frederic Fusier is currently offline Frederic Fusier
Messages: 147
Registered: July 2009
Senior Member
OK, I can figure out your configuration now.

Here's a proper way to change a project location after you have
copied its directory using file system:
1) Start eclipse session on your workspace
1) Delete project from your workspace
BE CAREFUL: in "Confirme Project Delete" dialog verify that
"Do not delete contents" button is selected
(this is the default behavior, but just to be sure...)
3) Import the copied project (ie. at new location) in your workspace
4) That's it!

It's a little bit longer but definitely better than modifying .location
file!

Furthermore, you can copy your worskpace so you can go back to your old
sources in your old worskpace as often as you want...

Another point, if you copy your source only to make new branches, why
don't you use CVS? Then, you do no longer need to do that as CVS allow
you to create as many branches as you want...

brett wrote:
> my source is outside my workspace - this might be the difference between
> our environments - maybe this is unusual maybe this is why i couldn't
> find posts on this topic
>
> anyway, since there doesn't seem to be an "official" way to do this...
>
> for future readers...
>
> open .location w/ hex editor - edit the path - update the 2 bytes before
> the path string to be the new length of the path
>
> so far this seems to be working
>
> if i don't post a reply to this you know i haven't had any issues w/ it
>
> thanks,
> brett
>
>
Re: changing a project's location w/o moving it [message #102463 is a reply to message #102249] Fri, 16 September 2005 14:26 Go to previous message
Eclipse User
Originally posted by: eclipse3.rizzoweb.com

brett wrote:
> my source is outside my workspace - this might be the difference between
> our environments - maybe this is unusual maybe this is why i couldn't
> find posts on this topic
>
> anyway, since there doesn't seem to be an "official" way to do this...
>
> for future readers...
>
> open .location w/ hex editor - edit the path - update the 2 bytes before
> the path string to be the new length of the path
>
> so far this seems to be working

NO!
For future readers this it DEFINITELY NOT what you want to do. As
someone earlier in the thread pointed out, the .location file is an
internal piece of metadata that is not intended to be user-modifiable.

Moving projects and workspaces around is not that difficult if you take
the time to really understand how Eclipse manages them and expects you
to manage them.
There is always a better way, just ask (and give enough detail so others
can help).

Eric
Previous Topic:How do I get rid of this dialog?
Next Topic:global search
Goto Forum:
  


Current Time: Thu Oct 23 22:02:05 GMT 2014

Powered by FUDForum. Page generated in 0.02573 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software