Accessing source in other project with Ctrl-B.

When I hit Ctrl-B on something defined in another project I get a decompilation of the class file rather than the source itself. Is there a way to get the source, especially if I have that project open in another window?

I have different projects mainly because some code works on 1.1+ 1.2+ 1.3+ 1.4+ and 1.5+ and I to write apps where possible than run on very old Javas.

I have tried various ways of adding in the dependent libraries without success.


The code you are trying to access has to be within the current project. That can be by adding the module or the source for a library.


It turns out the trick is this:

Projects can only see files in the same project unless you configure otherwise. You must add the module library of class files of some other project as a dependency. Add the class files, not the source. Then attach sources to the corresponding class files. If you simply attach the source files, when you hit Ctrl-B you will see decompiled class files, not the original source.


Please sign in to leave a comment.