Files
openide/java/java-impl/resources/inspectionDescriptions/TextBlockMigration.html
Leonid Shalupov 40795fe787 IJI-2422: community/java: move resources under resources root
GitOrigin-RevId: 8b2b63fc6db476ca0c2cfe5cadd84db6c4236d0f
2025-02-05 04:43:28 +00:00

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 = "&lt;html&gt;\n" +
" &lt;body&gt;\n" +
" &lt;p&gt;Hello, world&lt;/p&gt;\n" +
" &lt;/body&gt;\n" +
"&lt;/html&gt;\n";
</code></pre>
<p>After the quick-fix is applied:</p>
<pre><code>
String html = """
&lt;html&gt;
&lt;body&gt;
&lt;p&gt;Hello, world&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;
""";
</code></pre>
<!-- tooltip end -->
<p><small>New in 2019.3</small></p>
</body>
</html>