I tried to send an image but it failed.

The configuration is at: Tools -> Options -> Editor -> Formatting

Set the Language to "Java" and Category to "Wrapping"

To set one variable per line set the "Try Resources" option to "Always"


On 2024/04/10 09:17:16 Francesco Chicchiriccò wrote:
> Hi there,
> possibly a silly question: how can I convince Netbeans 21 to format like as 
> following:
> 
>          try (InputStream propStream = 
> getClass().getResourceAsStream("/test.properties");
>                  InputStream srcStream = new 
> FileInputStream(props.getProperty("test.csv.src"));
>                  FileOutputStream dstStream = new 
> FileOutputStream(props.getProperty("test.csv.dst"))) {
> 
> e.g. one variable per line, while it keeps rearranging as:
> 
>          try (InputStream propStream = 
> getClass().getResourceAsStream("/test.properties"); InputStream srcStream =
>                  new FileInputStream(props.getProperty("test.csv.src")); 
> FileOutputStream dstStream =
>                  new FileOutputStream(props.getProperty("test.csv.dst"))) {
> 
> ?
> 
> TIA
> Regards.
> 
> -- 
> Francesco Chicchiriccò
> 
> Tirasa - Open Source Excellence
> http://www.tirasa.net/
> 
> Member at The Apache Software Foundation
> Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
> http://home.apache.org/~ilgrosso/
> 
> 
> ---------------------------------------------------------------------
> 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
> 
> 

-- 
Sent with Vivaldi Mail. Download Vivaldi for free at vivaldi.com

---------------------------------------------------------------------
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