You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Erik (Jira)" <ji...@apache.org> on 2020/12/29 10:40:00 UTC

[jira] [Updated] (NETBEANS-5193) Improved formatting for nested streams

     [ https://issues.apache.org/jira/browse/NETBEANS-5193?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Erik updated NETBEANS-5193:
---------------------------
    Description: 
 

I find it difficult to work with nested streams and would appreciate more help from code formatting.

This is the current behavior:
{code:java}
IntStream.range(0, 10)
        .forEach(i -> IntStream.range(0, 10)
        .forEach(j -> System.out.println("i, j: " + i + ", " + j)));{code}
Note that nesting is unaccounted for.

These are examples of behaviors that would be more useful to me:
{code:java}
IntStream.range(0, 10)
        .forEach(i -> IntStream.range(0, 10)
               .forEach(j -> System.out.println("i, j: " + i + ", " + j)));{code}
{code:java}
IntStream.range(0, 10)
 .forEach(i -> IntStream.range(0, 10)
   .forEach(j -> System.out.println("i, j: " + i + ", " + j)));
{code}
{code:java}
IntStream.range(0, 10)
        .forEach(i -> IntStream.range(0, 10)
                              .forEach(j -> System.out.println("i, j: " + i + ", " + j)));
{code}
Note that nesting has been accounted for.

If I had to pick one then maybe I would prefer the second example.

 

 

  was:
 

I find it difficult to work with nested streams and would appreciate more help from code formatting.

This is the current behavior:
{code:java}
IntStream.range(0, 10)
        .forEach(i -> IntStream.range(0, 10)
        .forEach(j -> System.out.println("i, j: " + i + ", " + j)));{code}
Note that nesting is unaccounted for.

These are examples of behaviors that would be more useful to me:

 
{code:java}
IntStream.range(0, 10)
        .forEach(i -> IntStream.range(0, 10)
               .forEach(j -> System.out.println("i, j: " + i + ", " + j)));{code}
{code:java}
IntStream.range(0, 10)
 .forEach(i -> IntStream.range(0, 10)
   .forEach(j -> System.out.println("i, j: " + i + ", " + j)));
{code}
{code:java}
IntStream.range(0, 10)
        .forEach(i -> IntStream.range(0, 10)
                              .forEach(j -> System.out.println("i, j: " + i + ", " + j)));
{code}
Note that nesting has been accounted for.

If I had to pick one then maybe I would prefer the second example.

 

 


> Improved formatting for nested streams
> --------------------------------------
>
>                 Key: NETBEANS-5193
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-5193
>             Project: NetBeans
>          Issue Type: Wish
>          Components: java - Editor
>    Affects Versions: 12.2
>            Reporter: Erik
>            Priority: Major
>
>  
> I find it difficult to work with nested streams and would appreciate more help from code formatting.
> This is the current behavior:
> {code:java}
> IntStream.range(0, 10)
>         .forEach(i -> IntStream.range(0, 10)
>         .forEach(j -> System.out.println("i, j: " + i + ", " + j)));{code}
> Note that nesting is unaccounted for.
> These are examples of behaviors that would be more useful to me:
> {code:java}
> IntStream.range(0, 10)
>         .forEach(i -> IntStream.range(0, 10)
>                .forEach(j -> System.out.println("i, j: " + i + ", " + j)));{code}
> {code:java}
> IntStream.range(0, 10)
>  .forEach(i -> IntStream.range(0, 10)
>    .forEach(j -> System.out.println("i, j: " + i + ", " + j)));
> {code}
> {code:java}
> IntStream.range(0, 10)
>         .forEach(i -> IntStream.range(0, 10)
>                               .forEach(j -> System.out.println("i, j: " + i + ", " + j)));
> {code}
> Note that nesting has been accounted for.
> If I had to pick one then maybe I would prefer the second example.
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists