解决Eclipse按下Ctrl+鼠标左键,无法转到类、变量或者方法问题

时间:2021-05-21 23:06:36

Eclipse项目中,按下Ctrl键后,鼠标移动到类、方法后可以显示高亮链接,但点击后无法跳转过去。网上查了很多方法都没有解决

最后无意在国外的网站上找到了解决方法,出处:

https://*.com/questions/16354028/eclipse-type-hierarchy-not-always-working

原文:

I had this same problem and fixed it by deleting the Eclipse index cache files located in .metadata/.plugins/org.eclipse.jdt.core. Delete all .index files and savedIndexNames.txt. Do this while Eclipse is not running and then restart. This fixed the issue for me.

即先关掉Eclipse,然后将.metadata/.plugins/org.eclipse.jdt.core文件夹中的.index文件和savedIndexNames.txt文件清理掉,最后重新启动Eclipse