Eclipse IDE。查看类的所有继承方法的列表

发布于 2024-10-07 17:02:44 字数 307 浏览 0 评论 0原文

就长话短说吧。有没有办法在编辑器中单击类的名称并在另一个窗口中查看其所有方法(继承的和其他方法)的列表?

这与我的其他问题相关: https://stackoverflow.com/questions/4457751/ Drag-and-drop-with-andengine-android,恐怕我忽略了一个有用的方法。

非常感谢您的帮助。

-贾斯蒂安·M.

Gonna keep this one short. Is there any way to click on the name of a class in the editor and see a list of all of its methods (inherited and otherwise) in another window?

This relates to my other question here: https://stackoverflow.com/questions/4457751/drag-and-drop-with-andengine-android, where I'm afraid I am overlooking a useful method.

Many thanks in advance for any help.

-Justian M.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

旧时浪漫 2024-10-14 17:02:44

您可以在目标类中使用 ctrl+O,当您想查看其继承的方法/成员时,您必须再次按 ctrl+O(两次 ctrl+O)。这适用于源文件和类文件

You can use ctrl+O in the target class and when you want to see its inherited methods/members you have to again press ctrl+O (two times ctrl+O). This will work for both source files and class files

德意的啸 2024-10-14 17:02:44

按 F4 打开“类型层次结构视图”。或者,在编辑器中右键单击,然后从上下文菜单中选择“打开类型层次结构”选项。然后,在此视图中,找到一个带有工具提示“显示所有继承成员”的按钮(它是包含当前选定的类名的行中的第二个按钮)。这将显示当前在类型层次结构视图中选择的类的所有继承成员。

如果您单击同一行中最右侧的按钮(绿色圆圈),您将只能看到公共成员。当然,如果有一个选项只能看到非私人成员,那就太好了,但是,我还没有找到这样的选项。

不过,查看所有继承成员的能力可能就足够了吗?

Press F4 to open a 'Type hierarchy view'. Alternatively, right-click in the editor and select the option 'Open type hierarchy' from the context menu. Then, in this view, find a button with a tooltip 'Show all inherited members' (it's the second one in the row with the currently selected class name in it). This will show you all inherited members of the class that is currently selected in the Type hierarchy view.

If you click the right-most button in the same row (the green circle), you will only see public members. Of course, it would be great if there was an option to see only non-private members, however, I haven't found such an option.

Still, the ability to see all the inherited members is probably good enough?

寄与心 2024-10-14 17:02:44

只需在类中[在任何方法之外]按 ctrl+space 就会显示所有未被覆盖但可从父类获得的方法。您可以看到一直到 Object 类的方法。
希望有帮助。

Just pressing ctrl+space in the class [outside any method] would show you all the methods that are not overriden but available from the parent class. You can see methods right upto the Object class.
Hope that helps.

最好是你 2024-10-14 17:02:44

当您在 Eclipse 中打开一个类时,如果该方法实现或覆盖了接口或父类的行为,则编辑窗口的左侧装订线(具有断点指示器的同一区域)将有一个向上的小箭头。你问的是这个吗?
如果打开“大纲”视图,您还可以看到向上箭头,这可能使您更容易查看方法列表。

When you open a class in Eclipse, the left hand gutter for the edit window (the same area that has the breakpoint indicators) has a small up arrow if that method implements or overrides behaviour from an interface or parent class. Is this what you're asking?
If you open the Outline view you can also see the up arrow and this may make it easier to see the list of methods.

贪了杯 2024-10-14 17:02:44

请使用 ctrl+o 快捷键获取该类中使用的所有方法。

Please use ctrl+o short cut to get all the methods used in that class.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文