|
Re: Exchange method bracket problem [message #1697441 is a reply to message #1697391] |
Thu, 04 June 2015 01:28 |
|
On 06/03/2015 08:46 AM, Hauke Mising name wrote:
> Hello everyone,
>
> I often copy a row like this:
>
>
> MyClass myclass = new MyClass();
> myclass.setFieldOneOutOfTen("1");
>
>
> Now lets say my class has a total of ten methods like oneOutOfTen,
> twoOutOfTen...
>
> What I am doing is coping this line 10 times so I have
>
>
> MyClass myclass = new MyClass();
> myclass.setFieldOneOutOfTen("1");
> myclass.setFieldOneOutOfTen("1");
> myclass.setFieldOneOutOfTen("1");
> myclass.setFieldOneOutOfTen("1");
> myclass.setFieldOneOutOfTen("1");
> myclass.setFieldOneOutOfTen("1");
> myclass.setFieldOneOutOfTen("1");
> myclass.setFieldOneOutOfTen("1");
> myclass.setFieldOneOutOfTen("1");
>
>
> Then I double click the method name and press ctrl + space for proposals
> and chose the method I want. But then this line looks like this:
>
>
> MyClass myclass = new MyClass();
> myclass.setFieldOneOutOfTen("1");
> myclass.setFieldTwoOutOfTen(string)("1");
>
>
> So I can enter the new argument but the ("1") is still there. Is it
> possible that eclipse uses the ("1") as arguments instead of creating
> the new argument brackets?
>
> Hopefully you understand my problem. Its kind of difficult to describe.
>
> Thanks for you help and many greetings,
> Hauke
The completion is telling you that a string argument goes there in the
context of how you engaged it. It will not see that you've already got a
string argument and then use that. Sorry.
|
|
|
Powered by
FUDForum. Page generated in 0.07736 seconds