Variable creation [message #159281] |
Tue, 18 May 2004 14:15 |
Eclipse User |
|
|
|
Originally posted by: rndzank.comcast.net.not_this.net
In IDEA, there are two features related to variable creation that I miss in
Eclipse. You can type this in IDEA:
myarray.length|
// note the cursor at the end doesn't select the whole expression
// and there is no semicolon
.... then hit the shortcut for 'Introduce Variable' and you get
int length = myarray.length;
// note also the added semicolon
In Eclipse, I have to have syntactically correct code in order to
introduce local variable. In this case, you have to use the expression somewhere.
Are there any known plans to enable this kind of usage in Eclipse?
Thanks
r.
|
|
|
Re: Variable creation [message #159289 is a reply to message #159281] |
Tue, 18 May 2004 14:23 |
Eclipse User |
|
|
|
Originally posted by: linnet.nospam.users.sourceforge.net
Hi Richard,
If myarray.length instead were a method invocation, Eclipse's Quick
Assist would suggest to assign the return value to a local variable
(provided you add the semicolon yourself first). However, since
variables by themselves are not syntactically correct, this is not
suggested.
I agree that it would be nice to have this kind of assistance. You might
want to add a bug report.
Best regards,
Jesper
Richard Nemec wrote:
> In IDEA, there are two features related to variable creation that I miss
> in Eclipse. You can type this in IDEA:
>
> myarray.length|
> // note the cursor at the end doesn't select the whole expression
> // and there is no semicolon
>
> ... then hit the shortcut for 'Introduce Variable' and you get
>
> int length = myarray.length;
> // note also the added semicolon
>
> In Eclipse, I have to have syntactically correct code in order to
> introduce local variable. In this case, you have to use the expression
> somewhere.
>
> Are there any known plans to enable this kind of usage in Eclipse?
>
> Thanks
>
> r.
|
|
|
Re: Variable creation [message #159297 is a reply to message #159289] |
Tue, 18 May 2004 14:46 |
Eclipse User |
|
|
|
Originally posted by: rndzank.comcast.net.not_this.net
Done, as https://bugs.eclipse.org/bugs/show_bug.cgi?id=62655
r.
Jesper Kamstrup Linnet wrote:
> Hi Richard,
>
> If myarray.length instead were a method invocation, Eclipse's Quick
> Assist would suggest to assign the return value to a local variable
> (provided you add the semicolon yourself first). However, since
> variables by themselves are not syntactically correct, this is not
> suggested.
>
> I agree that it would be nice to have this kind of assistance. You might
> want to add a bug report.
>
> Best regards,
>
> Jesper
>
> Richard Nemec wrote:
>
>> In IDEA, there are two features related to variable creation that I
>> miss in Eclipse. You can type this in IDEA:
>>
>> myarray.length|
>> // note the cursor at the end doesn't select the whole expression
>> // and there is no semicolon
>>
>> ... then hit the shortcut for 'Introduce Variable' and you get
>>
>> int length = myarray.length;
>> // note also the added semicolon
>>
>> In Eclipse, I have to have syntactically correct code in order to
>> introduce local variable. In this case, you have to use the expression
>> somewhere.
>>
>> Are there any known plans to enable this kind of usage in Eclipse?
>>
>> Thanks
>>
>> r.
|
|
|
Powered by
FUDForum. Page generated in 0.02781 seconds