Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Yet Another Desired Editing Feature
Yet Another Desired Editing Feature [message #122859] Fri, 28 November 2003 08:49 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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.
Previous Topic:Eclipse 3.0M5 and changes
Next Topic:Eclipse Plugins Repository is down?
Goto Forum:
  


Current Time: Mon Jul 21 10:39:40 EDT 2025

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

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

Back to the top