mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
34 lines
1.0 KiB
HTML
34 lines
1.0 KiB
HTML
<html>
|
|
<body>
|
|
Reports <code>String</code> concatenations that can be simplified by replacing them with text blocks.
|
|
<p>Requirements:</p>
|
|
<ul>
|
|
<li><code>\n</code> occurs two or more times.</li>
|
|
<li>Text blocks are not concatenated.</li>
|
|
</ul>
|
|
<p>
|
|
Use the <b>Report single string literals</b> option to highlight single literals containing line breaks.
|
|
The quick-fix will still be available even when this option is disabled.
|
|
<p>
|
|
<p><b>Example:</b></p>
|
|
<pre><code>
|
|
String html = "<html>\n" +
|
|
" <body>\n" +
|
|
" <p>Hello, world</p>\n" +
|
|
" </body>\n" +
|
|
"</html>\n";
|
|
</code></pre>
|
|
<p>After the quick-fix is applied:</p>
|
|
<pre><code>
|
|
String html = """
|
|
<html>
|
|
<body>
|
|
<p>Hello, world</p>
|
|
</body>
|
|
</html>
|
|
""";
|
|
</code></pre>
|
|
<!-- tooltip end -->
|
|
<p><small>New in 2019.3</small></p>
|
|
</body>
|
|
</html> |