Say I have:
public class A extends B {
/* autocompletion doesn't suggests protected methods from B to
override with Ctrl+SPACE
*/
}
I'm currently using Intellij IDEA 11.0.2.
Say I have:
public class A extends B {
/* autocompletion doesn't suggests protected methods from B to
override with Ctrl+SPACE
*/
}
I'm currently using Intellij IDEA 11.0.2.
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.
'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.
Tried to add this as a comment but the keyboard shortcuts are clear when added as a reply ;)
Once in your subclass do CTRL + O (Windows) this will list the methods that you can override, which includes the standard ones as well as the methods from your superclass.
Additional Info (Not related to question): Also posted a link that contains some other very useful intelliJ shorcuts if they are of use to you. IntelliJ shortcuts that I can't find
On Mac with the latest Intellij (13), use Code > Override Methods...
and start to type the method you want to override, it will automatically generate the whole method with the @Override
annotation for you
The shortcut for this is Cmd + O