Generate getter / setter to create add/remove/addAll/removeAll for collections [message #40272] |
Tue, 27 May 2003 04:55  |
Eclipse User |
|
|
|
Originally posted by: j.verschoor.nefli.nl
Hello,
I'd like to create the following code generation functionality for fields
that are a Collection:
addXXX(Object o);
removeXXX(Object o);
addAllXXX(Collection c);
removeAllXXX(Collection c);
This is very common functionality. At least, in my code ;-)
I'd like to know if I should patch AddGetterSetterOperation /
AddGetterSetterAction, or create a whole new action. Personally I'd go with
AddGetterSetter, and for collections add another 4 checkboxes.
I'd like to know what you think, and I'd like to know what the eclipse team
thinks about it. I wouldn't want to be wasting my time because it won't be
included, or because somebody else is already doing this..
Joris Verschoor
|
|
|
|
|
Re: Generate getter / setter to create add/remove/addAll/removeAll for collections [message #41172 is a reply to message #40272] |
Tue, 27 May 2003 17:47   |
Eclipse User |
|
|
|
<j.verschoor@nefli.nl> wrote:
>Hello,
>
>I'd like to create the following code generation functionality for fields
>that are a Collection:
>
>
>addXXX(Object o);
>removeXXX(Object o);
>addAllXXX(Collection c);
>removeAllXXX(Collection c);
>
>This is very common functionality. At least, in my code ;-)
>
>I'd like to know if I should patch AddGetterSetterOperation /
>AddGetterSetterAction, or create a whole new action. Personally I'd go with
>AddGetterSetter, and for collections add another 4 checkboxes.
>I'd like to know what you think, and I'd like to know what the eclipse team
>thinks about it. I wouldn't want to be wasting my time because it won't be
>included, or because somebody else is already doing this..
In general the way to go is to stea., uups, no to mimic the structure
of an already existing plugin or action. At first this means
dublication, whichs is bad by default, but you can use all things
without breaking API.
I would take AddDelegateAction (or similiar), because there I have
done similiar things. There are some feature requests which are going
in the direction you also want to see.
I think its
https://bugs.eclipse.org/bugs/show_bug.cgi?id=35785
please add your thoughts.
I would not mind if you can provide the one or another method to speed
things up. So just take the Action and play around.
martin
|
|
|
|
Powered by
FUDForum. Page generated in 0.06572 seconds