Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Separate source and project files?
Separate source and project files? [message #1566550] Thu, 15 January 2015 23:18 Go to next message
Dave H is currently offline Dave HFriend
Messages: 24
Registered: January 2015
Junior Member
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 12:41 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
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.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Separate source and project files? [message #1567909 is a reply to message #1567570] Fri, 16 January 2015 16:55 Go to previous messageGo to next message
Dave H is currently offline Dave HFriend
Messages: 24
Registered: January 2015
Junior Member
Why must they when NetBeans allows their project files to be separate from source? It appears Eclipse can do it (especially since it appears that option is available if I use the workspace) but I feel like I'm just not seeing the right configuration.
Re: Separate source and project files? [message #1567920 is a reply to message #1567570] Fri, 16 January 2015 16:59 Go to previous message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
Registered: July 2009
Senior Member
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.
Previous Topic:PTP path to SDM executable not saved :(
Next Topic:Installing SVN in OMNeT++
Goto Forum:
  


Current Time: Thu Mar 28 15:36:26 GMT 2024

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

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

Back to the top