Separate source and project files? [message #1566550] |
Thu, 15 January 2015 18:18  |
Eclipse User |
|
|
|
I want to create a new project in Eclipse where I can access the code files from one location but Eclipse's project files (.buildpath, .project, and .settings) are in their own folder rather than in the code folder (which is versioned with SVN) or my home folder (the parent of the code folder), but it doesn't seem possible when I try to create a new project.
If I select "Create new project in workspace", the Project Layout section lets me select "Use project as source folder" and "Create separate folders for source files and public resources", but if I select "Create project at existing location (from existing source)" in the Contents area, the Project Layout section grays out.
I'm used to NetBeans letting me put source and project files in separate folders (even though it breaks versioning from the editor), it at least didn't make me put things on ignore lists (which I can't do in my current project) or add things that can get caught up in versioning (which I do from elsewhere).
Is there some way to create an Eclipse project and have the default folder be the source files while the project files are elsewhere? I'm in Eclipse PDT.
|
|
|
Re: Separate source and project files? [message #1567570 is a reply to message #1566550] |
Fri, 16 January 2015 07:41   |
Eclipse User |
|
|
|
Dave,
Probably you can't do that. Things like .project and .settings must be
in the root (project) folder.
On 16/01/2015 12:18 AM, Dave H wrote:
> I want to create a new project in Eclipse where I can access the code
> files from one location but Eclipse's project files (.buildpath,
> .project, and .settings) are in their own folder rather than in the
> code folder (which is versioned with SVN) or my home folder (the
> parent of the code folder), but it doesn't seem possible when I try to
> create a new project.
>
> If I select "Create new project in workspace", the Project Layout
> section lets me select "Use project as source folder" and "Create
> separate folders for source files and public resources", but if I
> select "Create project at existing location (from existing source)" in
> the Contents area, the Project Layout section grays out.
>
> I'm used to NetBeans letting me put source and project files in
> separate folders (even though it breaks versioning from the editor),
> it at least didn't make me put things on ignore lists (which I can't
> do in my current project) or add things that can get caught up in
> versioning (which I do from elsewhere).
>
> Is there some way to create an Eclipse project and have the default
> folder be the source files while the project files are elsewhere? I'm
> in Eclipse PDT.
|
|
|
|
Re: Separate source and project files? [message #1567920 is a reply to message #1567570] |
Fri, 16 January 2015 11:59  |
Eclipse User |
|
|
|
I have 2 points, one that is general advice, the second is a direct attempt to answer your question.
First, it's generally recommended to check in Eclipse's .project and other config files with the project content. They are designed to be shared, with the benefit that the project setup/configuration only has to be done once and any workspace that checks out the project automatically gets the correct configuration. Some people object to IDE-specific files in a code repository, but that's a "legacy" concern from times when tools did a poor job of encapsulating and isolating their files and they caused trouble for other users. But Eclipse's config files are specifically designed to be shared this way, they don't impact anyone who doesn't use Eclipse.
In more direct response to your question: a project can have links to external files and folders, which you might be able to use; create your Eclipse project (and it's config files) in one place, then link the rest of the content folders. See http://help.eclipse.org/luna/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Freference%2Fref-14b.htm for more details.
|
|
|
Powered by
FUDForum. Page generated in 0.10454 seconds