Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could I select super class when creating a new class in IntelliJ IDEA 2016 like in Eclipse?

As you guys know, when we create a new class in Eclipse, we can choose super class what we should extend at the same time like followed sreenshot:

In Eclipse:

eclipse


However, I can't do that in IntelliJ IDEA:

IntelliJ


Is there any menu or wizard to do this?
By the way, I'm using Eclipse MARS and IntelliJ IDEA 2016

like image 265
Mippy Avatar asked Dec 19 '22 17:12

Mippy


2 Answers

The feature you want is called Create subclass.

Use Option + Return (or ALT + Enter on PC) on the class name, and you will have the opportunity to create a subclass of your currently selected class.

enter image description here

You may also choose to invoke this through the "Find All Actions" dialog, which is CTRL+SHIFT+A on PC and is likely similar on Mac.

like image 105
Makoto Avatar answered May 11 '23 08:05

Makoto


Still I haven't found any way to select a super class while creating a sub-class in IntelliJ IDEA. But I found that option in Android Studio which looks similar to the way it is done in Eclipse:

enter image description here

like image 40
Suresh S Avatar answered May 11 '23 08:05

Suresh S