Community
Participate
Working Groups
Build Identifier: 20100617-1415 If I put the caret on a method name and press F3 (Open Declaration) and the method implementation is not in my workspace, but an archived source file, the source file is opened just as if it was a .java file in my workspace, but labled MyClass.class. So far so good. If I press F3 on a method name inside of this opened file, which's implementation is in the very same file, the caret doesn't simply jump to the method, but the file is opened again in a new tab. Reproducible: Always
> but an archived source file What is an "archived source file"? Can you please give more detailed steps and/or explain your setup in more details.
Just a guess: This can happen if there are nested types in a .java file. These are compiled into different .class files, and each of these class files opens in a separate editor (but all these editors show the whole source file).
A very common example: If I open the declaration on a JDK class method I need to place the src.zip file of the Java source into the JRE folder. Source files from this src.zip file are, what I called "archived source file"s. And it happens on the major class'es methods as well (major class is the class defined directly in the file, not a nested one). Do you need more info?
This looks like what Markus described in comment 2 and this won't change.
No, it's not, even if it looks like it ;). Despite the very common example, I posted above, this also happens when you create a project A, write some code, pack it to a.jar file, include a.jar file in another project B and set the Source Location of imported a.jar in the Java Build Path properties of project B to the project A. Or you put .java (source) files into the jar next to the .class files. It's the same effect. And in all three cases it has nothing to do with nested classes.
Sorry, "it" works for me using http://download.eclipse.org/eclipse/downloads/drops/I20101019-0800/index.php. Can't you just attach a sample workspace that shows the problem? Maybe I'm doing one step differently than you do.
I just tried to create a sample workspace. But it actually worked there. I will report back when I have something to show you.
>I just tried to create a sample workspace. But it actually worked there. Maybe it's your workspace or additional bundles? Your bug 327904 also seems to suffer from some "special" setup.
.