diff --git a/java/java-impl/src/com/intellij/codeInsight/javadoc/JavaDocInfoGenerator.java b/java/java-impl/src/com/intellij/codeInsight/javadoc/JavaDocInfoGenerator.java index b8859046ebe7..742f42d88b45 100644 --- a/java/java-impl/src/com/intellij/codeInsight/javadoc/JavaDocInfoGenerator.java +++ b/java/java-impl/src/com/intellij/codeInsight/javadoc/JavaDocInfoGenerator.java @@ -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(""); @@ -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); } } } diff --git a/java/java-tests/testData/codeInsight/javadocIG/ideadev2326.html b/java/java-tests/testData/codeInsight/javadocIG/ideadev2326.html index d70b4f14ae91..01da2d7416ba 100644 --- a/java/java-tests/testData/codeInsight/javadocIG/ideadev2326.html +++ b/java/java-tests/testData/codeInsight/javadocIG/ideadev2326.html @@ -1,2 +1,2 @@
Idea4780
public Object read() - throws IOException

Throws:

IOException – if an I/O error occurs while reading.

EOFException – if this source is already closed when the read() is called, or is closed during the read().

InterruptedIOException – if the reading thread is interrupted.

\ No newline at end of file +throws IOException

Throws:

IOException – if an I/O error occurs while reading.

EOFException – if this source is already closed when the read() is called, or is closed during the read().

InterruptedIOException – if the reading thread is interrupted.

\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/javadocIG/inheritedDocInThrows.html b/java/java-tests/testData/codeInsight/javadocIG/inheritedDocInThrows.html index b3db1e5f83b3..8f6a029f183b 100644 --- a/java/java-tests/testData/codeInsight/javadocIG/inheritedDocInThrows.html +++ b/java/java-tests/testData/codeInsight/javadocIG/inheritedDocInThrows.html @@ -1,2 +1,2 @@
InheritedDocInThrows
void foo() - throws IOException

Overrides:

foo in class A

Throws:

IOException – la-la-la

\ No newline at end of file +throws IOException

Overrides:

foo in class A

Throws:

IOException – la-la-la

\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/javadocIG/inheritedDocInThrows1.html b/java/java-tests/testData/codeInsight/javadocIG/inheritedDocInThrows1.html index e88fbf9ff3c1..3830557fe8f0 100644 --- a/java/java-tests/testData/codeInsight/javadocIG/inheritedDocInThrows1.html +++ b/java/java-tests/testData/codeInsight/javadocIG/inheritedDocInThrows1.html @@ -1,2 +1,2 @@
InheritedDocInThrows1
void foo() - throws IOException

Overrides:

foo in class A

Throws:

IOException – comment

\ No newline at end of file +throws IOException

Overrides:

foo in class A

Throws:

IOException – comment

\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/javadocIG/methodFormatting.html b/java/java-tests/testData/codeInsight/javadocIG/methodFormatting.html index 83084db03eef..a416bee9bf1e 100644 --- a/java/java-tests/testData/codeInsight/javadocIG/methodFormatting.html +++ b/java/java-tests/testData/codeInsight/javadocIG/methodFormatting.html @@ -1,3 +1,3 @@
Producer<T>
<E extends Exception> void drainTo(Consumer<? super T, E> consumer, Object someParameter) - throws E

Throws:

E

\ No newline at end of file +throws E

Throws:

E

\ No newline at end of file