Eclipse 不会在包资源管理器中显示文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9389121/
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 won't show files in package explorer
提问by Colleen
I don't know what went wrong, because this was working before, but all of the sudden I don't have any files in my eclipse package explorer.
我不知道出了什么问题,因为这以前是有效的,但是突然之间我的 eclipse 包资源管理器中没有任何文件。
The workspace path appears to be correct and the file permissions are correct.
工作区路径似乎正确且文件权限正确。
Can anyone think of what's wrong?
任何人都可以想到什么是错的?
回答by Zerato
I had the same problem (Probably caused when I cancelled a copying to my Dropbox folder)
I only needed to click File → Import → General → Existing Projects into Workspace
and select the missing projects in the window that appeared.
我遇到了同样的问题(可能是因为我取消了对 Dropbox 文件夹的复制)我只需要File → Import → General → Existing Projects into Workspace
在出现的窗口中单击并选择丢失的项目。
回答by S Krishna
回答by S Krishna
Workaround
解决方法
- Create a blank workspace
- Navigate to (File > Switch to workplace > Other)
- Clik Browse > Make new folder
- Click Ok in browse window
- Click ok in create workspace window
- Import your existing project into the new workspace
- Navigate to File > Import
- Click General > Existing project into workspace
- Click Next
- Browse and select your previous project
- Click on Finish
- 创建一个空白工作区
- 导航到(文件 > 切换到工作区 > 其他)
- 单击浏览 > 创建新文件夹
- 在浏览窗口中单击确定
- 在创建工作区窗口中单击确定
- 将现有项目导入新工作区
- 导航到文件 > 导入
- 单击 General > Existing project into workspace
- 点击下一步
- 浏览并选择您之前的项目
- 点击完成
Congrats! Now you can see your project in the package explorer by importing it.
恭喜!现在,您可以通过导入在包资源管理器中查看您的项目。
回答by Andreea Maria Nistor
Project Explorer -> click on "View Menu" -> Top Level Elements -> Click on "Projects"
项目资源管理器 -> 点击“查看菜单” -> 顶级元素 -> 点击“项目”
回答by Kim
Don't know what causes the problem, but found a way to get the files back into the package explorer.
不知道是什么原因导致了问题,但找到了一种方法将文件放回包资源管理器中。
If you go into the path of your workspace and find your projects, then you can pack them all into a zip archive file, and from this zip archive file you can import your projects again by using the File → Import → General → Existing Projects into Workspace
menu.
如果您进入工作区的路径并找到您的项目,那么您可以将它们全部打包到一个 zip 存档文件中,然后您可以从该 zip 存档文件中再次使用File → Import → General → Existing Projects into Workspace
菜单导入您的项目。
I don't know what causes the problem, but in my case I think it have something to do with me having my workspace in a dropbox folder.
我不知道是什么导致了这个问题,但就我而言,我认为这与我将工作区放在 Dropbox 文件夹中有关。
ps. I don't know if you actually can take more than one project into one zip file and make it work, I have only tried it with one project pr. ZIP-file, but it shouldn't matter.
附:我不知道你是否真的可以将多个项目合并到一个 zip 文件中并使其工作,我只尝试过一个项目公关。ZIP 文件,但应该没有关系。
回答by Michael Potter
I had started the wrong installation of eclipse. When I started the correct installation my code showed up fine. I have both C++ and Java EE installs.
我开始错误地安装了 eclipse。当我开始正确安装时,我的代码显示正常。我同时安装了 C++ 和 Java EE。
回答by Begyner
Just refresh all the projects, you able to see all missed files after you import from a workspace.
只需刷新所有项目,您就可以在从工作区导入后看到所有丢失的文件。
回答by Birol Efe
1) Make sure that you use the right workspace.
1) 确保您使用正确的工作区。
2) Choose your "workspace"-Folder "/YourWorkspace", NOTyour project folder"/YourWorkspace/yourProject"
2)选择您的“工作区”-文件夹“/YourWorkspace ”,而 不是您的项目文件夹“/YourWorkspace/yourProject”
Alternatively delete your project from your "YourWorkspace>/.metadata/.plugins/org.eclipse.core.resources/.projects/PROJECTNAME/.location"
或者从“YourWorkspace>/.metadata/.plugins/org.eclipse.core.resources/.projects/PROJECTNAME/.location”中删除您的项目
and restart.
并重新启动。
Hope this helps
希望这可以帮助
回答by duhaime
In 2020 on OSX I just went to Project -> Refresh and wham! my files appeared.
在 2020 年的 OSX 上,我刚刚去了 Project -> Refresh and wham!我的文件出现了。