Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-ui-dev] Anonymous inner class creation...

It currently only works for classes, but not for interfaces (as only
classes have a constructor proposal).
-> All the code is there, just waiting for JCore to help us. It's in their
queue!

Martin



                                                                                                                        
                    "Scott                                                                                              
                    Stanchfield"              To:     <jdt-ui-dev@xxxxxxxxxxx>                                          
                    <scott@xxxxxxxxxxx        cc:                                                                       
                    m>                        Subject:     [jdt-ui-dev] Anonymous inner class creation...               
                    Sent by:                                                                                            
                    jdt-ui-dev-admin@e                                                                                  
                    clipse.org                                                                                          
                                                                                                                        
                                                                                                                        
                    23.11.01 16:34                                                                                      
                    Please respond to                                                                                   
                    jdt-ui-dev                                                                                          
                                                                                                                        
                                                                                                                        



I noticed that if you use code completion in a call to super() in a
constructor, you're given in the option to create anonymous inner classes
that extend a supertype. This is very cool, and it would be really cool if
we could access this functionality in other places as well.

For example, I'd love to type

  ActionListener l = new ActionListener

followed by control-space and see

  ActionListener (anonymous inner class)

listed as an option. If selected, it should expand to

  ActionListener l = new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    }
  };

(In other words, stub abstract methods automatically.).

If I had time to work on this one, I'd tinker -- perhaps someone else knows
that functionality well?

TIA,
-- Scott

==============================================================
Scott Stanchfield    scott@xxxxxxxxxxxx    http://javadude.com

Lead author of "Effective VisualAge for Java, Version 3"
                                      http://javadude.com/evaj

VisualAge for Java Tips and Tricks     http://javadude.com/vaj

AWT & Swing FAQ Manager, jGuru.com
Visit for Java Enlightenment!             http://www.jguru.com
==============================================================

_______________________________________________
jdt-ui-dev mailing list
jdt-ui-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/jdt-ui-dev






Back to the top