[java] support java 16+ external documentation format (IDEA-272488)

GitOrigin-RevId: 33b65d2f06e791b5c2be2735d738c0ba5c8e3972
This commit is contained in:
Anna Kozlova
2021-06-30 14:01:15 +00:00
committed by intellij-monorepo-bot
parent 3eed2ef1e1
commit 9746172003
4 changed files with 4880 additions and 4 deletions
@@ -0,0 +1,43 @@
<HTML><style type="text/css"> ul.inheritance {
margin:0;
padding:0;
}
ul.inheritance li {
display:inline;
list-style-type:none;
}
ul.inheritance li ul.inheritance {
margin-left:15px;
padding-left:15px;
padding-top:1px;
}
</style> <section class="detail" id="toLowerCase()">
<h3>toLowerCase</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="String.html"
title="class in java.lang">String</a></span>&nbsp;<span
class="element-name">toLowerCase</span>()
</div>
<div class="block">Converts all of the characters in this <code>String</code> to lower
case using the rules of the default locale. This is equivalent to calling
<code>toLowerCase(Locale.getDefault())</code>.
<p>
<b>Note:</b> This method is locale sensitive, and may produce unexpected
results if used for strings that are intended to be interpreted locale
independently.
Examples are programming language identifiers, protocol keys, and HTML
tags.
For instance, <code>"TITLE".toLowerCase()</code> in a Turkish locale
returns <code>"t\u0131tle"</code>, where '\u0131' is the
LATIN SMALL LETTER DOTLESS I character.
To obtain correct results for locale insensitive strings, use
<code>toLowerCase(Locale.ROOT)</code>.</p></div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the <code>String</code>, converted to lowercase.</dd>
<dt>See Also:</dt>
<dd><a href="#toLowerCase(java.util.Locale)"><code>toLowerCase(Locale)</code></a></dd>
</dl>
</section>
</li>
<li>
</HTML>
File diff suppressed because it is too large Load Diff
@@ -1,4 +1,4 @@
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.java.codeInsight.javadoc;
import com.intellij.JavaTestUtil;
@@ -31,6 +31,7 @@ public class ExternalJavadocPresentationTest extends LightJavaCodeInsightTestCas
public void testToLowerCase() {
doTest("lang/String.html#toLowerCase()", "String/7/page.html", "String/7/expectedToLowerCase.html");
doTest("lang/String.html#toLowerCase()", "String/6/page.html", "String/6/expectedToLowerCase.html");
doTest("lang/String.html#toLowerCase()", "String/16/page.html", "String/16/expectedToLowerCase.html");
}
public void testInvalidJavadoc() {
@@ -1,4 +1,4 @@
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.codeInsight.documentation;
import com.intellij.ide.BrowserUtil;
@@ -33,7 +33,7 @@ public abstract class AbstractExternalFilter {
private static final Pattern CLASS_DATA_START = Pattern.compile("START OF CLASS DATA", Pattern.CASE_INSENSITIVE);
private static final Pattern CLASS_DATA_END = Pattern.compile("SUMMARY ========", Pattern.CASE_INSENSITIVE);
private static final Pattern NON_CLASS_DATA_END = Pattern.compile("<A (NAME|ID)=", Pattern.CASE_INSENSITIVE);
private static final Pattern NON_CLASS_DATA_END = Pattern.compile(" (NAME|ID)=", Pattern.CASE_INSENSITIVE);
private static final Pattern ANNIHILATOR = Pattern.compile("/[^/^.]*/[.][.]/");
private static final Pattern CHARSET_META = Pattern.compile("<meta[^>]+\\s*charset=\"?([\\w\\-]*)\\s*\">", Pattern.CASE_INSENSITIVE);
@@ -279,7 +279,7 @@ public abstract class AbstractExternalFilter {
Matcher anchorMatcher = ourAnchorSuffix.matcher(url);
if (anchorMatcher.find()) {
anchorPresent = true;
startSection = Pattern.compile("<a (name|id)=\"" + Pattern.quote(StringUtil.escapeXmlEntities(anchorMatcher.group(1))) + "\"",
startSection = Pattern.compile(" (name|id)=\"" + Pattern.quote(StringUtil.escapeXmlEntities(anchorMatcher.group(1))) + "\"",
Pattern.CASE_INSENSITIVE);
endSection = NON_CLASS_DATA_END;
}