Eclipse Europa 搜索引用功能停止工作
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/265138/
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 Europa search references feature stopped working
提问by Ferry
I'm working with Eclipse Version 3.2.1 Build M20060921-0945 on a MS-Windows 2000 SP4 using a JDK 1.5.0-12.
I takes my locale that is es-AR and sets all menu and context in Spanish which I don't like. So I had included in eclipse.ini file one parameter "-nl en".
Since that, "References..."feature in both "Search"and contextual menu stopped working. I removed parameter and ran eclipse with "-clean"but still not working. I don't have any other clue about what is happening. Thank you all in advance.
Beto
我正在使用 JDK 1.5.0-12 在 MS-Windows 2000 SP4 上使用 Eclipse 版本 3.2.1 Build M20060921-0945。
我使用 es-AR 语言环境,并用我不喜欢的西班牙语设置所有菜单和上下文。所以我在 eclipse.ini 文件中包含了一个参数"-nl en"。
从那以后,“搜索”和上下文菜单中的“参考...”功能停止工作。我删除了参数并使用“-clean”运行了eclipse,但仍然无法正常工作。我对正在发生的事情没有任何其他线索。谢谢大家。
将要
回答by Ferry
Delete all the files in you eclipse data, eg:<WORKSPACE>/.metadata/.plugins/org.eclipse.jdt.core
This should force eclipse to rebuild its index
删除 eclipse 数据中的所有文件,例如:<WORKSPACE>/.metadata/.plugins/org.eclipse.jdt.core
这应该强制 eclipse 重建其索引
回答by Ferry
I see a similar problem where search for references (Ctrl + Shift + G) stops working. It works again if I restart Eclipse, but it's still pretty annoying. I'm thinking maybe there's some keyboard shortcut that I hit sometimes by accident that messes up the search.
我看到一个类似的问题,搜索参考 (Ctrl + Shift + G) 停止工作。如果我重新启动 Eclipse,它会再次工作,但它仍然很烦人。我在想,也许我有时不小心按了一些键盘快捷键,这会扰乱搜索。
回答by Tillmann
Had the same trouble with the latest Indigo release of Eclipse, searching for references of a method or class I selected invariably gave 0 results.
Eclipse 的最新 Indigo 版本也遇到了同样的问题,搜索我选择的方法或类的引用总是给出 0 结果。
Stopping Eclipse, deleting all files in folder <WORKSPACE>/.metadata/.plugins/org.eclipse.jdt.core
, and restarting Eclipse afterwards has solved it.
停止 Eclipse,删除文件夹中的所有文件<WORKSPACE>/.metadata/.plugins/org.eclipse.jdt.core
,然后重新启动 Eclipse 已解决。
回答by mojoken
After trying all of the above and nothing working, I took another look at the file name pattern I was using for file search: *.java *.properties, *.vm, *.xml, *.xsd
在尝试了以上所有方法但没有任何效果后,我又看了看我用于文件搜索的文件名模式:*.java *.properties, *.vm, *.xml, *.xsd
I was missing the comma after .java, so Eclipse wasn't searching my .java files, it was looking for files that matched the pattern ".java *.properties".
我在.java之后遗漏了逗号,因此 Eclipse 没有搜索我的 .java 文件,而是在寻找与模式“.java *.properties”匹配的文件。
Wow did I feel dumb dumb dumb... adding the comma fixed it! Passing along my simplistic solution in case it does anybody else some good...
哇,我是不是觉得很蠢蠢蠢蠢蠢欲动……添加逗号修复了它!传递我的简单解决方案,以防它对其他人有好处......
回答by Gaurav Jain
Go to {workspace}.metadata.plugins\org.eclipse.search and clear the History section of dialog_settings.xml , worked for me.
转到 {workspace}.metadata.plugins\org.eclipse.search 并清除 dialog_settings.xml 的 History 部分,这对我有用。
回答by oedi
Strange as it sounds, it does seem that the keyboard mapping affects this. I had mapped -H to Search in Files, and the Java search started bringing up everything, rather then actual references to the method I was searching for. ~Nothing~ fix this, including the solution above. But remapping the key to Open Search Dialog DID fix it.
听起来很奇怪,但键盘映射似乎确实影响了这一点。我已将 -H 映射到文件中的搜索,Java 搜索开始提供所有内容,而不是对我正在搜索的方法的实际引用。~没什么~解决这个问题,包括上面的解决方案。但是将密钥重新映射到 Open Search Dialog DID 修复了它。
回答by RubioRic
I've just come to experience this behaviour with Eclipse Mars 1 Release 4.5.1. In an specific class only. Clean and build entire workspace does not work but I've updated Maven Project containing that class [Right-click on project -> Maven -> Update Project ...] and it works now.
我刚刚在 Eclipse Mars 1 Release 4.5.1 中体验到了这种行为。仅在特定课程中。清理和构建整个工作区不起作用,但我已经更新了包含该类的 Maven 项目 [右键单击项目 -> Maven -> 更新项目 ...],现在它可以工作了。
Hope it helps someone.
希望它可以帮助某人。
回答by user1943655
I've just come to experience this behavior with Eclipse Mars 1 Release 4.5.1.
我刚刚在 Eclipse Mars 1 Release 4.5.1 中体验到了这种行为。
I tried everything mentioned above but it did not help. So I created new workspace, and imported the project and search started working again.
我尝试了上面提到的所有内容,但没有帮助。所以我创建了新的工作区,并导入了项目,搜索又开始工作了。
回答by ítalo Gomes
I was facing a similar issue in Eclipse 2019-09 R (4.13.0) on Linux Mint
我在 Linux Mint 上的 Eclipse 2019-09 R (4.13.0) 中遇到了类似的问题
One thing that worked for me (besides closing and opening Eclipse again) was to click on the search icon and then in the Show Previous Searchicon on the tab and then Open in New:
对我有用的一件事(除了再次关闭和打开 Eclipse)是单击搜索图标,然后单击选项卡上的Show Previous Search图标,然后单击Open in New:
回答by branchgabriel
Trash your install.
垃圾你的安装。
Then reinstall it.
然后重新安装它。