简体   繁体   English

Eclipse Open Declaration打开类文件而不是Java

[英]Eclipse Open Declaration opens class files instead of java

I have a multimodule Maven project in my eclipse, with around 40 projects. 我的日食中有一个多模块Maven项目,大约有40个项目。 Navigation among classes was working fine within the same project and within different projects. 在同一个项目和不同项目中,各班级之间的导航运行良好。 However, this has stopped working and I don't know why. 但是,这已停止工作,我不知道为什么。 Now, Open Declaration is always opening the generated class files, under Maven dependencies , instead of the java ones, even to the java class that is right below the current one. 现在, Open Declaration始终在Maven dependencies下而不是Java文件下打开生成的类文件,甚至打开当前类下面的Java类。 All projects have the Maven's Workspace resolution enabled. 所有项目都启用了Maven的Workspace resolution Also, I still can open the java file with CTRL+SHIFT+T . 另外,我仍然可以使用CTRL+SHIFT+T打开Java文件。

I've been googling and stackoverflowing, but the answers I found didn't help much 我一直在谷歌搜索和堆栈溢出,但是我发现的答案并没有太大帮助

Any ideas? 有任何想法吗? Thanks in advance 提前致谢

Right click on the project -> Properties -> Maven. 右键单击项目->属性-> Maven。
Check the "Resolve dependencies from Workspace projects". 检查“解决工作区项目的依赖关系”。
That should do the trick. 这应该够了吧。 Tribute to Aleksandr M. 向Aleksandr M致敬。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM