[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.newcomer] Re: Managing multiple branches with linked resources

"Bruce Edge" <bruce.edge@xxxxxxxxx> wrote in message
news:804f8d384a413bbeaa516afa301b6cbe$1@xxxxxxxxxxxxxxxxxx
> I need to work on different versions of projects.
>
> I don't want to redefine every project from scratch for each code
> branch, nor do I want to just copy the workspace/project dir and
> replace all the path strings to match a different branch's code.
>
> I want to define a project once, then use linked variables to point to
> which copy of it that I'm working on, eg: stable, beta, etc.
>
> I keep my code out of the eclipse workspace and use link resources to
> refer to code in the filesystem. The links are relative to workspace
> variables.
>
> I've defined project contents by extending base variables, but when I
> try to access these projects with a different base variable, it still
> resolves to the same source tree in the original branches directory.
>
> My thought was that I could define all projects in one workspace, then
> create other workspaces that linked to the original, but redefined the
> base variables.
>
> I have not managed to get eclipse to pick up the new base vars, it always
> resolves back to the original project's files.
>
> Does anyone have any tips on this?
>
Path variables are designed to do what you are asking for.  We use them and
they do resolve to different locations based on where the Path Variable
points, so you must be doing something different or missing something in how
you are using them.

You say that the links are relative to workspace variables.  Lets make sure
that you are using the correct feature.  Are the variables you are using
defined in the General->Workspace->Linked Resource preference page?  This is
where they should be defined and where you can change the location where
they point.  For example, if you want to point to the folder C:\MySource you
create a new path variable on the Linked Resource page.  Use the New
Variable dialog to define a new variable.  Give it a name (LinkLocation) and
use the Folder button to browse to C:\MySource.

To create a linked resource in a project, you select the project and use the
File->New->Folder menu to create a link to a folder.  You need to used the
Advanced button on the New Folder dialog to create the link.  Check Link to
folder in file system and click on the Variable button.  Select your defined
path variable and use extend to select a location relative to the variable.

You should now be able to change the base location of the path variable
using the Edit dialog on the Linked Resource page.  This will change where
the linked resources resolve.

If you are still having problems, check what the linked resource properties
shows.  Select the linked folder definition in the Package explorer.  Use
File->Properties to show the properties for the resource.  This will show
the Location which should include the path variable along with the Resolved
Location which is the actual file system location.


> Bruce
>