aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes What is an eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "What is an eclipse "workspace"" Watch "What is an eclipse "workspace"" New topic
Author

What is an eclipse "workspace"

Joshua White
Ranch Hand

Joined: Jun 04, 2001
Posts: 97
Forgive my ignorance, I am an IDEA user, checking out eclipse for the first time.

When eclipse starts, it asks about a "workspace". What exactly is a workspace? Are you supposed to put your code in the workspace or is it only for eclipse configuration/project files? Should you have one workspace per project? Should the work space be?

Regards,

Joshua
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

Good question Joshua, I too get confused by the terminology that Eclipse uses to relate to directories, projects, and "perspective"

A perspective is a work area of a type. For instance if you are programming in Java, then there is a Java perspective. This is because eclipse is not just a Java IDE, it is an IDE for many languages and others, so each has their own perspective.

Then there are views. Like a picture into part of a project. I think.

And there is a Project, which means a project.

So I would say a workspace is the directory or directories that store your "source" files, or all your files, because they might be more than just source code.

I hope I am right.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

In IDEA, you can store your source anywhere you want, and someplace, you have a project file for each project. That project file specifies where the source is. When you open a project file you get a JFrame. If you have more than one project open, you get more than one JFrame.

In Eclipse, you have to store your source in a project directory, which in turn is a subdirectory of a workspace directory. A workspace is nothing more than a collection of projects. You can have more than one workspace, but you have to launch a new copy of Eclipse to use a different workspace.

Now, both of these are simplifications to some degree; with some effort, you can make each IDE act more similar to the other. But that's the fundamental difference: Eclipse wants you to put your sources into a project directory inside a workspace, and IDEA really has no similar concept.


[Jess in Action][AskingGoodQuestions]
Bharat Ruparel
Ranch Hand

Joined: Jul 30, 2003
Posts: 493
Actually, it might be little bit of overgeneralization. By default, Eclipse wants to keep the source files under the workspace/project directories. In reality however, and in a shared development environment using a source-code control system such as ClearCase, Eclipse very nicely allows you to store your files externally using linked folders. The eclipse help system does a good job of explaining this.


SCJP,SCJD,SCWCD,SCBCD,SCDJWS,SCEA
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

Originally posted by Bharat Ruparel:
Actually, it might be little bit of overgeneralization.


Ummmm... Yeah. Isn't that what I said?
Eric Clayberg
author
Ranch Hand

Joined: Sep 24, 2004
Posts: 63
Originally posted by Ernest Friedman-Hill:
In Eclipse, you have to store your source in a project directory, which in turn is a subdirectory of a workspace directory.

Actually, your project directories can be anywhere. They don't need to be contained within your workspace. The workspace is merely the default location for any new projects you create (although you can choose to create them anywhere including outside of your workspace).


Eric Clayberg
Software Engineering Manager
Google
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Cool! That's what I am finding for... The exact definition and nature of workspace and project, while I can't find such things in JBuilder...

Thanks a lot to Dr.Ernest and Mark for the great explanations...


Co-author of SCMAD Exam Guide, Author of JMADPlus
SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

Originally posted by Eric Clayberg:

Actually, your project directories can be anywhere. They don't need to be contained within your workspace. The workspace is merely the default location for any new projects you create (although you can choose to create them anywhere including outside of your workspace).


Yes they can. We have many developers here using Eclipse, and we use clearcase, so our sources are either a dynamic view (mapped drive) or a snapshot, which is stored in c:\viewstore.

They are using Eclipse, because they are waiting for the red-tape to buy the licenses for IDEA Although some might still stay with Eclipse.

Mark
[ November 09, 2004: Message edited by: Mark Spritzler ]
Bharat Ruparel
Ranch Hand

Joined: Jul 30, 2003
Posts: 493
Hello Mark,
It seems like we have similar set-ups, please look at the following topic started by me:
http://www.coderanch.com/t/103360/vc/Eclipse-Formatting
Have you run into any "Eclipse" v/s other tools formatting issues?
Thanks.
Bharat
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
The Eclipse workspace is also where all your settings are saved. For example, if you have projects which need different formatter settings, it might be a good idea to put them into different workspaces. (Eclipse 3 also has a "File/Switch workspace..." command.)


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
basha khan
Ranch Hand

Joined: Jan 26, 2002
Posts: 516
Originally posted by Eric Clayberg:

Actually, your project directories can be anywhere. They don't need to be contained within your workspace. The workspace is merely the default location for any new projects you create (although you can choose to create them anywhere including outside of your workspace).


Can u describe how?.

for the given case,

I have my project in d:/project/myproject

And i created my eclipse workspace in c:/settings/my documents/workspace

I know that i can use my project folder only without moving my source to c:/settings/my documents/workspace. But how? .anybody knows?.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16142
    
  21

Hopefully, the answer is overhere. I didn't realize the topic had been discussed in-depth in this thread.
[ October 06, 2005: Message edited by: Tim Holloway ]

Customer surveys are for companies who didn't pay proper attention to begin with.
Mr. C Lamont Gilbert
Ranch Hand

Joined: Oct 05, 2001
Posts: 1170

Workspace is where all your personal stuff for eclipse is kept. Every single thing you store that is a part of eclipse goes into your workspace. Anything eclipse changes will be changed in the workspace. The rest of eclipse can be run from a CDROM.

Your list of projects is stored in your workspace. But you can tell eclipse that your project files are actually somewhere else. That pointer to the new location for the named project will be in the workspace.

So you can have a workspace of your personal eclipse stuff and one of your work stuff, or whatever.


I keep some of my projects on a flash drive. But the compile folder for each of those projects tends to be on the harddrive so as not to burn out my flash drive.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: What is an eclipse "workspace"