Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Relative Paths in creating Projects
Relative Paths in creating Projects [message #193452] Thu, 12 February 2004 12:49 Go to next message
Eclipse UserFriend
Originally posted by: rmccammon.mccammoninc.com

Greetings All,

I want to make the directory of a project relative to a base directory
so several people using different OS’s can share the project. I defined
a path variable, WS_DIR, to mean “P:\Projects\Delego” in Preferences >
Workbench > Linked Resources with the intention of changing the value to
“/opt/Projects” when the project moves to a UNIX environment.

When creating the project, I use WS_DIR as the path variable in the
directory field. All seems well at this point. If I type simply WS_DI,
Eclipse complains about an unknown path variable with the message: ”
WS_DI is not a valid location. The location is relative to undefined
workspace path variable "WS_DI".” Since the workspace is a subdirectory
of the base directory defined by WS_DIR, then the message
“P:/Projects/Delego and p:/Projects/Delego/workspace overlap.” is
displayed by Eclipse after the entire variable is typed and until more
characters are entered. The entire entry is “WS_DIR\Java\CH”

After saving the project, I look at the properties of the project and
under the Info page, the location of the project is listed as
“C:\eclipse\WS_DIR\Java\CH”. No substitution for WS_DIR actually took
place and instead the installation path for eclipse is added.

I tried various combinations to get the path variable to expand such as

${WS_DIR:\Java\CH}
${WS_DIR\Java\CH}
$WS_DIR\Java\CH
WS_DIR:\Java\CH

Always Eclipse wants to add the installation path and does not expand
the path variable. I even tried substituting “/” for “\”.

Any direction someone can provide me to get the path variable to stick
in the directory name is appreciated and expand as needed is appreciated.

Best regards,

Richard
Re: Relative Paths in creating Projects [message #193568 is a reply to message #193452] Thu, 12 February 2004 16:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: smesh.openrules.com

I'd set WS_DIR to the workspace directory and use "eclipse -data
%WS_DIR%" (in Wintel:).

'VFS' is not worked-out in Eclipse 2.1.X...

Sam Mesh - http://openrules.com
Life is very short, and there's no time,
For coding and testing, my friend.
Re: Relative Paths in creating Projects [message #193893 is a reply to message #193568] Fri, 13 February 2004 07:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rmccammon.mccammoninc.com

Thank you for the suggestion. Unfortunately, this worked to a degree.
It did not completely solve the problem. This solution allows me to
startup the correct workspace using relative file paths which is part of
the issue. The path name for the project remains
P:\Projects\Delego\Java\CH. I tried refactoring using %WS_DIR%\Java\CH.
Eclipse told me %WS_DIR% is an undefined workspace path variable.

If I could just figure out how to set and use a workspace path variable,
I think I would at least move forward a step.

Forgot to mention, I am using Eclipse Platform Version: 3.0.0
Build id: 200312182000

Thanks again,

Richard

Sam Mesh wrote:

> I'd set WS_DIR to the workspace directory and use "eclipse -data
> %WS_DIR%" (in Wintel:).
>
> 'VFS' is not worked-out in Eclipse 2.1.X...
>
> Sam Mesh - http://openrules.com
> Life is very short, and there's no time,
> For coding and testing, my friend.
Re: Relative Paths in creating Projects [message #194303 is a reply to message #193893] Fri, 13 February 2004 17:56 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: smesh.openrules.com

Sam Mesh - http://openrules.com
Life is very short, and there's no time,
For coding and testing, my friend.

Richard,

I mean the following:

On Wintel:
set WS_DIR=P:\Projects\Delego\Java\
eclipse -data %WS_DIR%
Re: Relative Paths in creating Projects [message #200367 is a reply to message #193452] Mon, 23 February 2004 19:03 Go to previous message
Eclipse UserFriend
Originally posted by: John_Arthorne.oti.com_

Path variables were only designed to work for linked resources. It turns
out they worked for project locations at one time, but this wasn't
intentional. See the following feature request:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=49600
--

Richard wrote:
> Greetings All,
>
> I want to make the directory of a project relative to a base directory
> so several people using different OS’s can share the project. I defined
> a path variable, WS_DIR, to mean “P:\Projects\Delego” in Preferences >
> Workbench > Linked Resources with the intention of changing the value to
> “/opt/Projects” when the project moves to a UNIX environment.
>
> When creating the project, I use WS_DIR as the path variable in the
> directory field. All seems well at this point. If I type simply WS_DI,
> Eclipse complains about an unknown path variable with the message: ”
> WS_DI is not a valid location. The location is relative to undefined
> workspace path variable "WS_DI".” Since the workspace is a subdirectory
> of the base directory defined by WS_DIR, then the message
> “P:/Projects/Delego and p:/Projects/Delego/workspace overlap.” is
> displayed by Eclipse after the entire variable is typed and until more
> characters are entered. The entire entry is “WS_DIR\Java\CH”
>
> After saving the project, I look at the properties of the project and
> under the Info page, the location of the project is listed as
> “C:\eclipse\WS_DIR\Java\CH”. No substitution for WS_DIR actually took
> place and instead the installation path for eclipse is added.
>
> I tried various combinations to get the path variable to expand such as
>
> ${WS_DIR:\Java\CH}
> ${WS_DIR\Java\CH}
> $WS_DIR\Java\CH
> WS_DIR:\Java\CH
>
> Always Eclipse wants to add the installation path and does not expand
> the path variable. I even tried substituting “/” for “\”.
>
> Any direction someone can provide me to get the path variable to stick
> in the directory name is appreciated and expand as needed is appreciated.
>
> Best regards,
>
> Richard
>
Previous Topic:Apparent deadlock on WorkspaceLock
Next Topic:Editors & Views in different Eclipse workbench windows - are the separate?
Goto Forum:
  


Current Time: Thu May 08 15:38:38 EDT 2025

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

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

Back to the top