Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ctrl click class in Eclipse shows binary / jar instead of source

Using Eclipse Version: Helios Service Release 2 Build id: 20110218-0911

with Android plugin. I have an Android project "AndroidUtil" that is marked as a "library" project for my main Android application. When I ctrl + click the name of a class defined in AndroidUtil, I am taken to the binary / jar version of that class instead of the source file. How can I make it take me to the source instead?

like image 368
Mitch Avatar asked Nov 24 '11 18:11

Mitch


People also ask

Why Ctrl click not working in Eclipse?

The project might be compiling fine, but eclipse may not be displaying the files and folders correctly and thus the editor is unable to determine the link when you press CTRL-click. So verify your eclipse settings and make sure that all source folders are declared as "source folders" and are added to the build path.

How do I open class code in Eclipse?

Clicking anywhere on the class name that we want to open and pressing F3. Clicking anywhere on the class name and going to the menu under Navigate > Open Declaration.


1 Answers

When you control-click and it displays the class file editor in the editor pane, you should see an "Attach Source" button. Click that and point it to the library project in your workspace.

like image 89
Chris Avatar answered Nov 15 '22 09:11

Chris