Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Project location relative to the workspace
Project location relative to the workspace [message #553742] Wed, 18 August 2010 16:34 Go to next message
Aurélien Pupier is currently offline Aurélien PupierFriend
Messages: 637
Registered: July 2009
Location: Grenoble, FRANCE
Senior Member

Hi,

I would like to know if there is a way to have a project location relative to the workspace.

My use case:
I use the default workspace but I put projects in folder inside this default workspace.
eclipse/workspace/
            - folder 1
                  -project11
                  -project12
            - folder 2
                  -project21
                  -project22

And I want that it works after I move all the folder eclipse into another place.
Unfortunately for now, it tells me that the .project is missing.
In fact, in .metadata/.plugins/org.eclipse.core.resources/.project/proje ct11/.location , I notice that the location is absolute, and that it points to the old location.

IProjectDescription.setLocation indicates that
Quote:
The path must be either an absolute file system path, or a relative path whose first segment is the name of a defined workspace path variable


Is there a workspace path variable to indicate the currently used workspace?

Don't hesitate to ask clarification if the synthesis of my issue is not understandable.

Regards,


Aurélien Pupier - Red Hat
Senior Software Engineer in Fuse Tooling team
Re: Project location relative to the workspace [message #553761 is a reply to message #553742] Wed, 18 August 2010 17:45 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

The workspace is organized:
<workspace>/project1
<workspace>/project2

i.e. the folders contained in the workspace directory are (must be)
projects.

But you can used linked folders or different project locations to point
to projects outside the workspace. ex:

If I check out an existing source tree:
/opt/local/source/{project1|project2}

I can create a workspace in /opt/local/users/ws1. then create projects
that point to project1 or project2 in the file system.

You can also create linked folder within a project in your real
workspace that point to an external file location.

Do either of those 2 options help?

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: Project location relative to the workspace [message #553882 is a reply to message #553742] Thu, 19 August 2010 09:40 Go to previous message
Aurélien Pupier is currently offline Aurélien PupierFriend
Messages: 637
Registered: July 2009
Location: Grenoble, FRANCE
Senior Member

Thanks for your answer.

If I understand well, I'm using linked resource inside the workspace.
So when I move the workspace, the link point to theold location and so on don't find the project in the project.

Can I have linked resource relative to the workspace? It seems to me that it must be an absolute path.

BTW I have another idea. I can set a workspace variable on each startup to the workspace location. I don't see inconvenient to do that now so I will try that. (even if I would prefer to use areltive path to the workspace directly)

Regards,


Aurélien Pupier - Red Hat
Senior Software Engineer in Fuse Tooling team
Previous Topic:[Commands] locationURI and menubarPath
Next Topic:How to eliminate a plugin from the run configuration?
Goto Forum:
  


Current Time: Thu Apr 25 19:58:43 GMT 2024

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

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

Back to the top