开发者

How to find forward reference in eclipse?

开发者 https://www.devze.com 2023-01-15 15:58 出处:网络
Is there any way by which I can find out all classes which implement a pa开发者_如何转开发rticular interface?

Is there any way by which I can find out all classes which implement a pa开发者_如何转开发rticular interface? For example, if I have a interface as follows:

public interface myIntFac{}

I want to find all classes inside current project that implement this interface. How can I find it out in Eclipse?


At the interface level, you can use (assuming the cursor in on the interface)

  • CTRL+T to show the Quick Type Hierarchy
  • F4 to Open Type Hierarchy

At the method level, if you hover a method while holding down the control key, a pop-up box gives you the following choices:

  • Open Declaration
  • Open Implementation

How to find forward reference in eclipse?


(source: eclipse.org)

And from anywhere, you can use:

  • CTRL+SHIFT+H to open the Open Type Hierarchy pop-up and search for any type/interface.


Place your cursor on the interface, and try Ctrl-T.


Put your cursor in myIntFac and press F4 to show the type hierarchy as a separate window, or Ctrl-T to show it as a pop-up. Personally I like the "separate window" approach as it makes it easier to browse, refocus on a different type etc - but if you only want to show the hierarchy very briefly, the pop-up is good too.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号