Community
Participate
Working Groups
I think considering that you often get third-party libraries and you can not recompile them with debug info on you can never attach the source code (perphaps you get only a partial portion of the whole source) to this library. I'm convinced this is something very common and leeds to a more intuitive handling of the ide if you can add source code independently to the state the library was compiled. A lot of other IDE can handle that (e.g. IDEA) and it a great benefit Eclipse would gain. Thanks -Pavel
We would have to explicitely lookup corresponding source files, instead of relying on the source attributes. Guessing should be doable indeed.
Can IDEA retrieve source for secondary types? For example, if the source of A.java is: public class A { } class B { } You compile this code without debug attributes and you put:B.class and A.class in a jar. Then create a zip containing A.java. Are you able to retrieve the source for B.class? If not, then the heuristic is quite simple. We simply need to rebuild the source file name using the fully qualified name of the corresponding type. I will investigate that approach. Could you please let me know the result for the above test case? I don't have IDEA to try it myself.
i've tested your test case with IDEA 3.0 build 384. and the result is the following: source of class A is found. source of class B is not found. (it decompiles the class file to get it...) cheers
Ok, that confirms the way they do it. They use the fully qualified name to build a potential source name and then they proceed the lookup of the right source. We don't have a decompiler in Eclipse, so the best we can have is that the source will be retrieved successfully for A but not for B.
having this functinality helps already a lot.
Fixed and released in 2.1 stream.
*** Bug 16162 has been marked as a duplicate of this bug. ***
Verified.
*** Bug 23833 has been marked as a duplicate of this bug. ***
*** Bug 7637 has been marked as a duplicate of this bug. ***