Eclipse, an open ad that is defined in the library

In Eclipse, if I press F3 or open an ad in a link located in one of my libraries, only a copy of the code for reading is opened.

I thought it was very useful at first, as it reminds me that library code and changes can affect more projects. But I find it painful for me to go and manually find the .java file if I want to edit it.

Can I either: a) always open the associated .java file, or b) as soon as the open copy is opened, quickly go to the editable .java file.

+8
java eclipse
source share
2 answers

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

In the Order and Export section, verify that the project is above the library.

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

+13
source share

You need to attach the correct source when you press Ctrl + click or press F3 for any class that is in the library. Just click on the source attach → external folder → attach the src folder of the library you are using. Eclipse will recognize the correct .java file itself.

I had the same problem with the Action interface in struts 2.0. So I put the src folder in my location directory and bound my uncle.

0
source share

All Articles