如何使自动完成显示方法建议覆盖Intellij IDEA上的子类上下文? [英] How to make autocomplete show methods suggestions for overriding at subclass context on Intellij IDEA?

查看:575
本文介绍了如何使自动完成显示方法建议覆盖Intellij IDEA上的子类上下文?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

说我有:

public class A extends B {
  /* autocompletion doesn't suggests protected methods from B to 
     override with Ctrl+SPACE
  */
}



<我正在使用Intellij IDEA 11.0.2。

I'm currently using Intellij IDEA 11.0.2.

推荐答案

在编辑器窗格中右键单击类 A ,转到'生成...' - >'覆盖方法...'。

Right click in your editor pane for class A, go to 'Generate...' -> 'Override Methods...'.

然后您将被呈现以及可以覆盖的所有方法的列表。

You'll then be presented with a list of all methods that can be overridden.

'生成...'也可以通过键盘快捷键调用,我现在在Mac上,它是 ^ N 。 IIRC Windows / Linux上的快捷方式是Alt-Insert。

'Generate...' can also be called up via keyboard shortcuts, I'm on a Mac currently and it's ^N. IIRC the shortcut on Windows/Linux is Alt-Insert.

这篇关于如何使自动完成显示方法建议覆盖Intellij IDEA上的子类上下文?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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