mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
javadoc: remove indentation for throws list
This commit is contained in:
@@ -78,6 +78,7 @@ public class JavaDocInfoGenerator {
|
||||
private static final String VALUE_TAG = "value";
|
||||
private static final String LT = "<";
|
||||
private static final String GT = ">";
|
||||
private static final String NBSP = " ";
|
||||
|
||||
private static final Pattern ourWhitespaces = Pattern.compile("[ \\n\\r\\t]+");
|
||||
private static final Pattern ourRelativeHtmlLinks = Pattern.compile("<A.*?HREF=\"([^\":]*)\"", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);
|
||||
@@ -877,7 +878,7 @@ public class JavaDocInfoGenerator {
|
||||
for (AnnotationDocGenerator anno : AnnotationDocGenerator.getAnnotationsToShow(owner)) {
|
||||
anno.generateAnnotation(buffer, format);
|
||||
|
||||
buffer.append(" ");
|
||||
buffer.append(NBSP);
|
||||
if (splitAnnotations) buffer.append("\n");
|
||||
}
|
||||
}
|
||||
@@ -1084,7 +1085,7 @@ public class JavaDocInfoGenerator {
|
||||
int indent = 0;
|
||||
if (!modifiers.isEmpty()) {
|
||||
buffer.append(modifiers);
|
||||
buffer.append(" ");
|
||||
buffer.append(NBSP);
|
||||
indent += modifiers.length() + 1;
|
||||
}
|
||||
|
||||
@@ -1092,13 +1093,13 @@ public class JavaDocInfoGenerator {
|
||||
indent += StringUtil.unescapeXml(StringUtil.stripHtml(typeParamsString, true)).length();
|
||||
if (!typeParamsString.isEmpty()) {
|
||||
buffer.append(typeParamsString);
|
||||
buffer.append(" ");
|
||||
buffer.append(NBSP);
|
||||
indent++;
|
||||
}
|
||||
|
||||
if (method.getReturnType() != null) {
|
||||
indent += generateType(buffer, method.getReturnType(), method, generateLink, useShortNames);
|
||||
buffer.append(" ");
|
||||
buffer.append(NBSP);
|
||||
indent++;
|
||||
}
|
||||
buffer.append("<b>");
|
||||
@@ -1114,7 +1115,7 @@ public class JavaDocInfoGenerator {
|
||||
PsiParameter parm = parameters[i];
|
||||
generateAnnotations(buffer, parm, place, false);
|
||||
generateType(buffer, parm.getType(), method, generateLink, useShortNames);
|
||||
buffer.append(" ");
|
||||
buffer.append(NBSP);
|
||||
if (parm.getName() != null) {
|
||||
buffer.append(parm.getName());
|
||||
}
|
||||
@@ -1128,20 +1129,13 @@ public class JavaDocInfoGenerator {
|
||||
PsiClassType[] refs = method.getThrowsList().getReferencedTypes();
|
||||
if (refs.length > 0) {
|
||||
buffer.append("\n");
|
||||
indent -= THROWS_KEYWORD.length() + 1;
|
||||
for (int i = 0; i < indent; i++) {
|
||||
buffer.append(" ");
|
||||
}
|
||||
indent += THROWS_KEYWORD.length() + 1;
|
||||
buffer.append(THROWS_KEYWORD);
|
||||
buffer.append(" ");
|
||||
buffer.append(NBSP);
|
||||
for (int i = 0; i < refs.length; i++) {
|
||||
generateLink(buffer, useShortNames ? refs[i].getPresentableText() : refs[i].getCanonicalText(), null, method, false);
|
||||
if (i < refs.length - 1) {
|
||||
buffer.append(",\n");
|
||||
for (int j = 0; j < indent; j++) {
|
||||
buffer.append(" ");
|
||||
}
|
||||
buffer.append(",")
|
||||
.append(NBSP);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
<div class='definition'><pre><a href="psi_element://Idea4780"><code>Idea4780</code></a><br>public <a href="psi_element://java.lang.Object"><code>Object</code></a> <b>read</b>()
|
||||
throws <a href="psi_element://java.io.IOException"><code>IOException</code></a></pre></div><table class='sections'><p><tr><td valign='top' class='section'><p>Throws:</td><td><p><a href="psi_element://java.io.IOException"><code>IOException</code></a> – if an I/O error occurs while reading. <p><a href="psi_element://java.io.EOFException"><code>EOFException</code></a> – if this source is already closed when the <code>read()</code> is called, or is closed during the <code>read()</code>. <p><font color=red>InterruptedIOException</font> – if the reading thread is interrupted.</td></table>
|
||||
throws <a href="psi_element://java.io.IOException"><code>IOException</code></a></pre></div><table class='sections'><p><tr><td valign='top' class='section'><p>Throws:</td><td><p><a href="psi_element://java.io.IOException"><code>IOException</code></a> – if an I/O error occurs while reading. <p><a href="psi_element://java.io.EOFException"><code>EOFException</code></a> – if this source is already closed when the <code>read()</code> is called, or is closed during the <code>read()</code>. <p><font color=red>InterruptedIOException</font> – if the reading thread is interrupted.</td></table>
|
||||
@@ -1,2 +1,2 @@
|
||||
<div class='definition'><pre><a href="psi_element://InheritedDocInThrows"><code>InheritedDocInThrows</code></a><br>void <b>foo</b>()
|
||||
throws <a href="psi_element://java.io.IOException"><code>IOException</code></a></pre></div><table class='sections'><p><tr><td valign='top' class='section'><p>Overrides:</td><td><p><a href="psi_element://A#foo()"><code>foo</code></a> in class <a href="psi_element://A"><code>A</code></a></td><tr><td valign='top' class='section'><p>Throws:</td><td><p><a href="psi_element://java.io.IOException"><code>IOException</code></a> – la-la-la</td></table>
|
||||
throws <a href="psi_element://java.io.IOException"><code>IOException</code></a></pre></div><table class='sections'><p><tr><td valign='top' class='section'><p>Overrides:</td><td><p><a href="psi_element://A#foo()"><code>foo</code></a> in class <a href="psi_element://A"><code>A</code></a></td><tr><td valign='top' class='section'><p>Throws:</td><td><p><a href="psi_element://java.io.IOException"><code>IOException</code></a> – la-la-la</td></table>
|
||||
@@ -1,2 +1,2 @@
|
||||
<div class='definition'><pre><a href="psi_element://InheritedDocInThrows1"><code>InheritedDocInThrows1</code></a><br>void <b>foo</b>()
|
||||
throws <a href="psi_element://java.io.IOException"><code>IOException</code></a></pre></div><table class='sections'><p><tr><td valign='top' class='section'><p>Overrides:</td><td><p><a href="psi_element://A#foo()"><code>foo</code></a> in class <a href="psi_element://A"><code>A</code></a></td><tr><td valign='top' class='section'><p>Throws:</td><td><p><a href="psi_element://java.io.IOException"><code>IOException</code></a> – comment</td></table>
|
||||
throws <a href="psi_element://java.io.IOException"><code>IOException</code></a></pre></div><table class='sections'><p><tr><td valign='top' class='section'><p>Overrides:</td><td><p><a href="psi_element://A#foo()"><code>foo</code></a> in class <a href="psi_element://A"><code>A</code></a></td><tr><td valign='top' class='section'><p>Throws:</td><td><p><a href="psi_element://java.io.IOException"><code>IOException</code></a> – comment</td></table>
|
||||
@@ -1,3 +1,3 @@
|
||||
<div class='definition'><pre><a href="psi_element://Producer"><code>Producer<T></code></a><br><E extends <a href="psi_element://java.lang.Exception"><code>Exception</code></a>> void <b>drainTo</b>(<a href="psi_element://Consumer"><code>Consumer</code></a><? super T, E> consumer,
|
||||
<a href="psi_element://java.lang.Object"><code>Object</code></a> someParameter)
|
||||
throws <a href="psi_element://E"><code>E</code></a></pre></div><table class='sections'><p><tr><td valign='top' class='section'><p>Throws:</td><td><p><a href="psi_element://E"><code>E</code></a></td></table>
|
||||
throws <a href="psi_element://E"><code>E</code></a></pre></div><table class='sections'><p><tr><td valign='top' class='section'><p>Throws:</td><td><p><a href="psi_element://E"><code>E</code></a></td></table>
|
||||
Reference in New Issue
Block a user