Eclipse,库中定义的开放声明 [英] Eclipse, open declaration that is defined in a library

查看:67
本文介绍了Eclipse,库中定义的开放声明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Eclipse中,如果我按F3或在其中一个库中的引用上打开声明,它将打开代码的只读副本。

In Eclipse if I press F3 or open declaration on a reference that is in one of my libraries, it opens a read only copy of the code.

我认为起初这非常有用,因为它提醒我它是库代码,更改可能会影响更多项目。但是我发现如果要编辑就必须手动查找.java文件。

I thought this quite useful at first as reminds me that it's library code and changes could affect more projects. But I find it a pain to have to go and manually find the .java file if I do want to edit.

我可以:a)使它始终打开相关的.java文件,或b)打开只读副本后,迅速进入可编辑的.java文件。

Can I either: a) make it always open the related .java file, or b) once readonly copy is open, quickly get to the editable .java file.

推荐答案

在Eclipse中将依赖库作为Java项目打开时,可以将项目添加到构建路径。 (右键单击项目->属性-> Java构建路径->项目->添加)。

If you have the dependent library open as a Java project within Eclipse, you can add the project to the build path. ( Right click on project -> properties -> java build path -> Projects -> Add).

Order and Export 部分下,确保项目在库上方。

Under the Order and Export section, make sure the project is above the library.

按F3键后,将打开.java文件。

After doing this when you press F3, the .java file will open.

这篇关于Eclipse,库中定义的开放声明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆