简体   繁体   English

IntelliJ社区版相当于Ctrl-T eclipse,去方法

[英]IntelliJ community edition equivalent of Ctrl-T eclipse, to go to method

So I've read the question How to show all parents and subclasses of a class in IntelliJ IDEA? 所以我已经阅读了如何在IntelliJ IDEA中显示类的所有父类和子类的问题 but it doesn't solve my problem exactly. 但它并没有完全解决我的问题。

I'm used to going to a method in eclipse, anywhere in the class hierarchy (jar or code), hitting Ctrl - T , it brings up a tree diagram of all classes above and below that implement that method (ie if subclasses/superclasses don't implement this method it doesn't show them). 我习惯于在eclipse中,在类层次结构中的任何地方(jar或代码), 按Ctrl - T ,它会显示实现该方法的所有类的上下树形图(即,如果是子类/超类不实现这个方法它不会显示它们)。

When you select a class from the diagram, it takes you precisely to that method. 从图中选择一个类时,它会精确地指向该方法。

Seems Ctrl - H shows you a general class diagram, not specific to the method you've selected. 似乎Ctrl - H显示了一个通用类图,不是特定于您选择的方法。 Ctrl - Shift - H , seems to show you a method hierarchy, but only the class and subclasses of the method you've selected (not the superclasses). Ctrl - Shift - H似乎显示了一个方法层次结构,但只显示了您选择的方法的类和子类(而不是超类)。

How do I navigate up the hierarchy to the specific method? 如何将层次结构向上导航到特定方法? Given that 1) I don't know at what level the method was defined at it's highest point. 鉴于1)我不知道该方法在什么级别被定义在它的最高点。 Also 2) given that there may be similar method names, so I don't want to rely on finding it by typing which may be error prone. 另外2)鉴于可能有类似的方法名称,所以我不想依赖于通过键入找到它可能容易出错。

I regard this as pretty much bread and butter functionality, so I'd be disappointed if there isn't anything similar. 我认为这几乎是面包和黄油的功能,所以如果没有类似的话,我会感到失望。

Update: The best I've found is hitting Ctrl - U a couple of times which eventually gets you to the top of the hierarchy, then hitting Ctrl - Shift - H naturally shows you everything below. 更新:我发现最好的是按Ctrl - U几次,最终让你到达层次结构的顶部,然后按Ctrl - Shift - H自然地显示下面的所有内容。 This is more steps that eclipse and a little disorientating because the tool doesn't show you exactly where you were. 这是一个日食和一些迷失方向的更多步骤,因为该工具并未准确显示您的位置。 Currently points still go to eclipse. 目前积分仍然是日食。

I would open a defect . 我会打开一个缺陷 There is no reason to filter the superclasses in the Hierarchy Method tab. 没有理由在“层次结构方法”选项卡中过滤超类。

To get the same behaviour in Intellij change the Implementation(s) keymaping: 要在Intellij中获得相同的行为,请更改Implementation(s)keymaping:

Preferences > Keymap 首选项>键盘映射

Search for 'Implementation(s)' 搜索'实施'

Change the keymap to Ctrl+T 将键映射更改为Ctrl + T.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM