[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools] Re: Feature Request

It would be grand if the "Generate Getter and Setter" action (or maybe a new
action altogether) was capable of generating accessor methods for indexed
properties. That is, if the specified field is either an Array type or a
List type then the methods generated will follow the JavaBeans indexed
property pattern. e.g.:

private LinkedList users;

public User[] getUsers() { ... }
public User getUsers(int index) { ... }
public void setUsers(int index, User user) { ... }
public void setUsers(User[] users) { ... }

Of course, this requires that the user somehow specify the type that the
indexed property will return, but a simply dialog would suffice.

"Erich Gamma" <erich_gamma@xxxxxxx> wrote in message
news:3B810214.986CFA8B@xxxxxxxxxx
> Hi Kyle,
>
> thanks for the encouraging feedback.
>
> >(1) New Method button
> yes, from reading your WebSphere book I got the impression that you are
> using the New Method wizard in VA/Java a lot <g> (very good book, BTW).
> We've said that unless someone cries for the New Method wizard we will
> not do it. So, I'll add it to the feature request list.
>
> >(2) New Field button and menu item.
> we didn't leave it out....
> Support for generating getters/setters is in the current version.
> Select a field in the outliner or type hierarchy and the context menu will
> have an entry "Generate Getter and Setter".
>
> Kyle Brown wrote:
>
> > Hi folks (especially Erich!).  I've been playing with Eclipse (in its
WSAD
> > incarnation) for almost two months solid now and I must say that I'm
> > starting to like it -- this is saying a lot coming from an old-time
> > Smalltalk bigot.
> >
> > However there are a couple of features from VAJ that I'm missing in the
JDT
> > that I hope you'll add sometime soon.  They are significantly impacting
the
> > way I work -- it's past the annoying stage into the "I'm starting to
write
> > my own plugin" stage.
> >
> > The features are:
> >
> > (1) New Method button and menu item (bring up a dialog to allow me to
type
> > just the name, types and args of the method and add in all of the braces
and
> > return statement gorp.
> >
> > but more importantly:
> >
> > (2) New Field button and menu item.  I HATE having to write getters and
> > setters -- come on, I haven't had to do that since about 1989.  That was
the
> > *first* extension to the Smalltalk environment I always made.  I can't
> > believe you folks left it out...
> >
> > Anyway, great work.  Keep it up and work in the J9/JDK 1.4 debugging
> > features ASAP!
> >
> > Kyle Brown
>