generators = getSignatureNonCodeAnnotations(myOwner);
- if (generators.isEmpty()) return;
-
- myOutput.append(DocumentationMarkup.SECTION_HEADER_START);
- myOutput.append(getNonCodeHeader(generators.values())).append(":");
- myOutput.append(DocumentationMarkup.SECTION_SEPARATOR);
-
- generators.keySet().forEach(owner -> {
- myOutput.append("");
- if (generators.size() > 1) {
- myOutput.append(getKind(owner)).append(" ").append(((PsiNamedElement)owner).getName()).append(": ").append("
");
- }
- List annotations = new ArrayList<>(generators.get(owner));
- for (int i = 0; i < annotations.size(); i++) {
- if (i > 0) myOutput.append("
");
- annotations.get(i).generateAnnotation(myOutput, AnnotationFormat.JavaDocComplete, true, isForRenderedFoc, doSyntaxHighlighting);
- }
- });
- myOutput.append(DocumentationMarkup.SECTION_END);
- }
@NotNull
public static MultiMap getSignatureNonCodeAnnotations(PsiModifierListOwner owner) {
@@ -72,20 +39,6 @@ public class NonCodeAnnotationGenerator {
return allOwners;
}
- @NotNull
- public static @Nls String getNonCodeHeader(Collection values) {
- boolean hasExternal = values.stream().anyMatch(AnnotationDocGenerator::isExternal);
- boolean hasInferred = values.stream().anyMatch(AnnotationDocGenerator::isInferred);
-
- if (hasExternal && hasInferred) {
- return JavaBundle.message("non.code.annotations.explanation.external.and.inferred");
- }
- if (hasExternal) {
- return JavaBundle.message("non.code.annotations.explanation.external");
- }
- return JavaBundle.message("non.code.annotations.explanation.inferred");
- }
-
@NotNull
public static @Nls String getNonCodeHeaderAvalable(Collection values) {
boolean hasExternal = values.stream().anyMatch(AnnotationDocGenerator::isExternal);
@@ -99,8 +52,4 @@ public class NonCodeAnnotationGenerator {
}
return JavaBundle.message("non.code.annotations.explanation.inferred.available");
}
-
- private static String getKind(PsiModifierListOwner owner) {
- return StringUtil.capitalize(JavaElementKind.fromElement(owner).subject());
- }
}
diff --git a/java/java-tests/testData/codeInsight/javadocIG/documentationForJdkClassWithReferencesToClassesFromJavaLang.html b/java/java-tests/testData/codeInsight/javadocIG/documentationForJdkClassWithReferencesToClassesFromJavaLang.html
index 47b52ecf1cf5..ec89e92939c1 100644
--- a/java/java-tests/testData/codeInsight/javadocIG/documentationForJdkClassWithReferencesToClassesFromJavaLang.html
+++ b/java/java-tests/testData/codeInsight/javadocIG/documentationForJdkClassWithReferencesToClassesFromJavaLang.html
@@ -1,8 +1,8 @@
-@Contract(pure = true)
+
Returns true if this list contains the specified element.
More formally, returns true if and only if this list contains
at least one element e such that
(o==null ? e==null : o.equals(e)).
-
< java 1.7 >
\ No newline at end of file
+
Overrides: | contains in interface Collection
|
Params: | o – element whose presence in this list is to be tested |
Returns: | true if this list contains the specified element |
Throws: | ClassCastException – if the type of the specified element is incompatible with this list (optional)
NullPointerException – if the specified element is null and this list does not permit null elements (optional)
|
< java 1.7 >
\ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/javadocIG/documentationForUncheckedExceptionsInSupers.html b/java/java-tests/testData/codeInsight/javadocIG/documentationForUncheckedExceptionsInSupers.html
index e7e074560763..c24bef6d4258 100644
--- a/java/java-tests/testData/codeInsight/javadocIG/documentationForUncheckedExceptionsInSupers.html
+++ b/java/java-tests/testData/codeInsight/javadocIG/documentationForUncheckedExceptionsInSupers.html
@@ -1,4 +1,4 @@
-@Contract(pure = true)
+
From interface: | java.util.Collection
Returns true if this collection contains the specified element.
@@ -6,4 +6,4 @@
contains at least one element e such that
(o==null ? e==null : o.equals(e)).
-
|
Overrides: | contains in interface Collection
contains in interface I
|
Params: | o – element whose presence in this collection is to be tested |
Returns: | true if this collection contains the specified element |
Throws: | NullPointerException – before if the specified element is null and this collection does not permit null elements (optional) after
IOException |
Inferred annotations: | @org.jetbrains.annotations.Contract(pure = true) |
\ No newline at end of file
+
Overrides: | contains in interface Collection
contains in interface I
|
Params: | o – element whose presence in this collection is to be tested |
Returns: | true if this collection contains the specified element |
Throws: | NullPointerException – before if the specified element is null and this collection does not permit null elements (optional) after
IOException |
\ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/javadocIG/enumValueOf.html b/java/java-tests/testData/codeInsight/javadocIG/enumValueOf.html
index 319f73e8e2d1..f7d3a7318163 100644
--- a/java/java-tests/testData/codeInsight/javadocIG/enumValueOf.html
+++ b/java/java-tests/testData/codeInsight/javadocIG/enumValueOf.html
@@ -1,4 +1,4 @@
-@Contract(value = "_ -> param1", pure = true)
+@Contract(value = "_ -> param1", pure = true)
static int valueOf(
int i
)
myjavadoc
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/javadocIG/inheritedParameter.html b/java/java-tests/testData/codeInsight/javadocIG/inheritedParameter.html
index 52c30bb32a6b..bc8412328af0 100644
--- a/java/java-tests/testData/codeInsight/javadocIG/inheritedParameter.html
+++ b/java/java-tests/testData/codeInsight/javadocIG/inheritedParameter.html
@@ -1 +1 @@
-s – String parameter.
\ No newline at end of file
+s – String parameter.
\ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/javadocIG/lambdaParameter.html b/java/java-tests/testData/codeInsight/javadocIG/lambdaParameter.html
index 28a798b75f01..e6304f2b0ef7 100644
--- a/java/java-tests/testData/codeInsight/javadocIG/lambdaParameter.html
+++ b/java/java-tests/testData/codeInsight/javadocIG/lambdaParameter.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/javadocIG/syntheticEnumValues.html b/java/java-tests/testData/codeInsight/javadocIG/syntheticEnumValues.html
index 035a15ea6924..cccc21a73e43 100644
--- a/java/java-tests/testData/codeInsight/javadocIG/syntheticEnumValues.html
+++ b/java/java-tests/testData/codeInsight/javadocIG/syntheticEnumValues.html
@@ -1,4 +1,4 @@
-@Contract(value = " -> new", pure = true)
+@Contract(value = " -> new", pure = true)
public static E[] values()
Returns an array containing the constants of this enum
type, in the order they're declared. This method may be
@@ -8,4 +8,4 @@
System.out.println(c);
-
Returns: | an array containing the constants of this enum type, in the order they're declared |
Inferred annotations: | @org.jetbrains.annotations.Contract(value = " -> new", pure = true) |
\ No newline at end of file
+
Returns: | an array containing the constants of this enum type, in the order they're declared |
\ No newline at end of file
diff --git a/java/java-tests/testSrc/com/intellij/java/codeInspection/bytecodeAnalysis/BytecodeAnalysisIntegrationTest.java b/java/java-tests/testSrc/com/intellij/java/codeInspection/bytecodeAnalysis/BytecodeAnalysisIntegrationTest.java
index 0795e252b5d8..e740ebef252b 100644
--- a/java/java-tests/testSrc/com/intellij/java/codeInspection/bytecodeAnalysis/BytecodeAnalysisIntegrationTest.java
+++ b/java/java-tests/testSrc/com/intellij/java/codeInspection/bytecodeAnalysis/BytecodeAnalysisIntegrationTest.java
@@ -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-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.java.codeInspection.bytecodeAnalysis;
import com.intellij.codeInsight.AnnotationUtil;
@@ -106,7 +106,7 @@ public class BytecodeAnalysisIntegrationTest extends LightJavaCodeInsightFixture
checkHasGutter("org.apache.velocity.util.ExceptionUtils",
"Inferred annotations available. Full signature:\n" +
- "@Contract(\"null,_,_->null\") \n" +
+ "@Contract(\"null,_,_->null\") \n" +
"Throwable createWithCause(Class,\n" +
"String,\n" +
"Throwable)");
@@ -115,7 +115,7 @@ public class BytecodeAnalysisIntegrationTest extends LightJavaCodeInsightFixture
public void testExternalAnnoGutter() {
checkHasGutter("java.lang.String",
"External annotations available. Full signature:
\n" +
- "String(@NotNull char[],\n" +
+ "String(@NotNull char[],\n" +
"int,\n" +
"int)");
}
diff --git a/java/openapi/resources/messages/JavaBundle.properties b/java/openapi/resources/messages/JavaBundle.properties
index 50440c48ed6c..349c9f13ddc9 100644
--- a/java/openapi/resources/messages/JavaBundle.properties
+++ b/java/openapi/resources/messages/JavaBundle.properties
@@ -1598,11 +1598,8 @@ generate.members.implement.command=implement
code.style.settings.angle.spacing.brackets=Angle brackets
code.style.settings.spacing.after.closing.angle.bracket=After closing angle bracket
code.style.settings.spacing.around.type.bounds=Around type bounds
-non.code.annotations.explanation.external.and.inferred=External
and inferred
annotations
non.code.annotations.explanation.external.and.inferred.available=External and inferred annotations available.
-non.code.annotations.explanation.external=External
annotations
non.code.annotations.explanation.external.available=External annotations available.
-non.code.annotations.explanation.inferred=Inferred
annotations
non.code.annotations.explanation.inferred.available=Inferred annotations available.
non.code.annotations.explanation.full.signature=Full signature:
type.migration.command.name=TypeMigration
diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/GroovyDocumentationTest.groovy b/plugins/groovy/test/org/jetbrains/plugins/groovy/GroovyDocumentationTest.groovy
index deadd475c6e9..bda9b0f0341b 100644
--- a/plugins/groovy/test/org/jetbrains/plugins/groovy/GroovyDocumentationTest.groovy
+++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/GroovyDocumentationTest.groovy
@@ -1,4 +1,4 @@
-// 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.
+// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.plugins.groovy
import com.intellij.codeInsight.navigation.CtrlMouseHandler
@@ -102,7 +102,7 @@ aa
List ss = []
ss.collect { it }
''', '''\
-[Inferred type] String'''
+
[Inferred type] String'''
}
void 'test code tag'() {