Francesco Francesco - 1 month ago 5
Java Question

eclipse > java > open linked resources sources (.java instead of .class )?

I have 2 projects, A and B

project B have in his build path > libraries the class folder of A (eclipse also recognized that there is a "Source attachment" and added it.

Both A and B are in the same workspace.

When I ctrl+click into a function of project A referenced into a file of B eclipse open the

.class
file of A. But if I need to edit the
.java
version of that file I must manually look for the filename in project A and open it from project explorer.

There isn't an easyer way to go from a linked resource to ->
.java
file of his source? or to go from
.class
to
.java
in easyer way than manually expand folders and open the file?

thank you,
Francesco

Answer

You can use Ctrl+Shift+T to open a search Dialog.

But you should add B as a dependent project of A (and remove it from the classpath).

enter image description here

Comments