Setter ==> this.name = name; [message #83781] |
Thu, 07 August 2003 09:26  |
Eclipse User |
|
|
|
Originally posted by: opicasso.videotron.ca
Hi,
On eclipse 2.0 I had the following "Generate setter..." behaviour:
field:
private String name;
generated setter:
public void setName(String name)
{
this.name = name;
}
With eclipse 2.1, with the same field I get:
generated setter:
public void setName(String string)
{
name = string;
}
I prefere the old way of generating setters.
Is it possible to do this in eclipse 2.1 and how?
<code>
Thanks
</code>
|
|
|
|
|
|
|
|
Re: Setter ==> this.name = name; [message #85227 is a reply to message #84867] |
Wed, 13 August 2003 04:34  |
Eclipse User |
|
|
|
Good idea, please file a bug report so it does not get lost.
David Corbin wrote:
> Ah. I think I confused myself. It think I was doing "Create Method
> getLength", not actually doing set-getter. OTOH, I think this would
> make an excellent enhancment to 'create method' logic (recognizing
> getter/setter signatures and just making the method do the right thing)
>
> David
>
> Martin Aeschlimann wrote:
>
>> I just tried and it's in there: private int fLength ->
>> public int getLength() {
>> return fLength;
>> }
>>
>> public void setLength(int length) {
>> fLength= length;
>> }
>>
>> I also think it was in there 0703. Please try again or file a bug
>> report with reproducable steps.
>>
>> Thanks
>>
>> Martin
>>
>> David Corbin wrote:
>>
>>> Martin Aeschlimann wrote:
>>>
>>>> This 2.1 behaviour has already be fixed in the 3.0 (it's the same as
>>>> in 2.0 again). Unfortunatly there's no way to have this in 2.1.
>>>>
>>>> Martin
>>>>
>>>> Oscar Picasso wrote:
>>>>
>>>>> Hi,
>>>>> On eclipse 2.0 I had the following "Generate setter..." behaviour:
>>>>>
>>>>> field:
>>>>> private String name;
>>>>>
>>>>> generated setter:
>>>>>
>>>>> public void setName(String name)
>>>>> {
>>>>> this.name = name;
>>>>> }
>>>>>
>>>>> With eclipse 2.1, with the same field I get:
>>>>>
>>>>> generated setter:
>>>>>
>>>>> public void setName(String string)
>>>>> {
>>>>> name = string;
>>>>> }
>>>>>
>>>>> I prefere the old way of generating setters.
>>>>>
>>>>> Is it possible to do this in eclipse 2.1 and how?
>>>>>
>>>>>
>>>>> <code>
>>>>> Thanks
>>>>> </code>
>>>>>
>>>>>
>>>>
>>>
>>> Is this configurable in 3.0? I'm running I20030703, and I'm still
>>> seeing the old (stupid) style...
>>>
>>
>
|
|
|
Powered by
FUDForum. Page generated in 0.08944 seconds