Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Q: how to restore a project?
Q: how to restore a project? [message #785690] Sun, 29 January 2012 10:00 Go to next message
Tom Peters is currently offline Tom PetersFriend
Messages: 11
Registered: January 2011
Junior Member
I recently installed a plugin for a commercial tool. I did this while Eclipse was opened with a C workspace. Since then I cannot get a view of my C project anymore.

All this is with Eclipse Helios on MS-Windows XP.

In the workspace there are a .project and a .cproject, and a .settings dir, that haven't changed in ages. On MS-Windows there is also a .metadata dir which does get updated. Oddly, I also develop the same project on iMac, and there is no .metadata in that environment.

When I remove the .metadata on the MS-Windows and re-start the workspace, then Eclipse opens with the initial welcome and tutorial; a .metadata tree is rebuilt. However in the C/C++ perspective I cannot open or close any project (menu options greyed out), and the project explorer remains completely blank. When I switch to a workspace that is one up in the directory tree, which does contain some directories with Java projects, I do get to see those in the perspective: this parent dir only contains a .metadata; the actual Java dirs contain a .project and a .settings dir.

Does anyone know what I am missing so that I can get to see my C project again in the explorer?

Thanx,
Tom
Re: Q: how to restore a project? [message #785829 is a reply to message #785690] Sun, 29 January 2012 15:07 Go to previous messageGo to next message
David Wegener is currently offline David WegenerFriend
Messages: 1445
Registered: July 2009
Senior Member
On 01/29/2012 04:00 AM, Tom Peters wrote:
> I recently installed a plugin for a commercial tool. I did this while
> Eclipse was opened with a C workspace. Since then I cannot get a view of
> my C project anymore.
>
> All this is with Eclipse Helios on MS-Windows XP.
>
> In the workspace there are a .project and a .cproject, and a .settings
> dir, that haven't changed in ages. On MS-Windows there is also a
> .metadata dir which does get updated. Oddly, I also develop the same
> project on iMac, and there is no .metadata in that environment.
>
The .metadata directory is almost certainly being created on the Mac.
What is likely happening is that it is hidden because the name starts
with a '.'. Unix uses this to designate hidden files and folders.

> When I remove the .metadata on the MS-Windows and re-start the
> workspace, then Eclipse opens with the initial welcome and tutorial; a
> .metadata tree is rebuilt. However in the C/C++ perspective I cannot
> open or close any project (menu options greyed out), and the project
> explorer remains completely blank.
By removing the .metadata directory, you have removed all knowledge of
the project from Eclipse. That is where it stores the information about
what projects are in the workspace. You need to re-add the projects to
Eclipse. It sounds like you have the projects stored in the workspace.
(This the default, but isn't a requirement)

You should be able to use the File->Import wizard to get the projects
back. Open File->Import and select Existing projects into workspace.
From the root directory section, browse to the workspace directory (the
one above the directory that contains the .cproject/.project files).
Eclipse should then find the existing projects and list them in the
Projects window. Select the project and hit Finish.

> When I switch to a workspace that is
> one up in the directory tree, which does contain some directories with
> Java projects, I do get to see those in the perspective: this parent dir
> only contains a .metadata; the actual Java dirs contain a .project and a
> .settings dir.
>
This sounds a little confusing. Eclipse doesn't support workspace
nesting. You can't have a workspace within another workspace. If this
is really the structure you have, you need to separate the two
workspaces out into separate directory structures so that they don't
overlap.

> Does anyone know what I am missing so that I can get to see my C project
> again in the explorer?
>
> Thanx,
> Tom
>
Re: Q: how to restore a project? [message #786331 is a reply to message #785829] Mon, 30 January 2012 09:24 Go to previous message
Tom Peters is currently offline Tom PetersFriend
Messages: 11
Registered: January 2011
Junior Member
David,
thanx for the clarification. I didn't know I shouldn't nest workspaces. I've had the habit of creating a new WS for every project, which tend to be diverse (languages, plugins). On my iMac I indeed found the single .metadata dir in the (parent) "workspace" dir; .project and .cproject etc. I find in subdirs of various C libs, each of which is a project on its own.

I copied the .metadata from my iMac to the MS-Windows system, which worked in so far that I got to see the projects for my programs and the libraries that it depends on; however there were compilation problems. Instead I followed your other instruction, and imported the existing project into the WS. That has its own problems now, but you answered my question.

Thanx,
Tom
Previous Topic:Debugging shared libraries - finding sources
Next Topic:Q: build cannot find include files
Goto Forum:
  


Current Time: Thu Apr 25 06:09:44 GMT 2024

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

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

Back to the top