Eclipse label to declare a variable name as a method parameter

Let's say we had such a variable:

byte[] someByteArray;

And a prototype method like this:

public void someMethodRequiringString(String someByteArray);

And then we wanted to call our method in our byte array:

someMethodRequiringString(someByteArray);

Now we understand that our method requires String instead. Let them also say that we already had a conversion function in a Util package called convertFromByteArrayToString (). What is the best way to get from

someMethodRequiringString(someByteArray);     

to

someMethodRequiringString(Util.convertFromByteArrayToString(someByteArray));

My way is to place the cursor in front of someByteArray and type Util., Press CTRL + Space and Eclipse to suggest a method name for the conversion function. But, as soon as I press "Enter" to select this function, I get something like this:

 someMethodRequiringString(Util.convertFromByteArrayToString(bytearray)someByteArray);

- , Util.convertFromByteArrayToString(byte [] bytearray);. , , ?

+5
1

, , ( , ), : http://www.vogella.com/articles/Eclipse/article.html#tips_completion

someByteArray Ctrl Delete 3 ( ) Ctrl Backspace 3 ( ). Utils , , ( Eclipse , ).

, , .

+3

All Articles