Thanks John, that was the trick, getting cursor the first line and
Alt+Enter do the thing

[image: resim.png]

On Wed, Oct 2, 2019 at 12:09 PM John Mc <mcdonnell.j...@gmail.com> wrote:

> What happens when you put your cursor on the first line?  Do you get a
> hint in the left hand margin of the editor? This should do the same thing,
> creating a return variable.
>
>
>
> On Wed, 2 Oct 2019 at 04:17, Sahin gülci <sahingu...@gmail.com> wrote:
>
>> Hi Emilian,
>>
>> I deleted the collect line but it is same, for you to try below is BEFORE
>> :
>>
>> List<String> myList =
>>            Arrays.asList("a1", "a2", "b1", "c2", "c1");
>>
>>         myList
>>            .stream()
>>            .filter(s -> s.startsWith("c"))
>>            .map(String::toUpperCase)
>>            .sorted()
>>            .collect(Collectors.toList());
>>
>> AFTER should be :
>>
>>
>>         List<String> myList =
>>            Arrays.asList("a1", "a2", "b1", "c2", "c1");
>>
>>         List<String> collect2 = myList
>>            .stream()
>>            .filter(s -> s.startsWith("c"))
>>            .map(String::toUpperCase)
>>            .sorted()
>>            .collect(Collectors.toList());
>>
>>
>> On Tue, Oct 1, 2019 at 11:23 PM Emilian Bold <emilian.b...@gmail.com>
>> wrote:
>>
>>> Why does the collect call underneath your selection have the red
>>> underline? Seem there is something unparseable about the source code which
>>> might interfere with your refactoring too.
>>>
>>> --emi
>>>
>>> mar., 1 oct. 2019, 23:12 Sahin gülci <sahingu...@gmail.com> a scris:
>>>
>>>> Hi All,
>>>>
>>>> When I try extract local variable from simple stream, it says invalid
>>>> selection but same code on Intellij and Eclipse create a local variable.
>>>> How can I extract local variable ?
>>>>
>>>> picture on the attachments
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
>>>> For additional commands, e-mail: users-h...@netbeans.apache.org
>>>>
>>>> For further information about the NetBeans mailing lists, visit:
>>>> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>>>
>>>

Reply via email to