Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Variable creation
Variable creation [message #159281] Tue, 18 May 2004 14:15 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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.
Previous Topic:Build in Progress...
Next Topic:java project build state
Goto Forum:
  


Current Time: Sat Nov 09 03:12:52 GMT 2024

Powered by FUDForum. Page generated in 0.02781 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top