Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2006

Tip: Looking for answers? Try searching our database.

eclipse is confusing <project vs workspace>

Thread view: 
rogndeb@gmail.com - 06 Jul 2006 23:06 GMT
I'm a former Java programmer (1995,1996) but have been doing C++ in
between. Now going back to Java and using Eclipse (company standard).
It is an unusual IDE, the part that I'm tripping on is the project vs
workspace.

I created some code and works, saved it into a directory tree. I then
experimented with loading up sample workspaces, but no files show up in
the tree, nor can I build anything. Most other IDEs have a centralized
project file that you load/save which stores the build settings.
However I do not see such a thing in Eclipse. How do I make it reload
what I previously had? (If I browse back to the original folder, no
files show up)
Chris Smith - 06 Jul 2006 23:18 GMT
> I'm a former Java programmer (1995,1996) but have been doing C++ in
> between. Now going back to Java and using Eclipse (company standard).
[quoted text clipped - 8 lines]
> what I previously had? (If I browse back to the original folder, no
> files show up)

I'm unsure what you're saying.  In general, the workbench in Eclipse is
shared between multiple projects.  There is no "open" project in the
sense that there would be in other IDEs.  There is a workspace, but you
usually only have one of them (except when doing development of Eclipse
plugins, in which case you have a development workspace, and a runtime
workspace for testing).

If you modify preferences in the Window | Preferences... menu, that
affects the entire workspace.  Many preferences can be overridden on a
project-by-project basis, which you'd do by right-clicking the project,
and choosing Properties... from that menu.

If you're looking for something analogous to a workspace in a different
IDE, you might look at working sets.  They provide a way to groups
related projects together, so you can collapse the irrelevant projects
in the tree view and only see the projects that you are working with.

Signature

Chris Smith - Lead Software Developer / Technical Trainer
MindIQ Corporation

kiter - 06 Jul 2006 23:54 GMT
I have downloaded a bunch of sample projects written with Eclipse. I
can view the source code using notepad. I can see the folders for bin,
src, etc. However, when I use File.... Switch Workspace from the main
menu, then browse to any of these folders and click OK, Eclipse exits,
automatically starts a new instance, and leaves me with an empty IDE.
No files, nothing to build.

I did find I can go back into the history list and reload my own
original project, but I am not able to see any other projects.

The question is, how does Eclipse "know" that there is something to
load and build? Is there a specific file it looks for in the root or
what?
kiter - 07 Jul 2006 00:10 GMT
ok, so I figured this out, at least I think I did. The location of the
directory 'metadata' must be present to be considered the 'root' of a
workspace. So I need to look for that folder to 'know' I am at the root
of a given workspace.
kiter - 07 Jul 2006 00:13 GMT
OK, well that is wrong. Only *some* of the samples load up but I just
found others with that included the metadata folder that do not load
up. Clearly the software must have a placeholder somewhere that knows
which files belong to a workspace.
Jackie Lee - 07 Jul 2006 02:35 GMT
kiter

> OK, well that is wrong. Only *some* of the samples load up but I just
> found others with that included the metadata folder that do not load
> up. Clearly the software must have a placeholder somewhere that knows
> which files belong to a workspace.

You may try to import the projects that do not show up into the
workspace.
Oliver Wong - 06 Jul 2006 23:33 GMT
> I'm a former Java programmer (1995,1996) but have been doing C++ in
> between. Now going back to Java and using Eclipse (company standard).
[quoted text clipped - 8 lines]
> what I previously had? (If I browse back to the original folder, no
> files show up)

   I'm also having trouble understanding your question, so I'll just make
some declarative statements:

   The parent of a project is a workspace. So when you first start up
Eclipse, it'll ask you where your workspace is (unless you checked the box
that says "always use this workspace"). You might choose a directory like
"My Documents\Eclipse Workspace\". Now Eclipse is loaded, and you can create
some projects. Let's say you create a project called "Foo". Then it will
exists within your workspace at "My Documents\Eclipse Workspace\Foo".

   You can open and close projects by right clicking on them, but even when
the project is "closed", it'll still exist within the workspace (you'll see
a closed folder icon as a representation of the project).

   So the centralized "file" isn't the project, but the workspace. You work
in a single workspace, which can have multiple projects simultaneously.

   The Eclipse IDE supports languages other than Java, and so projects have
something called "natures". If a project doesn't have the "java nature"
applied to it, a lot of Java-specific tools (such as automatic compilation,
javadoc navigation, etc.) will be disabled.

   - Oliver


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.