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

Zdeněk Machač updated NETBEANS-3589:
------------------------------------
    Description: 
Default format settings for operators in Java editor is on beginning of line. 
Rule is used e.g. for operator '+' on Strings - if Java code is reformatted or 
if string token is splitten to more lines by Enter key.
{code:java}
String str = "aaa"
   + "bbb";
{code}
 

But if you paste multiline string from clipboard into other string token 
(between "...") then operator '+' are generated on end of lines.
{code:java}
String str = "aaa";

then insert at end of string token (before last " char)

ccc
ccc

generate

String str = "aaaccc\n" +
"ccc";
{code}
 

In JDK 13 are multiline strings supported in another way but in JDK 8 or when 
appending variable value still need long strings splitted on multiple lines.

Best regards ZM

  was:
Default format settings for operators in Java editor is on beginning of line. 
Rule is used e.g. for operator '+' on Strings - if Java code is reformatted or 
if string token is splitten to more lines by Enter key.

But if you paste multiline string from clipboard into other string token 
(between "...") then operator '+' are generated on end of lines.

In JDK 13 are multiline strings supported in another way but in JDK 8 or when 
appending variable value still need long strings splitted on multiple lines.

Best regards ZM


> Inserting multiline string from clipboard into other string (between "...") 
> in Java Editor does not follow the format settings
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: NETBEANS-3589
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-3589
>             Project: NetBeans
>          Issue Type: Bug
>    Affects Versions: 8.2, 11.2
>            Reporter: Zdeněk Machač
>            Priority: Minor
>
> Default format settings for operators in Java editor is on beginning of line. 
> Rule is used e.g. for operator '+' on Strings - if Java code is reformatted 
> or if string token is splitten to more lines by Enter key.
> {code:java}
> String str = "aaa"
>    + "bbb";
> {code}
>  
> But if you paste multiline string from clipboard into other string token 
> (between "...") then operator '+' are generated on end of lines.
> {code:java}
> String str = "aaa";
> then insert at end of string token (before last " char)
> ccc
> ccc
> generate
> String str = "aaaccc\n" +
> "ccc";
> {code}
>  
> In JDK 13 are multiline strings supported in another way but in JDK 8 or when 
> appending variable value still need long strings splitted on multiple lines.
> Best regards ZM



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

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

Reply via email to