I am working on an eclipse plugin, and I'm trying to implement F3 (Open Declaration) functionality. After finding the project that contains a class, I use findType to get the IType of the class. If it a .java file in my workspace, I can use getResource to get the IFile, and then open its editor (as is described here).
However, if it's a BinaryType, then getResource returns null. I can get the class file using getClassFile, but when I use its getResource I also get null. If I try using its getPath method, I get an IPath to the jar file which contains it.
There must be some way to reach the source file, and open it in an editor, but I can't seem to find it.