Eclipse 工作集丢失
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9099700/
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 working set is missing
提问by mdarwin
My Eclipse crashed, and a working set which I'd just spent an hour setting up is now missing.
我的 Eclipse 崩溃了,我刚刚花了一个小时设置的工作集现在丢失了。
But when I try and create a new working set with the same name, it says "A working set with that name already exists."
但是当我尝试创建一个具有相同名称的新工作集时,它会显示“具有该名称的工作集已经存在”。
So if it exists, where is it? I can't find it in my workspace... If it doesn't exist, why can't I create a new one of the same name?
那么如果它存在,它在哪里?我在我的工作区中找不到它...如果它不存在,为什么我不能创建一个新的同名?
I've tried refreshing my workspace (F5), and running ./eclipse -clean - no joy.
我试过刷新我的工作区 (F5),并运行 ./eclipse -clean - 没有乐趣。
回答by abstractdog
A little hack solved it :)
(Eclipse Java EE IDE for Web Developers, Version: Indigo Service Release 1)
一个小技巧解决了它:)
(适用于 Web 开发人员的 Eclipse Java EE IDE,版本:Indigo Service Release 1)
Choose a project, right click on it.
Assign Working Sets...
In Working Set Assignments window: uncheck the checkbox called "Show only Package Explorer working sets" ... and voila: there is the disappeared working set.
Check that working set and Click "OK" -> Working set will appear in Package Explorer.
选择一个项目,右键单击它。
分配工作集...
在“工作集分配”窗口中:取消选中名为“仅显示包资源管理器工作集”的复选框……瞧:工作集消失了。
检查工作集并单击“确定”-> 工作集将出现在包资源管理器中。
回答by Warpzit
Another possibility is to click the arrow pointing down (View Menu), select top level element and then choose Working sets.
另一种可能性是单击向下的箭头(查看菜单),选择顶级元素,然后选择工作集。
回答by Bruce Edge
Neither of the above answers worked for me on STS 3.4.2. I kept getting the error "workspace of that name already exists" when I tried to create a specific name although I could not see it in the package viewer.
以上答案都不适用于 STS 3.4.2。当我尝试创建特定名称时,我不断收到错误“该名称的工作区已经存在”,尽管我在包查看器中看不到它。
I found this file that contains references to the named workspaces:
我发现这个文件包含对命名工作区的引用:
<workspace dir>/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml
I noticed that the missing workspace had a
我注意到丢失的工作区有一个
editPageId=org.springframework.ide.eclipse.ui.springWorkingSetPage
whereas the ones I could see were:
而我能看到的是:
editPageId=org.eclipse.jdt.ui.JavaWorkingSetPage
So, my 'missing' working set would only show up in the spring package viewer. User error - but eclipse did not help find it...
因此,我的“缺失”工作集只会出现在 spring 包查看器中。用户错误 - 但 eclipse 并没有帮助找到它...
At this point one can either rename/delete the spring workspace, then add it to the package workspace.
此时可以重命名/删除 spring 工作区,然后将其添加到包工作区。
回答by Enrichman
In my case I had to:
就我而言,我不得不:
- Right click on a project > "Assign Working Sets..."
- "Configure Package Explorer working sets..."
- Select the missing working sets and click OK
- 右键单击一个项目>“分配工作集...”
- “配置包资源管理器工作集...”
- 选择缺少的工作集并单击确定
Et voilà!
等等!
回答by sbobde
Thanks all for the hints. While they didn't exactly work as it did for some of you, here's what worked for me (using Eclipse Juno):
谢谢大家的提示。虽然它们对你们中的一些人并不完全有效,但以下是对我有用的(使用 Eclipse Juno):
File -> Import -> Existing Projects into Workspace -> Select the directory from where to import your project(s)-> Finish.
文件 -> 导入 -> 现有项目到工作区 ->选择导入项目的目录-> 完成。
Not sure what the specific cause was, though it happened when my machine crashed.
不确定具体原因是什么,虽然它发生在我的机器崩溃时。
回答by Feng Zhang
I solved my problem by closing then reopening Navigator view.
我通过关闭然后重新打开导航器视图解决了我的问题。