Yet Another Desired Editing Feature [message #122859] |
Fri, 28 November 2003 08:49  |
Eclipse User |
|
|
|
Originally posted by: dcorbin.machturtle.com
I've come up with another idea that I think would be useful. Sometimes
(often, even), I know what method to call, but I'm not sure what the return
type of that method really is. I'd like to be able to turn an expression,
into an assignment.
For example:
In a property page, you've got a know there's a method "getElement()". I'd
like to be able to type "getElement()<CTRL-ENTER>", and have it produce
"IAdaptable adaptable = getElement()".
The CTRL-ENTER is just a guess of an idea, and it may not be the right
approach.
Thoughts?
|
|
|
Re: Yet Another Desired Editing Feature [message #122864 is a reply to message #122859] |
Fri, 28 November 2003 09:34   |
Eclipse User |
|
|
|
Originally posted by: hcs33.egon.gyaloglo.hu
Hi,
I think a similar feature is already in Eclipse. Type getElement(); and
after it use Quick-fix (Ctrl+1): there will be an ''Assign statement to a
new local variable" and an "Assign statement to a new field". Select the
option you want.
HTH,
Regards,
Csaba
"David Corbin" <dcorbin@machturtle.com> wrote in message
news:bq7jju$vk5$1@eclipse.org...
> I've come up with another idea that I think would be useful. Sometimes
> (often, even), I know what method to call, but I'm not sure what the
return
> type of that method really is. I'd like to be able to turn an expression,
> into an assignment.
>
> For example:
>
> In a property page, you've got a know there's a method "getElement()".
I'd
> like to be able to type "getElement()<CTRL-ENTER>", and have it produce
> "IAdaptable adaptable = getElement()".
>
> The CTRL-ENTER is just a guess of an idea, and it may not be the right
> approach.
>
> Thoughts?
|
|
|
Re: Yet Another Desired Editing Feature [message #123160 is a reply to message #122864] |
Sun, 30 November 2003 16:03  |
Eclipse User |
|
|
|
Originally posted by: kc.baltz.Lollimail.com
Horváth, Csaba wrote:
> Hi,
>
> I think a similar feature is already in Eclipse. Type getElement(); and
> after it use Quick-fix (Ctrl+1): there will be an ''Assign statement to a
> new local variable" and an "Assign statement to a new field". Select the
> option you want.
>
> HTH,
> Regards,
> Csaba
>
Note: in order for this to work you need to have your cursor right after
the semicolon (see the | below):
getElement();|
Also, you shouldn't have any other compile errors in the file when you
attempt to invoke QuickFix or nothing will come up.
K.C.
|
|
|
Powered by
FUDForum. Page generated in 0.13381 seconds