Code completion for just method name (Java editor) [message #175332] |
Wed, 18 October 2006 22:03 |
Paul A. Rubin Messages: 188 Registered: July 2009 |
Senior Member |
|
|
Hi all,
In Eclipse 3.2 (Java editor), let's say I have a line
something = method(arg1, arg2);
and I want to change 'method' without changing the arguments. Is there
a slick way to do this using code completion? With my current settings,
if I highlight 'method', start typing the replacement name and hit
Ctrl-space to pick the replacement, it inserts a new set of parentheses
and dummy arguments in front of '(arg1, arg2)'. If I highlight the
entire call to 'method', it replaces the existing arguments with dummies.
If possible, I'd like to preserve the behavior that code completion with
no parentheses and arguments present inserts the parentheses and the
dummy arguments.
Sorry if this falls in the 'RTFM' category, but every time I wander into
the options screens my eyes start to water. :-)
/Paul
|
|
|
Re: Code completion for just method name (Java editor) [message #175394 is a reply to message #175332] |
Thu, 19 October 2006 07:38 |
Dani Megert Messages: 3802 Registered: July 2009 |
Senior Member |
|
|
Paul Rubin wrote:
> Hi all,
>
> In Eclipse 3.2 (Java editor), let's say I have a line
>
> something = method(arg1, arg2);
>
> and I want to change 'method' without changing the arguments. Is
> there a slick way to do this using code completion? With my current
> settings, if I highlight 'method', start typing the replacement name
> and hit Ctrl-space to pick the replacement, it inserts a new set of
> parentheses and dummy arguments in front of '(arg1, arg2)'. If I
> highlight the entire call to 'method', it replaces the existing
> arguments with dummies.
Try to set Java > Editor > Content Assist > (°) Completion overwrites.
If you don't like that mode but only used it rarely then do this: in
your example use Ctrl+Space then hold down the 'Ctrl' key to toggle the
mode.
Dani
>
> If possible, I'd like to preserve the behavior that code completion
> with no parentheses and arguments present inserts the parentheses and
> the dummy arguments.
>
> Sorry if this falls in the 'RTFM' category, but every time I wander
> into the options screens my eyes start to water. :-)
>
> /Paul
|
|
|
|
Powered by
FUDForum. Page generated in 0.03052 seconds