How to create new class with implementations and new test cases?

Howdy, all.

Eclipse has a cool feature where you can click on a class, hit a button,
and it will create a new child class. It also lets you tick the
overridden methods you want to create at the same time.

I found the "new class" button, but did not see a way to make it appears
as a descendent class with implemented methods. Based on the discussion
in the tracker <>,
it appears there is doubt about the utility of the feature.

Eclipse has a similar feature that creates a JUnit test case painlessly.

If I understand the design of IDEA correctly, this means these features
are likely only supplied by plugins. Does anyone have reccomendations
for plugins that simplify these common tasks?


1 comment
Comment actions Permalink

If your class is abstract or if it's an interface, you can click on the class name and press Alt+Enter. It will suggest "Create subclass" or something like that.

Alternatively, you can create the class, add the "extends XXX" to the class definition, and then press CtrlO (override) and/or CtrlI (implement) to automatically override and/or implement methods from superclasses.


Please sign in to leave a comment.