Eclipse:我所有的项目都从 Project Explorer 中消失了
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7389898/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Eclipse: All my projects disappeared from Project Explorer
提问by francesco
It seems like all my projects (except one) disappeared from the view Project Explorer.
似乎我所有的项目(除了一个)都从项目资源管理器的视图中消失了。
I'm using Eclipse Java EE IDEfor Web Developers.
Version: Helios Service Release 2
Build id: 20110218-0911
我正在为 Web 开发人员使用Eclipse Java EE IDE。
版本:Helios Service Release 2 版本号
:20110218-0911
Note: all the projects are present on the file system.
注意:所有项目都存在于文件系统中。
How to bring them back? Any ideas?
怎么把他们带回来?有任何想法吗?
回答by Cerin
This happened to me. I'm still not sure how, but the reason was that my workspace meta data had become corrupted, probably due to Eclipse being improperly shutdown. The solution, as explained here, is to:
这发生在我身上。我仍然不确定如何,但原因是我的工作区元数据已损坏,可能是由于 Eclipse 未正确关闭。该解决方案,为这里解释,就是:
Note, steps 2 & 3 are optional if Eclipse isn't crashing, but just not showing any projects.
请注意,如果 Eclipse 没有崩溃,只是不显示任何项目,则步骤 2 和 3 是可选的。
- Close Eclipse.
- cd /home/user/workspace/.metadata/.plugins
- mv org.eclipse.core.resources org.eclipse.core.resources_bak
- Start Eclipse
- Do File->Import
- General->Existing Projects into Workspace
- Click the "Select root directory" field and browse to each subfolder in your workspace folder, and import.
- 关闭日食。
- cd /home/user/workspace/.metadata/.plugins
- mv org.eclipse.core.resources org.eclipse.core.resources_bak
- 启动日食
- 做文件->导入
- 常规->现有项目到工作区
- 单击“选择根目录”字段并浏览到工作区文件夹中的每个子文件夹,然后导入。
For me, this was very tedious, since I had several dozen projects in my workspace, but it's the only solution I found short of restoring my entire workspace from a backup.
对我来说,这非常乏味,因为我的工作区中有几十个项目,但这是我发现的唯一解决方案,无法从备份中恢复整个工作区。
Edit:This answer is now quite old, and better solutions may now exist. Although I haven't had need to try it, I recommend attempting @antonagestam's solution first, as others have suggested it may be faster and more effective.
编辑:这个答案现在已经很老了,现在可能存在更好的解决方案。虽然我不需要尝试,但我建议先尝试@antonagestam 的解决方案,因为其他人认为它可能更快、更有效。
Edit:Since it's fairly simple, I'd recommend trying antonagestam's solution first. However, this problem recently re-occurred for me, and that solution did not work in my case. But neither did it interfere with this solution.
编辑:由于它相当简单,我建议先尝试 antonagestam 的解决方案。但是,这个问题最近再次出现在我身上,该解决方案在我的情况下不起作用。但它也没有干扰这个解决方案。
回答by antonagestam
I had the same problem in Aptana, all of a sudden my projects were gone. Solved it by going to the drop-down menu in Project Explorer and going Top Level Elements -> Projects.
我在 Aptana 中遇到了同样的问题,我的项目突然消失了。通过转到 Project Explorer 中的下拉菜单并转到 Top Level Elements -> Projects 来解决它。
回答by logan
Go to
去
File --> Import --> General --> Existing Project into Workspace
文件 --> 导入 --> 常规 --> 现有项目到工作区
Then,
In Root Directory
Enter the workspace path where all your projects saved & click refresh as below
然后,在Root Directory
输入保存所有项目的工作区路径并单击刷新,如下所示
And Click Finish
然后点击完成
回答by user2498411
I was having the same problem for Android projects in Eclipse. Thislink was very helpful in restoring the missing projects.
对于 Eclipse 中的 Android 项目,我遇到了同样的问题。此链接对恢复丢失的项目非常有帮助。
- Go to 'File->Import->General->From Existing Project'.
- Select the root folder to the Workspace.
- Click on the 'Refresh' button.
- Select the required projects and click 'Finish' button.
- 转到“文件->导入->常规->从现有项目”。
- 选择工作区的根文件夹。
- 单击“刷新”按钮。
- 选择所需的项目,然后单击“完成”按钮。
回答by SuRaj Creator
Click on Windows > Open Perspectives > java , Press Ok. Project Explore will come back on screen..
单击 Windows > Open Perspectives > java ,按 Ok。Project Explorer 将重新出现在屏幕上..
回答by saravanakumar
I had the same problem in Luna,
Suddenly my projects were gone in start-up.
I solved this by select Deselect working setoption in the drop-down menu in Project Explorer.
我在Luna 中遇到了同样的问题,
突然我的项目在启动时消失了。
我通过在项目资源管理器的下拉菜单中选择取消选择工作集选项解决了这个问题。
Note: I post this answer even this is not a right answer for this question. Since I search for Luna and came here,while trying with discussed things I was find this solution. This may help others.
注意:我发布了这个答案,即使这不是这个问题的正确答案。由于我搜索 Luna 并来到这里,在尝试讨论的事情时,我找到了这个解决方案。这可能会帮助其他人。
回答by Mr. Lee
My solution is open view menu and select "Top Level Elements" and set "Projects"
我的解决方案是打开视图菜单并选择“顶级元素”并设置“项目”
回答by danigonlinea
If any of the previous methods don't work for you then delete your old workspace, create a new workspace and put it by default. You can do this by launching Eclipse twice - the second time it asks you for the workspace ;). Then re-import all your projects there and say "problem, goodbye".
如果前面的任何方法对您不起作用,请删除旧工作区,创建一个新工作区并将其置于默认情况下。您可以通过启动 Eclipse 两次来执行此操作 - 第二次它要求您提供工作区 ;)。然后在那里重新导入所有项目并说“问题,再见”。
回答by Deian
you should check the active Working Set - make sure it is off.
您应该检查活动的工作集 - 确保它已关闭。
回答by Mouna Cheikhna
if you use the "Task List" view of Eclipse, it will sometimes try to hide files or projects that it thinks are not associated with a given task (i.e. any file that was not opened while you had a certain task selected as the current task). If you want Eclipse to stop hiding files in that case, you can just delete all tasks.
如果您使用 Eclipse 的“任务列表”视图,它有时会尝试隐藏它认为与给定任务无关的文件或项目(即在您将某个任务选为当前任务时未打开的任何文件) )。如果您希望 Eclipse 在这种情况下停止隐藏文件,您可以删除所有任务。
Or you may also restart your eclipse and by just closing the project and then opening it again (from the right mouse click context menu) the files will be restored.
或者您也可以重新启动您的 eclipse,只需关闭项目然后再次打开它(从鼠标右键单击上下文菜单),文件将被恢复。
If that doesnt get your projects back then check the "filters option" (Click on right corner of Project Explorer tab and open context menu. Select Filters option from menu) and make sure that your projects type isnt checked.
如果这不能让您的项目恢复,请检查“过滤器选项”(单击“项目资源管理器”选项卡的右上角并打开上下文菜单。从菜单中选择“过滤器”选项)并确保未选中您的项目类型。