Eclipse:显示类文件的代码源? [英] Eclipse: displaying code source for class file?

查看:103
本文介绍了Eclipse:显示类文件的代码源?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行Eclipse 3.5.2,并调试一个调用一个方法的类 - 让我们将其称为 flaky() - 在我的另一个.jar文件。当我进入 flaky ()时,它会在调试器的标签中显示源代码,文件名为Flaky.class。



问题是,我看到的代码看起来老旧,所以我想知道我正在看哪个文件。



有没有办法找出Eclipse显示的文件路径?

解决方案

转到Package Explorer视图,文件在当前编辑器中打开。点击与编辑器链接切换(两个箭头)。这应该会跳到你正在查看的类文件,这应该在你正在使用的jar中。如果jar在一个库中,你应该看到包资源管理器中jar的路径。如果不是,您可以在首选项中看到它的路径。从那里你也可以使用Chin Huang的答案找到给定源文件的位置。


I'm running Eclipse 3.5.2 and am debugging a class which calls a method -- let's call it flaky() -- in one of my other .jar files. When I step into flaky(), it shows the source code in a tab in the debugger, with the filename as Flaky.class.

The problem is, the code I see looks old and out of date, so I'm wondering which file I'm looking at.

Is there any way to find out the path of the file Eclipse is displaying?

解决方案

Go to the Package Explorer view with the file open in the current editor. Click the "Link with Editor" toggle (the two arrows). This should jump you to the class file you are viewing, which should be in the jar you are using. If the jar is in a library, you should see the path to the jar in the package explorer. If not you can see the path to it in the preferences. From there you can also use Chin Huang's answer to find where the given source file is.

这篇关于Eclipse:显示类文件的代码源?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆