Eclipse 搜索菜单随机禁用
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/133129/
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 Search Menus disabled randomly
提问by MetroidFan2002
I use Eclipse 3.3in my daily work, and have also used Eclipse 3.2extensively as well. In both versions, sometimes the Search options (Java Search, File Search, etc) in the menu get disabled, seemingly at random times. However, with Ctrl+H, I am able to access the search functionality. Does anyone know why this happens? Has it been fixed in Eclipse 3.4?
我在日常工作中使用Eclipse 3.3,也广泛使用Eclipse 3.2。在这两个版本中,有时菜单中的搜索选项(Java 搜索、文件搜索等)被禁用,似乎是随机的。但是,使用Ctrl+ H,我可以访问搜索功能。有谁知道为什么会这样?它是否已在Eclipse 3.4 中修复?
采纳答案by James A Wilson
I don't have an exact answer. I will recommend that you try to correlate the disablement with which perspective is active. Likewise, which view is active. I have been using 3.4 and not experienced this issue.
我没有确切的答案。我会建议您尝试将禁用与哪个视角处于活动状态相关联。同样,哪个视图是活动的。我一直在使用 3.4 并且没有遇到过这个问题。
回答by hgh
window > close all perspective works for me.
窗口 > 关闭所有对我有用的透视图。
回答by Eric L.
Using Eclipse 4.3(!) this happened to me after doing a case-sensitive search.
在使用 Eclipse 4.3(!) 进行区分大小写的搜索后,这发生在我身上。
Window -> Close All Perspectives
didn't fix it and neither did restarting Eclipse using -clean
. While messing with the search box, I discovered that simply clicking to a previous search entry allowed me to edit it and search again! Clicking back to the case-sensitive search grayed the option out again.
Window -> Close All Perspectives
没有修复它,也没有使用-clean
. 在弄乱搜索框的同时,我发现只需单击上一个搜索条目就可以编辑它并再次搜索!单击返回区分大小写的搜索会使该选项再次变灰。
So before you reset anything in your workspace, try pulling up an older search entry using the Down Arrow.
因此,在您重置工作区中的任何内容之前,请尝试使用Down Arrow.
回答by mehmet
I think this answer is what you all need to solve the issue on all versions.
我认为这个答案是你们解决所有版本问题所需要的。
I am using RAD 8 and I have also faced this problem than I removed org.eclipse.search
directory in (workspace currently using) workspace/metadata/plugins
folder then restart the eclipse.
我正在使用 RAD 8,我也遇到了这个问题,因为我删除org.eclipse.search
了(当前使用的工作区)workspace/metadata/plugins
文件夹中的目录,然后重新启动 eclipse。
That's all.
就这样。
回答by Jeff Grigg
Darn! I have that problem too -- in Eclipse 3.4.2.
该死!我也有这个问题——在 Eclipse 3.4.2 中。
Seems to be related to Navigator and Project Explorer views: - Switch to Debug perspective: Search menu items are there. - Switch to Java or Java EE perspective: Search menu items still there. - Click on a project in Navigator or Project Explorer: Search menu items all DISABLED.
似乎与 Navigator 和 Project Explorer 视图有关: - 切换到 Debug 透视图:搜索菜单项在那里。- 切换到 Java 或 Java EE 透视图:搜索菜单项仍然存在。- 单击导航器或项目资源管理器中的项目:搜索菜单项全部禁用。
(Curse! I use search in Selected Resources a lot! )-:
(诅咒!我经常在选定资源中使用搜索!)-:
Hmmm... It may slso depend on the file type currently open in the editor. (Like Java vs xml.)
嗯...它也可能取决于当前在编辑器中打开的文件类型。(就像 Java 与 xml。)
回答by ZipwiZ
Still present in Eclipse 3.5.2 -- and for the first time really sticky.
仍然存在于 Eclipse 3.5.2 中——而且第一次真的很粘。
I checked out the "close all opened files and open any other file afterwards" answer and that brought back the Search menu items. Additionally, if you were lucky and have the Search result view open, than indeed there is this little link "Open search dialog".
我检查了“关闭所有打开的文件并在之后打开任何其他文件”的答案,并带回了搜索菜单项。此外,如果你很幸运并且打开了搜索结果视图,那么确实有这个小链接“打开搜索对话框”。
By the way, additionally lots of other project-related menu items seem to be greyed out also together with this, and they did not reanimate :-( But I did not really check out if these are only items for which it is useful and planned to be greyed out in this situation.
顺便说一句,另外许多其他与项目相关的菜单项似乎也与此一起变灰,并且它们没有重新激活:-(但我并没有真正检查这些是否只是有用和计划好的项目在这种情况下变灰。
回答by ayang
I'm using RAD 7.5.1 which runs on Eclipse 3.4 and I get this problem frustratingly often. It doesn't matter which perspective or view I'm in, or which editor I have open.
我正在使用在 Eclipse 3.4 上运行的 RAD 7.5.1,我经常遇到这个令人沮丧的问题。我在哪个视角或视图中,或者我打开了哪个编辑器都无关紧要。
Restarting RAD usually clears it up, but because that's such a colossal pain, I found that you can get around it in the Search View, there is a link; "Start a search from the search dialog" which will bring up the search dialog.
重新启动 RAD 通常会清除它,但是因为这是一个巨大的痛苦,我发现您可以在搜索视图中绕过它,有一个链接;“从搜索对话框开始搜索”这将打开搜索对话框。
This isn't a great workaround because the link only shows if you have no search history. To do another search, you'll have to clear your search history in the view.
这不是一个很好的解决方法,因为该链接仅在您没有搜索历史时显示。要进行另一次搜索,您必须清除视图中的搜索历史记录。
回答by Rich
A late comment for anyone getting bitten by this, but I found "eclipse -clean" fixed it => this does a cleanup of the workspace before starting
对于任何被此咬的人的迟到评论,但我发现“ eclipse -clean”修复了它=>这会在开始之前清理工作区
Thanks http://letsgetdugg.com/2009/04/19/recovering-a-corrupt-eclipse-workspace/for the tip, after I guessed my workspace might be corrupt.
感谢http://letsgetdugg.com/2009/04/19/recovering-a-corrupt-eclipse-workspace/的提示,在我猜测我的工作区可能已损坏之后。
回答by Yaniv
window > close all perspectives worked for me too.
窗口 > 关闭所有对我有用的观点。
But if you are just looking for a text search in the project you could press Ctrl+Alt+Gon a marked text
但是,如果您只是在项目中寻找文本搜索,则可以在标记的文本上按Ctrl+ Alt+G
回答by whiplash
Switching to another perspective, then back, works quickly for me.
切换到另一个视角,然后返回,对我来说很快。