Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Workspace, Project Files, and Metadata
Workspace, Project Files, and Metadata [message #286076] Wed, 01 June 2005 17:09 Go to next message
Eclipse UserFriend
Originally posted by: sgeorgee.rim.com

Here is my problem;
I am working on a Java application and would like to make my work
available to others by using an SCM tool (perforce in particular). I am
new to Eclipse and find the workspace/project files structure to be
confusing, and I have spent some time trying to find any documentation on
how this information is stored.

I can simply make the source code for my application available to my
colleagues, but I would rather make a Workspace folder that contains the
projects folders and their files available. I understand that the
information about my project is being kept in the .metadata folder,
however, in which file(s), are all the files necessary? Is there any
other way to save the workspace? How does the Perforce Team Provider save
these files, or the Perforce WebSphere plug-in ( P4WSAD) save these files?

I would appreciate any direction in this matter, or specifics if you are
knowledgeable about them and they are not documented.

Thanks in advance.
Re: Workspace, Project Files, and Metadata [message #286115 is a reply to message #286076] Thu, 02 June 2005 13:56 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.rizzoweb.com

Shaheen Georgee wrote:
> Here is my problem;
> I am working on a Java application and would like to make my work
> available to others by using an SCM tool (perforce in particular). I am
> new to Eclipse and find the workspace/project files structure to be
> confusing, and I have spent some time trying to find any documentation
> on how this information is stored.
>
> I can simply make the source code for my application available to my
> colleagues, but I would rather make a Workspace folder that contains the
> projects folders and their files available. I understand that the
> information about my project is being kept in the .metadata folder,
> however, in which file(s), are all the files necessary? Is there any
> other way to save the workspace? How does the Perforce Team Provider
> save these files, or the Perforce WebSphere plug-in ( P4WSAD) save these
> files?
>
> I would appreciate any direction in this matter, or specifics if you are
> knowledgeable about them and they are not documented.


The .metadata directory is not where your project info is being stored -
it is where workspace info is stored. Remember, a workspace is a
container for projects and user preferences and plugin configuration. In
contrast, a Project is a container for files relating to, well, a
project - things like source code, library JARs, etc.

It is not recommended to try to save a workspace into SCM - there is
just too much data and much of it is machine- and/or developer- specific.
The "right way" is to store the entire contents of your Project into
SCM, including the Eclipse metadata files (.project and .classpath).
That way, other developers can use the SCM plugin (CVS, et al) to check
out the entire Project including Eclipse metadata files. Eclipse will
recognize the checked-out metadata files and use them.

HTH,
Eric
Re: Workspace, Project Files, and Metadata [message #286125 is a reply to message #286115] Thu, 02 June 2005 18:02 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sgeorgee.rim.com

Eric Rizzo wrote:

> Shaheen Georgee wrote:
>> Here is my problem;
>> I am working on a Java application and would like to make my work
>> available to others by using an SCM tool (perforce in particular). I am
>> new to Eclipse and find the workspace/project files structure to be
>> confusing, and I have spent some time trying to find any documentation
>> on how this information is stored.
>>
>> I can simply make the source code for my application available to my
>> colleagues, but I would rather make a Workspace folder that contains the
>> projects folders and their files available. I understand that the
>> information about my project is being kept in the .metadata folder,
>> however, in which file(s), are all the files necessary? Is there any
>> other way to save the workspace? How does the Perforce Team Provider
>> save these files, or the Perforce WebSphere plug-in ( P4WSAD) save these
>> files?
>>
>> I would appreciate any direction in this matter, or specifics if you are
>> knowledgeable about them and they are not documented.


> The .metadata directory is not where your project info is being stored -
> it is where workspace info is stored. Remember, a workspace is a
> container for projects and user preferences and plugin configuration. In
> contrast, a Project is a container for files relating to, well, a
> project - things like source code, library JARs, etc.

> It is not recommended to try to save a workspace into SCM - there is
> just too much data and much of it is machine- and/or developer- specific.
> The "right way" is to store the entire contents of your Project into
> SCM, including the Eclipse metadata files (.project and .classpath).
> That way, other developers can use the SCM plugin (CVS, et al) to check
> out the entire Project including Eclipse metadata files. Eclipse will
> recognize the checked-out metadata files and use them.

> HTH,
> Eric


First, thank you for your quick reply, proof of a very active project!

Now to the details;
> The .metadata directory is not where your project info is being stored -
> it is where workspace info is stored.
> It is not recommended to try to save a workspace into SCM - there is
> just too much data and much of it is machine- and/or developer- specific.

I am not interested in
-machine specific data (obviously)
-user specific data (everyone has their own, so i don't care to sync this
either)
-However, I want to have it so that other team members can open the
workspace and have all the project structures preserved, and not have to
create a new project and the IDE detecting w.ch files are part of each
project. Is this possible?


> The "right way" is to store the entire contents of your Project into
> SCM, including the Eclipse metadata files (.project and .classpath).

So not the .metadata folder, just the .project and .classpath files?
I tried this, but you must still create a workspace and add projects. In
fact, I tried removing these two files and the procedure is still the same
for a freshly synced computer (create workspace | add new project(s) |
source files will be detected).


I appreciate your help but I am still left wondering. It may be that I am
not reading clearly, or I am missing some important detail, however, as
you can see, this process maybe tedious for a large workspace containing
anything above 5 or 10 projects.


Thanks in advance!
Sg
Re: Workspace, Project Files, and Metadata [message #286171 is a reply to message #286125] Fri, 03 June 2005 10:53 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.rizzoweb.com

Shaheen Georgee wrote:
> Eric Rizzo wrote:
>> The "right way" is to store the entire contents of your Project into
>> SCM, including the Eclipse metadata files (.project and .classpath).
>
> So not the .metadata folder, just the .project and .classpath files?
> I tried this, but you must still create a workspace and add projects.
> In fact, I tried removing these two files and the procedure is still the
> same for a freshly synced computer (create workspace | add new
> project(s) | source files will be detected).
>
> I appreciate your help but I am still left wondering. It may be that I
> am not reading clearly, or I am missing some important detail, however,
> as you can see, this process maybe tedious for a large workspace
> containing anything above 5 or 10 projects.

The .metadata directory does not have anything in it related to your
projects - that info is contained within the project directories
themselves. Furthermore, workspaces are not intended to be shared - I
think that is the point you are missing (or trying to circumvent ;-).

Also, if I had a workspace that contained more than a handful of
projects, I would take a step back and asses why it has so many. Just as
when I see a class that has a lot of methods I try to asses why it is
doing so many things and how I can decompose it to be more manageable
and cohesive.
What I'm saying is that perhaps you should not have so many separate
projects in one workspace. Maybe some of them could/should really be
consolidated into a single Eclipse Project. Alternatively, maybe they
are not all related and could be split into more than one workspace.

Think about SCM, as one example of why it works this way. If the entire
workspace were checked in, that would include the SCM management files
('CVS' directories if using CVS) would also be checked in, but that
doesn't make sense. The check-out of the project contents must be
associated with the user who owns that workspace, which is by definition
user-specific. When I check out a module from CVS into an Eclipse
Project, Eclipse knows my CVS identity info and associates the project
contents with it so that it can properly manage the synchronization
state of the files.

One last-resort idea would be to try to check in the workspace contents
(other than .metadata) into SCM. Use a non-Eclipse SCM client to check
out into an Eclipse workspace, then tell Eclipse to go open those
projects... ah, no that won't help you because you will still have to
tell Eclipse that those directories are projects you want to see in your
workbench (it would automatically recognize them as soon as you told it
about them, but you have to tell it you're interested in the first
place). Honestly, I don't think it is such a big deal to
create/check-out the projects, especially if you make the workspace a
reasonable size and especially since it only has to be done once per
developer.

HTH,
Eric
Re: Workspace, Project Files, and Metadata [message #286177 is a reply to message #286171] Fri, 03 June 2005 13:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sgeorgee.rim.com

Yes, I see what you're saying, "it only has to be done once per
developer," that's what I was trying to avoid (double clicking a single
workspace file seems natural to me), but nevertheless, thank you for your
help. I now understand eclipse a little bit better :)

See you around.
Re: Workspace, Project Files, and Metadata [message #286188 is a reply to message #286076] Fri, 03 June 2005 15:53 Go to previous message
Eclipse UserFriend
Originally posted by: Michael_Valenta.oti.com

I don't know if perforce supports it but Eclipse has the concept of a
project set. For Cs, I can perform an Export Team Project set and that
produces a file that can be imported by other users in order to load all the
projects I inclued in the export. Perform a File>Import and select Team
Project Set and then click Next to see if perforce supports it.

Michael

"Shaheen Georgee" <sgeorgee@rim.com> wrote in message
news:11815cf65515823a8f4a1903922bf2a4$1@www.eclipse.org...
> Here is my problem;
> I am working on a Java application and would like to make my work
> available to others by using an SCM tool (perforce in particular). I am
> new to Eclipse and find the workspace/project files structure to be
> confusing, and I have spent some time trying to find any documentation on
> how this information is stored.
>
> I can simply make the source code for my application available to my
> colleagues, but I would rather make a Workspace folder that contains the
> projects folders and their files available. I understand that the
> information about my project is being kept in the .metadata folder,
> however, in which file(s), are all the files necessary? Is there any
> other way to save the workspace? How does the Perforce Team Provider save
> these files, or the Perforce WebSphere plug-in ( P4WSAD) save these files?
>
> I would appreciate any direction in this matter, or specifics if you are
> knowledgeable about them and they are not documented.
>
> Thanks in advance.
>
Previous Topic:Problem with SearchDialog
Next Topic:Update bug?
Goto Forum:
  


Current Time: Sat Nov 08 23:32:24 EST 2025

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

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

Back to the top