Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse, open declaration that is defined in a library

Tags:

java

eclipse

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.

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.

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.

like image 768
weston Avatar asked Oct 13 '12 15:10

weston


1 Answers

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).

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

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

like image 159
Can't Tell Avatar answered Sep 19 '22 07:09

Can't Tell