+1,

Moreover, I think a smarter getter/setter methods generation would be
fine. 
What I mean is that because of encapsulation, allowing get/set method
for a collection is an heresy. 
It would be interesting to get another behavior depending of the
attribute's type. 
For example, we use in our developments something like:

collectionType coll;

public void addToColl(Element e) {
...
}
public void removeFromColl(Element e) {
...
}
public Iterator elementsOfColl(Element e) {
...
}

I know we can use live templates to solve this, but it will be cool to
link this via Alt-Insert-Setter/Getter.

Regis

-----Message d'origine-----
De : [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] De la part de Thomas Singer
Envoy� : mercredi 24 octobre 2001 09:38
� : [EMAIL PROTECTED]
Objet : RE: [Eap-features] Insert Setter


Hey, just an idea. Would it be possible to make the 
Alt-Insert-Setter/Getter customizable via patterns like the 
new-class/interface patterns?

Tom

At 01:20 24.10.01, you wrote:
>+1 for the 'this'.
>
>I am not sure about the local ClassName prefix but if this is an 
>option, we can always turn it off so I don't see any harm here.
>
>Also, our style is to use 'final' unless the value is *intended* to be 
>changed. A setter looks like:
>
>public void setXyz(final Xyz xyz)
>{
>   this.xyz = xyz;
>}
>
>This also applies to method and constructor parameters.
>
>Tal
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED] 
> > [mailto:[EMAIL PROTECTED]]On Behalf Of Vollmer, Thomas

> > - CannonSA
> > Sent: Tuesday, October 23, 2001 3:54 PM
> > To: '[EMAIL PROTECTED]'
> > Subject: RE: [Eap-features] Insert Setter
> >
> >
> > Also, why do setters use "this." and getters don't?
> > This also applies to "Encapsulate fields" refactoring.
> >
> > I'd like to have "this." in both getters and setters.
> > If it's a static member that's set or gotten, I use 
> > "ClassName.staticMemberName = staticMemberName;" and "return 
> > ClassName.staticMemberName;" respectively.
> >
> > It's very verbose, I know, but I like it that way :-)
> >
> > -Thomas
> >
> > > -----Original Message-----
> > > From: Kirk Woll [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, October 23, 2001 2:36 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: [Eap-features] Insert Setter
> > >
> > >
> > > I prefer the parameter for my set methods to be in the style "new"

> > > + the property name.  i.e.
> > >
> > > public void setName(String newName) {
> > >   this.name = newName;
> > > }
> > >
> > > rather than
> > >
> > > public void setName(String name) {
> > >   this.name = name;
> > > }
> > >
> > > Can this be made an option?
> > >
> > > Kirk
> > >
> > >
> > > _______________________________________________
> > > Eap-features mailing list
> > > [EMAIL PROTECTED] 
> > > http://www.intellij.com/mailman/listinfo/eap-features
> > >
> >
> > ************************************
> > If this email is not intended for you, or you are not responsible 
> > for the delivery of this message to the addressee, please note that 
> > this message may contain ITT Privileged/Proprietary Information.  In

> > such a case, you may not
> > copy or deliver this message to anyone.  You should destroy this
> > message and
> > kindly notify the sender by reply email.  Information contained in
this
> > message that does not relate to the business of ITT is neither
endorsed by
> > nor attributable to ITT.
> > ************************************
> >
> >
> > _______________________________________________
> > Eap-features mailing list
> > [EMAIL PROTECTED] 
> > http://www.intellij.com/mailman/listinfo/eap-features
>
>
>_______________________________________________
>Eap-features mailing list
>[EMAIL PROTECTED] 
>http://www.intellij.com/mailman/listinfo/eap-features


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


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

Reply via email to