Nick Klauer
Nick Klauer

Reputation: 5943

Open Type / Resource in Eclipse .jars through shortcuts?

So in Eclipse, I'm aware that if I have included sources in maven dependencies, as well as the JDK, I can open a type to see it's implementation (Type Ctrl+T):

enter image description here

This is great for .java classes, but I don't appear to have any quick shortcut to open resources other than java .classes. For instance, I do some Clojure and JRuby, which both .jar up their sources, which are generally just the sources themselves.

Is there a way to get Ctrl+T or the "Open Resource" equivalent (Ctrl+Shift+R) to open resources held in .jar files?

Upvotes: 10

Views: 5305

Answers (3)

Kamil
Kamil

Reputation: 1538

I know it's a late answer but I've had recently the same problem.

It's not a shortcut, but... You can create an object somewhere inside your code, import the class and then click with Ctrl or press F3 on the class and bam! you've got the path in the Package/Project Explorer. Of course remember to tick Link with Editor.

Upvotes: 0

bginner
bginner

Reputation: 1

It seems like they have added the functionality since eclipse mars. I'm not sure what versions actually support this feature, but it doesn't work on my eclipse luna, but it does work on eclipse mars EE. However, the shortcut is CTRL + O. You can find by *.jar. It lists all the jar. This question seems to be pretty old, however, just answering so, it helps the future confused ones.

Upvotes: 0

Pranalee
Pranalee

Reputation: 3409

No. As per my knowledge, there are no keyboard shortcuts in eclipse to open resource file from jar. Only classes can be accessed by Ctrl+T. I always have to use package explorer to navigate contents in jar file.

Upvotes: 4

Related Questions