0

First of all, this is a workaround for dumbest eclipse problem that a project path is hard-coded inside .project So, I would like to know if I can make a workaround using svn. Are there some magic keywords in that .project file so that they would be replaced by path to which the project or the file is being checked out?

basically, in my svn that .project file has some paths like this: E:/work/gaming/Android/Components/src

I would like to replace with something like

$$PATH$$/gaming/Android/Components/src

so that if svn was checkout into c:\dev then that location would be fixed at

c:/dev/gaming/Android/Components/src

Community
  • 1
  • 1
Pavel P
  • 15,789
  • 11
  • 79
  • 128

1 Answers1

0

Eclipse doesn't hard-code the project location into the .project file, you're clearly doing something wrong.

Did you try setting it to a relative path, or re-creating the project?

WhyNotHugo
  • 9,423
  • 6
  • 62
  • 70
  • Do you think that eclipse isn't that stupid to do such thing or you are sure about hardcoded paths? Even at the link posted people mention that there is no way, also for that reason there is [rclick]->Refactor->Move option to move project to different location. When I replace hardcoded paths inside .project into relative paths eclipse doesn't see the references to project files. So, it definetely needs hardcoded paths. – Pavel P Aug 12 '12 at 20:22
  • Not in my experience. Every time I've seen .projects, they had relative paths; I've even moven projects to different OSs and different locations with no issues (I've even just checked several of my proyects). There must me something funny going on with your eclipse. – WhyNotHugo Aug 12 '12 at 22:29
  • Not funny for me :) I used eclipse for a few years for android and all of them (including current 4.2) have this problem. I use it for android development. Try to check that link that I posted, there is another guy who wanted to avoid hardcoded paths the same as me. – Pavel P Aug 12 '12 at 23:04
  • obviously I didn't do anything with eclipse. – Pavel P Aug 12 '12 at 23:05