mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-130773 Shorten inferred org.jetbrains.annotations.Nullable/NotNull names in javadoc
This commit is contained in:
@@ -740,7 +740,11 @@ public class JavaDocInfoGenerator {
|
||||
if (inferred) buffer.append("<i>");
|
||||
final PsiClassType type = JavaPsiFacade.getInstance(manager.getProject()).getElementFactory().createType(annotationType, PsiSubstitutor.EMPTY);
|
||||
buffer.append("@");
|
||||
generateType(buffer, type, owner, generateLink);
|
||||
if (inferred && !generateLink) {
|
||||
buffer.append(type.getPresentableText());
|
||||
} else {
|
||||
generateType(buffer, type, owner, generateLink);
|
||||
}
|
||||
final PsiNameValuePair[] attributes = annotation.getParameterList().getAttributes();
|
||||
if (attributes.length > 0) {
|
||||
buffer.append("(");
|
||||
@@ -778,9 +782,11 @@ public class JavaDocInfoGenerator {
|
||||
}
|
||||
} else if (external) {
|
||||
if (inferred) buffer.append("<i>");
|
||||
buffer.append(XmlStringUtil.escapeString(annotation.getText()));
|
||||
buffer.append(" ");
|
||||
String annoText = inferred ? "@" + annotation.getNameReferenceElement().getReferenceName() + annotation.getParameterList().getText()
|
||||
: annotation.getText();
|
||||
buffer.append(XmlStringUtil.escapeString(annoText));
|
||||
if (inferred) buffer.append("</i>");
|
||||
buffer.append(" ");
|
||||
}
|
||||
else {
|
||||
buffer.append("<font color=red>");
|
||||
|
||||
+1
-1
@@ -132,7 +132,7 @@ public class BytecodeAnalysisIntegrationTest extends JavaCodeInsightFixtureTestC
|
||||
public void testInferredAnnoGutter() {
|
||||
setUpLibraries();
|
||||
openDecompiledClass("org.apache.velocity.util.ExceptionUtils");
|
||||
checkHasGutter("<i>@org.jetbrains.annotations.Contract("null,_,_->null")</i>");
|
||||
checkHasGutter("<i>@Contract("null,_,_->null")</i>");
|
||||
}
|
||||
|
||||
public void testExternalAnnoGutter() {
|
||||
|
||||
Reference in New Issue
Block a user