Where is the "how do I do 'x' in IDEA?" Forum ? (is this it ?)

If it is:

I'm looking for a 'quick' way of extending a class and implementing constructors for my new subclass that match the base class.

For example, if I subclass Exception, I want to include all four constructor signatures, with calls to super().

3 comments
Comment actions Permalink

Sigh.. replying to one half of my own question.

Right-click and 'generate' then select constructor. I knew there must be a way.

The other question still stands.

Is this the right forum for these types of questions?

0
Comment actions Permalink

Yep, ask away. Or just figure it out yourself. ;)

"Mike C" <no_mail@jetbrains.com> wrote in message
news:6307775.1082156914877.JavaMail.javamailuser@localhost...

Sigh.. replying to one half of my own question.

>

Right-click and 'generate' then select constructor. I knew there must be a

way.
>

The other question still stands.

>

Is this the right forum for these types of questions?

>


0
Comment actions Permalink

Mike C wrote:

Sigh.. replying to one half of my own question.

Right-click and 'generate' then select constructor. I knew there must be a way.


Or, for the keyboardly oriented, press Alt-Insert and then Enter to
select Constructor.

The other question still stands.


There isn't an easy way to create a subclass of a non-abstract class
currently. There is a refactoring to Extract Subclass planned for IDEA
4.1 though.

However, if your baseclass is abstract, you can place the caret on the
class definition line and press Alt-Enter and choose the Implement
Abstract Class intention.

Ciao,
Gordon

--
Gordon Tyler (Software Developer)
Quest Software <http://java.quest.com/>
260 King Street East, Toronto, Ontario M5A 4L5, Canada
Voice: 416-643-4846 | Fax: 416-594-1919

0

Please sign in to leave a comment.