eclipse is confusing <project vs workspace>

R

rogndeb

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)
 
C

Chris Smith

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)

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.
 
O

Oliver Wong

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)

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
 
K

kiter

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?
 
K

kiter

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.
 
K

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.
 
J

Jackie Lee

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top