NetBeans 中的开放实现(类型层次结构)功能?

发布于 2024-08-02 22:28:58 字数 254 浏览 3 评论 0原文

当我有这样的 Java 代码时:

someInterface.someMethod();

如何让 Netbeans 向我显示哪些类具有 someMethod() (而不是接口)的实现。

在 Eclipse 中,这是通过 Ctrl+T 完成的,但在 Netbeans 6.5 中按方法上的 Ctrl+T 没有任何作用,而且我无法确定类型层次结构功能在 Netbeans 6.5 中的位置。

谢谢。

When I have Java code like this:

someInterface.someMethod();

how do I get Netbeans to show me which classes have implementations of someMethod() (not the interface).

In Eclipse this is done with Ctrl+T, but pressing Ctrl+T on the method did nothing in Netbeans 6.5 and I can't where the type hierarchy functionality is in Netbeans 6.5.

Thanks.

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

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

发布评论

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

评论(5

无人问我粥可暖 2024-08-09 22:28:58

我发现 Ctrl+Alt+B 效果很好。 :)

I find that Ctrl+Alt+B works perfectly. :)

千纸鹤带着心事 2024-08-09 22:28:58

Netbeans 中已存在此功能:Alt+F7,选中“查找所有子类型”,然后单击“确定”。感谢 tkellerer 在 Netbeans 论坛

http://forums.netbeans 上指出了这一点。 org/viewtopic.php?p=49638#49638

这是 Netbeans 中被广泛忽视的功能,可能是因为它没有键绑定,所以我更改了增强请求以添加序列的键绑定“ Alt+F7,选中“查找所有子类型”,然后单击“确定”?

This functionality already exists in Netbeans: Alt+F7, check 'Find All Subtypes', and click OK. Thanks to tkellerer for pointing this out on the Netbeans forums

http://forums.netbeans.org/viewtopic.php?p=49638#49638

This is widely overlooked functionality in Netbeans, perhaps because there is no key binding for it, so I've changed my enhancement request to add a key binding for the sequence "Alt+F7, check 'Find All Subtypes', and click OK"?

你与昨日 2024-08-09 22:28:58

要获得与 Eclipse 中的类型层次结构类似的层次结构,请右键单击类名称,选择“导航”,然后选择“检查层次结构”。键盘快捷键是 ALT+SHIFT+F12。默认情况下,它会显示所选类或接口的父级。但是,您可以使用左下角的过滤器查看后代。我相信“显示子类型层次结构”过滤器(也可以使用 CTRL+B 切换)就是您想要的。

这在 NetBeans 6.7.1 中是准确的。我假设 6.5 中也是类似的。

To get a hierarchy similar to the type hierarchy in Eclipse, right click on the class name, select Navigate, and then Inspect Hierarchy. The keyboard shortcut for this is ALT+SHIFT+F12. By default, it shows you parents of the selected class or interface. However, you can view descendants by using the Filters at the bottom left side. I believe the Show Subtype Hierarchy filter (also toggled by using CTRL+B) is what you want.

This is accurate in NetBeans 6.7.1. I'm going to assume it is similar in 6.5.

早茶月光 2024-08-09 22:28:58

事实证明,Netbeans 中没有类似的功能。您可以在此处阅读相关内容:

http://forums.netbeans.org/viewtopic.php?p=49355#49355

我还在此处提交了增强请求,您可以投票支持该请求:

http://www.netbeans.org/issues/show_bug.cgi?id=172830

如果您希望看到此内容添加到 Netbeans,请投票支持。

It turns out that there is no comparable functionality in Netbeans. You can read about it here:

http://forums.netbeans.org/viewtopic.php?p=49355#49355

I've also filed an enhancement request here, which you can vote for:

http://www.netbeans.org/issues/show_bug.cgi?id=172830

If you want to see this added to Netbeans please vote for it.

猫性小仙女 2024-08-09 22:28:58

嘿,有人实现了一个模块来执行此操作,并且它可以在 Netbeans 6.5.1 中运行 - 非常适合您。我正在寻找 6.7.1 的等效版本。也许他们应该将其添加到 6.8!

http://wiki.netbeans.org/JavaGoToImplementation

转到实现是为最新版本的 NetBeans 内置的。查看导航上下文菜单。

Hey, someone has implemented a module to do this, and it works in Netbeans 6.5.1 - perfect for you. I'm hanging out to see an equivalent for 6.7.1. Maybe they should add it to 6.8!

http://wiki.netbeans.org/JavaGoToImplementation

Go To Implementation is built in for recent versions of NetBeans. Look in the Navigate context menu.

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