mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-183660 Quick doc on a link
This commit is contained in:
@@ -11,7 +11,6 @@ import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.openapi.util.Computable;
|
||||
import com.intellij.psi.*;
|
||||
import com.intellij.psi.javadoc.PsiDocTag;
|
||||
import com.intellij.psi.javadoc.PsiDocToken;
|
||||
import com.intellij.psi.search.LocalSearchScope;
|
||||
import com.intellij.psi.search.SearchScope;
|
||||
import com.intellij.psi.search.searches.ClassInheritorsSearch;
|
||||
@@ -104,8 +103,8 @@ public class JavaTargetElementEvaluator extends TargetElementEvaluatorEx2 implem
|
||||
@Override
|
||||
@NotNull
|
||||
public ThreeState isAcceptableReferencedElement(@NotNull final PsiElement element, final PsiElement referenceOrReferencedElement) {
|
||||
if (referenceOrReferencedElement instanceof SyntheticElement) return ThreeState.NO;
|
||||
if (isEnumConstantReference(element, referenceOrReferencedElement)) return ThreeState.NO;
|
||||
if (element instanceof PsiDocToken) return ThreeState.NO;
|
||||
return super.isAcceptableReferencedElement(element, referenceOrReferencedElement);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<html><head><base href="placeholder"> <style type="text/css"> #error { background-color: #eeeeee; margin-bottom: 10px; } p { margin: 5px 0; } </style></head><body><PRE>int <b>i</b></PRE><DD><code>i</code> - input</body></html>
|
||||
@@ -0,0 +1,6 @@
|
||||
class C {
|
||||
/**
|
||||
* @param <caret>i input
|
||||
*/
|
||||
void m(int i) {}
|
||||
}
|
||||
+2
@@ -409,6 +409,8 @@ public class JavaDocInfoGeneratorTest extends CodeInsightTestCase {
|
||||
|
||||
public void testCaretAtLinkInJavadoc() throws Exception { doTestAtCaret(); }
|
||||
|
||||
public void testParamInJavadoc() throws Exception { doTestAtCaret(); }
|
||||
|
||||
private void doTestAtCaret() throws Exception {
|
||||
configureByFile();
|
||||
String docInfo = JavaExternalDocumentationTest.getDocumentationText(myFile, myEditor.getCaretModel().getOffset());
|
||||
|
||||
Reference in New Issue
Block a user