Skip to main content


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 UserFriend
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 FusierFriend
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 UserFriend
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 FusierFriend
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 UserFriend
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 FusierFriend
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 messageGo to next message
Eclipse UserFriend
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
Re: changing a project's location w/o moving it [message #1713056 is a reply to message #102463] Fri, 30 October 2015 12:46 Go to previous messageGo to next message
Srimukhee sri is currently offline Srimukhee sriFriend
Messages: 4
Registered: July 2015
Junior Member
Can someone please tell how to get the path of a Project file thats outside the workspace?
I have been trying different solutions but am unable to get an answer.
Re: changing a project's location w/o moving it [message #1713062 is a reply to message #1713056] Fri, 30 October 2015 13:56 Go to previous message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 10/30/2015 06:46 AM, Srimukhee sri wrote:
> Can someone please tell how to get the path of a Project file thats
> outside the workspace?
> I have been trying different solutions but am unable to get an answer.


What happens when you right-click on the project or a file in the
project and choose Properties?
Previous Topic:How to set connection timeout with Jetty 9.2.10?
Next Topic:CDT Installation problem on Luna - "cannot perform operation"
Goto Forum:
  


Current Time: Fri Mar 29 14:56:31 GMT 2024

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

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

Back to the top