5

I check out a java project to a folder. Someone told me that I shouldn't point the eclipse workspace to this directory. Is there a best practice for this? Should you use the svn checkout dir or a dedicated one? And why? Thanks!

vo1d
  • 2,723
  • 2
  • 20
  • 17

3 Answers3

4

The reason why you shouldn't point your workspace to your existing files is because you want to keep the actual source files separated from your workspace settings.

The workspace that you're using has nothing to do with the code that you're writing so it's generally advised to keep them separated.

JREN
  • 3,572
  • 3
  • 27
  • 45
3

You shouldn't point the workspace directly to the directory of the checked out code. Say you have your workspace located at C:\workspace, then I would check out the project in C:\workspace\project.

On the other hand, it doesn't really make a difference of you would check out your code to another location, say C:\projects. Anyway, I don't see any bad practice with either way to do it.

Magnilex
  • 11,584
  • 9
  • 62
  • 84
  • I think it's because eclipse also stores the preferences (Java Editor settings, code formatting settings, colors, fonts, key mappings, etc) in the workspace. Maybe it's then easier to commit projects to svn. – vo1d Jul 01 '13 at 10:41
  • Sure, eclipse stores meta information about your settings. Still, that doesn't conflict with having the code in a sub folder, right? – Magnilex Jul 01 '13 at 10:43
  • I think this is the "best" solution for me. So the .metadata is stored in C:\workspace and not in the svn project folder C:\workspace\project – vo1d Jul 01 '13 at 11:25
  • Cool. As I said, I see no bad practice in this. Metadata and projects are kept separated. – Magnilex Jul 01 '13 at 11:53
0

I have seen, read and thought of different ways of using workspaces (per project, per application (multi-asseted or not), per program language, per target (web-development, plugins,..), and so on) and I am still doubting what the best approach is.

Can anyway give an elaborate, but not a page long insight into this?

This involves a lot of sub-questions, so to speak, and I don't know all the specific sub-questions I should ask, because I am not sure I don't know all the aspects of eclipse (and workspaces), but I'll try to give an example of what I am looking for:

What for?
    What did eclipse development mean it to be used for?
    What do other/most people think?
    What do you think?
    ... ?
Why?
    Are there configuration conflicts vs. sharing merits?
    Any filespace reasons?
    Performance?
    ... ?

Oh, and I am speaking of the minimum use case for a developer that uses different languages and protocols, and NOT necessarily all of them in one project (E.g. php, javascript and xml for some projects, C# for others, java and SQL for still others, etc..)

So you can choose any directory which you think is safe to keep your work. The main idea is to keep your all projects together.

Hope it will help you.

Or refer Create a new workspace in Eclipse

Community
  • 1
  • 1
Saggy
  • 624
  • 8
  • 23