Hi there.

I'm using #544 but I'm sure this behaviour has been around for much longer.

Given these two classes:

    public class Foo {
        private int type;
        private String name;
    
        public Foo( int type, String name ) {
            this.type = type;
            this.name = name;
        }
    
        // ...
    }

    
    public class SpecialFoo extends Foo {
        private int type;
    
        // ...
    }


I get the following scenarios:

1) I alt-insert a constructor into SpecialFoo and I get to "Choose Fields to
Initialize".  If I then choose the "type" field, I get a constructor like
this:

    public SpecialFoo( int type, String name, int type ) {
        super( type, name );
        this.type = type;
    }

and of course the two fields called type are underlined in the signature.


2) So I choose "Select None" for fields to initialize, but I don't get a
default constructor, I get this:

    public SpecialFoo( int type, String name ) {
        super( type, name );
    }

and there is no way to insert a default constructor.


3) Incidentally, if I choose to ctrl-O override Foo( int type, String name
), I get the same constructor as in (2) but I can also copy the javadoc from
the superclass' constructor, which isn't currently an option with inserting
a constructor.

Cheers,
Dan


***************************************************************************************
This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. 
If you have received this email in error please notify [EMAIL PROTECTED] 
immediately.

This footnote also confirms that this email message has been swept for the 
presence of computer viruses.
***************************************************************************************

_______________________________________________
Eap-list mailing list
[EMAIL PROTECTED]
http://www.intellij.com/mailman/listinfo/eap-list

Reply via email to