Reputation: 11396
Sometimes I find that Eclipse can't find certain class source files when I ctrl-click a classname in source code, even while finding it via ctrl-shift-T (typing the class name) works fine.
Is there a way to set ctrl-click to use the same search path as ctrl-shift-T?
Eclipse Version: Neon Milestone 1 (4.6.0M1) Build id: 20150820-1211
[EDIT: to clarify, I'm aware I can probably resolve my issue by attaching source, etc. But the point is I don't want to have two separate search paths here -- since ctrl-shift-T already works fully and takes me to the correct source code, this means that Eclipse DOES at some level already know where the source code is. Therefore I want to latch onto that rather than manually configuring it a second time]
Upvotes: 0
Views: 703
Reputation: 590
You need to tell eclipse where the source for that class is located. When you go to the definition currently, you are accessing it through the jar dependency. When you use ctrl+shift+t
you are looking up the actual source file in a different location. You need to connect the two. When you open the decompiled class, there should be a button that says "attach source..." Click the button and navigate to where the source for the class is.
Upvotes: 2