Eclipse Indigo 中的源代码导航和 JavaDoc 错误
我对 Eclipse Indigo 的库源代码有疑问。当我打开一个库类(例如从 JDK,但也从其他一些包含的库,如 Guava)时,可以使用 Open Type
对话框,也可以简单地通过 Ctrl< code>+ 单击类名或其某些方法,偶尔(并非总是)会出现某些问题。
不要误会我的意思,源始终显示没有任何问题(JDK 本身附带的 JDK 源或 Maven 下载的 Guava 源)。实际上停止工作的是什么:
- 当我使用
Ctrl + O
打开给定类中的 Quick Outline 弹出窗口时,方法和字段的列表正常显示,但是当我单击对于其中任何一个,Eclipse 都不会按照应有的方式移动其上的视图。此外,在我的代码中按住 Ctrl 键并单击该类的任何方法或字段不会直接将我带到它,而只是在源文件的顶部。 - 当我将鼠标悬停在该类或其方法上时,弹出窗口中不会出现任何 JavaDoc,如附图所示。我在
HashSet
类中,源代码显然在那里,但它没有显示在弹出窗口中。
我发现可以通过打开大纲视图并短暂单击来修复此问题通过类的方法和字段。单击几下后,Eclipse 就开始正常工作,但仅适用于这一类,不适用于目前以这种方式损坏的所有类。
有人遇到过这种bug吗?是否在 Eclipse Bugzilla 上进行跟踪?预先感谢您的任何建议。
为了完整起见,这是我的配置:
Windows 7 Professional x64
Oracle JDK 1.7 Update 2 32b
Eclipse Indigo for Java EE Developers 32b
I have a problem with Eclipse Indigo regarding library source code. When I open a library class (e.g. from the JDK, but also from some other included libraries, such as Guava), either using the Open Type
dialogue or simply through Ctrl+ click
on the class name or some of its methods, once in a while (not always) something breaks.
Don't get me wrong, the source is always displayed without any problem (either JDK source shipped with the JDK itself or Guava source downloaded by Maven). What actually stops to work:
- When I open the Quick Outline popup in that given class using
Ctrl + O
, the list of methods and fields displays normally, but when I click on any of them, Eclipse doesn't move the view on it as it should. Also Ctrl + clicking any of the methods or fields of that class in my code doesn't bring me directly to it, but simply at the top of the source file. - When I hover over that said class or its methods, no JavaDoc appears in the popup as you can see in the attached image. I am in the
HashSet
class, the source is clearly there, but it isn't displayed in the popup.
I found out that this can be fixed by opening the Outline View and briefly clicking through the class's methods and fields. After a few clicks, Eclipse catches on and starts to work correctly, but only for this one class, not for all which are broken in this way at the moment.
Has anybody met this kind of bug? Is it tracked at Eclipse Bugzilla? Thanks in advance for any advice.
For completeness, this is my configuration:
Windows 7 Professional x64
Oracle JDK 1.7 Update 2 32b
Eclipse Indigo for Java EE Developers 32b
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您的问题 #2 可以通过以下步骤解决:
下载 JDK 5.0 源代码。
来源
希望这会有所帮助..
your issue #2 may be resolved by following these steps :
download the JDK 5.0 Source Code.
source
Hope this helps..
听起来 Eclipse 内的库附加了错误的源。
我在一个项目中也有类似的症状,其中一个类同时存在于 lib 内部和项目的 src 文件夹中。相同的规范类名,但不同的实现。
我建议验证(或重新安装)您的 JDK 安装并在 Eclipse 中重新配置它。
按
Ctrl+Shift+T
并输入HashSet
并截取该窗口的屏幕截图也可能有所帮助。Sounds like wrong sources are attached to the libs inside Eclipse.
I had similar symptoms in a project where a class exist in both: inside a lib and in the project's src folder. Same canonical class name, but different implementations.
I would recommend to verify (or reinstall) your JDK-Installation and re-configurating it in Eclipse.
Hitting
Ctrl+Shift+T
and typingHashSet
and taking a screenshot of that window may help here, too.为了回答我自己的问题,我没有找到如何解决 Indigo 中的问题,但更新到 Juno 修复了它。
To answer my own question, I didn't find out how to solve the problem in Indigo, but updating to Juno fixed it.