Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Environment variable support in workspace files
Environment variable support in workspace files [message #880165] Fri, 01 June 2012 10:46 Go to next message
Daniel Frömmel is currently offline Daniel Frömmel
Messages: 5
Registered: June 2012
Junior Member
Hello everybody,

i hope this is the forum that fits my question.

My development team wants to start using Eclipse but there seems to be no support for environment variables in workspace configurations.

Here is an example to make my question more understandable:

- ProjectX stored at D:\Development\Common\Components
- Workspace with ProjectX stored at D:\ExampleWorkspace

The workspace stores the location of ProjectX in the file

.metadata\.plugins\org.eclipse.core.resources\.projects\ProjectX\.location

as

URI//file:/D:/Development/Common/Components

We do not want to deal with absolute paths because the workspace configuration needs to be portable across different machines. Therefore we want to use environment variables (like %DEVELOPMENT% which points to D:\Development).

Where can i find the Eclipse source code that implements the "URI parsing" so that i can apply a patch adding support for URIs like:

URI//file:/%DEVELOPMENT%/Common/Components

Thanks in advance for listening Smile
Re: Environment variable support in workspace files [message #880427 is a reply to message #880165] Fri, 01 June 2012 21:11 Go to previous messageGo to next message
David Wegener is currently offline David Wegener
Messages: 1334
Registered: July 2009
Senior Member
On 06/01/2012 09:46 AM, Daniel Frömmel wrote:
> Hello everybody,
>
> i hope this is the forum that fits my question.
> My development team wants to start using Eclipse but there seems to be
> no support for environment variables in workspace configurations.
> Here is an example to make my question more understandable:
>
> - ProjectX stored at D:\Development\Common\Components
> - Workspace with ProjectX stored at D:\ExampleWorkspace
>
> The workspace stores the location of ProjectX in the file
> metadata\.plugins\org.eclipse.core.resources\.projects\ProjectX\.location
>
> as
> URI//file:/D:/Development/Common/Components
>
> We do not want to deal with absolute paths because the workspace
> configuration needs to be portable across different machines. Therefore
> we want to use environment variables (like %DEVELOPMENT% which points to
> D:\Development).
> Where can i find the Eclipse source code that implements the "URI
> parsing" so that i can apply a patch adding support for URIs like:
>
> URI//file:/%DEVELOPMENT%/Common/Components
>
> Thanks in advance for listening :)
You don't want to move workspaces from workstation to workstation. You
want to share projects. Workspaces are not designed to be portable.
The project structure allows this by using Resource Variables.
Re: Environment variable support in workspace files [message #880504 is a reply to message #880427] Sat, 02 June 2012 02:36 Go to previous messageGo to next message
Daniel Frömmel is currently offline Daniel Frömmel
Messages: 5
Registered: June 2012
Junior Member
Hello David,

thanks for your reply.

Quote:
Workspaces are not designed to be portable.


Yep, i recognized this fact. That's why i want to change it. Also you are right that we want to share projects but we want to share in the sense of a "whole bunch" of projects belonging together _but_ aren't compiled into one project.

I don't really know what you are referring to when speaking of Resource Variables. Is there some documentation about that subject? Google won't guide me this time.

[Updated on: Sat, 02 June 2012 02:36]

Report message to a moderator

Re: Environment variable support in workspace files [message #881542 is a reply to message #880504] Mon, 04 June 2012 15:57 Go to previous messageGo to next message
David Wegener is currently offline David Wegener
Messages: 1334
Registered: July 2009
Senior Member
Look for Path Variables and Linked Resources in the Workbench Users Guide provided on the Help page. Depending on your SCM, I believe you can use Team Project Sets to define a group of projects that go together.
Re: Environment variable support in workspace files [message #881552 is a reply to message #881542] Mon, 04 June 2012 16:27 Go to previous message
Daniel Frömmel is currently offline Daniel Frömmel
Messages: 5
Registered: June 2012
Junior Member
Hi, thanks. I found the linked resources dialog already. It only works for projects, not for workspaces because the dialog is missing here.

I filed a bug report (as suggested by a member of the resource plugin) here:

http s : // bugs.eclipse.org/bugs/show_bug.cgi?id=381434

Perhaps you want to join the discussion...
Previous Topic:installed feature are not visible
Next Topic:Check project nature of closed projects
Goto Forum:
  


Current Time: Fri Jul 25 19:14:02 EDT 2014

Powered by FUDForum. Page generated in 0.05976 seconds