diff --git a/idea/src/org/jetbrains/kotlin/idea/KotlinQuickDocumentationProvider.kt b/idea/src/org/jetbrains/kotlin/idea/KotlinQuickDocumentationProvider.kt index 7ec9943858e..d3b6e66ccf3 100644 --- a/idea/src/org/jetbrains/kotlin/idea/KotlinQuickDocumentationProvider.kt +++ b/idea/src/org/jetbrains/kotlin/idea/KotlinQuickDocumentationProvider.kt @@ -160,31 +160,34 @@ class KotlinQuickDocumentationProvider : AbstractDocumentationProvider() { } var renderedDecl = DESCRIPTOR_RENDERER.render(declarationDescriptor) + if (!quickNavigation) { renderedDecl = "
$renderedDecl" } renderedDecl += renderDeprecationInfo(declarationDescriptor) - val comment = declarationDescriptor.findKDoc() - if (comment != null) { - val renderedComment = KDocRenderer.renderKDoc(comment) - if (renderedComment.startsWith("
")) { - renderedDecl += renderedComment + if (!quickNavigation) { + val comment = declarationDescriptor.findKDoc() + if (comment != null) { + val renderedComment = KDocRenderer.renderKDoc(comment) + if (renderedComment.startsWith("
")) {
+ renderedDecl += renderedComment
+ }
+ else {
+ renderedDecl = "$renderedDecl
$renderedComment"
+ }
}
else {
- renderedDecl = "$renderedDecl
$renderedComment"
- }
- }
- else {
- if (declarationDescriptor is CallableDescriptor) { // If we couldn't find KDoc, try to find javadoc in one of super's
- val psi = declarationDescriptor.findPsi() as? KtFunction
- if (psi != null) {
- val lightElement = LightClassUtil.getLightClassMethod(psi) // Light method for super's scan in javadoc info gen
- val javaDocInfoGenerator = JavaDocInfoGeneratorFactory.create(psi.project, lightElement)
- val builder = StringBuilder()
- if (javaDocInfoGenerator.generateDocInfoCore(builder, false))
- renderedDecl += builder.toString().substringAfter("") // Cut off light method signature
+ if (declarationDescriptor is CallableDescriptor) { // If we couldn't find KDoc, try to find javadoc in one of super's
+ val psi = declarationDescriptor.findPsi() as? KtFunction
+ if (psi != null) {
+ val lightElement = LightClassUtil.getLightClassMethod(psi) // Light method for super's scan in javadoc info gen
+ val javaDocInfoGenerator = JavaDocInfoGeneratorFactory.create(psi.project, lightElement)
+ val builder = StringBuilder()
+ if (javaDocInfoGenerator.generateDocInfoCore(builder, false))
+ renderedDecl += builder.toString().substringAfter("") // Cut off light method signature
+ }
}
}
}
diff --git a/idea/testData/editor/quickDoc/AtConstantWithUnderscore.kt b/idea/testData/editor/quickDoc/AtConstantWithUnderscore.kt
index 4c5cae454a8..81ca171d352 100644
--- a/idea/testData/editor/quickDoc/AtConstantWithUnderscore.kt
+++ b/idea/testData/editor/quickDoc/AtConstantWithUnderscore.kt
@@ -9,4 +9,4 @@ class C {
}
}
-//INFO: public final fun foo(): Unit defined in C
Use SOME_REFERENCED_VAL to do something
+//INFO:public final fun foo(): Unit defined in C
Use SOME_REFERENCED_VAL to do something
diff --git a/idea/testData/editor/quickDoc/AtFunctionParameter.kt b/idea/testData/editor/quickDoc/AtFunctionParameter.kt index ca67fda641b..1f21b8f1ebc 100644 --- a/idea/testData/editor/quickDoc/AtFunctionParameter.kt +++ b/idea/testData/editor/quickDoc/AtFunctionParameter.kt @@ -1,3 +1,3 @@ fun some(value-parameter f: (Int) → String defined in somediff --git a/idea/testData/editor/quickDoc/AtImplicitLambdaParameter.kt b/idea/testData/editor/quickDoc/AtImplicitLambdaParameter.kt index 5da8e91eb63..3f54784a958 100644 --- a/idea/testData/editor/quickDoc/AtImplicitLambdaParameter.kt +++ b/idea/testData/editor/quickDoc/AtImplicitLambdaParameter.kt @@ -4,4 +4,4 @@ fun foo() { } } -//INFO: value-parameter it: Int defined in foo.<anonymous> \ No newline at end of file +//INFO:
value-parameter it: Int defined in foo.<anonymous>diff --git a/idea/testData/editor/quickDoc/AtTypeParameter.kt b/idea/testData/editor/quickDoc/AtTypeParameter.kt index 7aa73d71d78..bb239791a0b 100644 --- a/idea/testData/editor/quickDoc/AtTypeParameter.kt +++ b/idea/testData/editor/quickDoc/AtTypeParameter.kt @@ -2,4 +2,4 @@ interface Base class Some<
<T : Base> defined in Somediff --git a/idea/testData/editor/quickDoc/AtVariableDeclaration.kt b/idea/testData/editor/quickDoc/AtVariableDeclaration.kt index 6eef2e9091f..0afad3aaad1 100644 --- a/idea/testData/editor/quickDoc/AtVariableDeclaration.kt +++ b/idea/testData/editor/quickDoc/AtVariableDeclaration.kt @@ -5,4 +5,4 @@ fun test() { } -//INFO: val test: String? defined in test +//INFO:
val test: String? defined in testdiff --git a/idea/testData/editor/quickDoc/ConstructorVarParameter.kt b/idea/testData/editor/quickDoc/ConstructorVarParameter.kt index 4b2fcf79fc4..e0550f31bc9 100644 --- a/idea/testData/editor/quickDoc/ConstructorVarParameter.kt +++ b/idea/testData/editor/quickDoc/ConstructorVarParameter.kt @@ -4,4 +4,4 @@ class C(var v: Int) { } } -//INFO: public final var v: Int defined in C +//INFO:
public final var v: Int defined in Cdiff --git a/idea/testData/editor/quickDoc/DeprecationWithReplaceInfo.kt b/idea/testData/editor/quickDoc/DeprecationWithReplaceInfo.kt index 0261aea5cf2..928f91b8693 100644 --- a/idea/testData/editor/quickDoc/DeprecationWithReplaceInfo.kt +++ b/idea/testData/editor/quickDoc/DeprecationWithReplaceInfo.kt @@ -3,4 +3,4 @@ fun
kek()@Deprecated public fun lol(): Unit defined in root package
kek()Code block:
+//INFO:public final class A<T> defined in root package
Code block:
//INFO:
//INFO: A<T>
//INFO: Code span: <T> is type parameter
val a = A()
+//INFO: public final class A defined in root package
val a = A()
//INFO: println(a) // comment
//INFO: <fenced>Code_block</fenced>
//INFO:
val b = B()
diff --git a/idea/testData/editor/quickDoc/JavaClassUsedInKotlin.kt b/idea/testData/editor/quickDoc/JavaClassUsedInKotlin.kt
index 110b681e276..f905d3ee993 100644
--- a/idea/testData/editor/quickDoc/JavaClassUsedInKotlin.kt
+++ b/idea/testData/editor/quickDoc/JavaClassUsedInKotlin.kt
@@ -2,4 +2,7 @@ fun testing() {
SomeClass>()
}
-//INFO: public constructor SomeClass<T : (<(raw) Any?><Any?>..<(raw) Any?><*>?)>()
Java declaration:
[light_idea_test_case] public class SomeClass<T extends java.util.List> extends Object
+//INFO: public class SomeClass<T extends List>
+//INFO: extends Object
+//INFO: Some Java Class
+//INFO: - Type parameters:
<T> -
diff --git a/idea/testData/editor/quickDoc/JavaDocFromOverridenClass.kt b/idea/testData/editor/quickDoc/JavaDocFromOverridenClass.kt
index 70ceeb3bf57..6d54330807d 100644
--- a/idea/testData/editor/quickDoc/JavaDocFromOverridenClass.kt
+++ b/idea/testData/editor/quickDoc/JavaDocFromOverridenClass.kt
@@ -4,6 +4,6 @@ class A : OverrideMe() {
}
-//INFO: protected open fun overrideMe(): Unit defined in A- Description copied from class:
OverrideMe
+//INFO: protected open fun overrideMe(): Unit defined in A
- Description copied from class:
OverrideMe
//INFO: Some comment
//INFO:
- Overrides:
overrideMe in class OverrideMe
diff --git a/idea/testData/editor/quickDoc/JavaDocFromOverridenInterface.kt b/idea/testData/editor/quickDoc/JavaDocFromOverridenInterface.kt
index b75eeb8e565..3581f116c53 100644
--- a/idea/testData/editor/quickDoc/JavaDocFromOverridenInterface.kt
+++ b/idea/testData/editor/quickDoc/JavaDocFromOverridenInterface.kt
@@ -4,6 +4,6 @@ class A : OverrideMe {
}
-//INFO: public open fun overrideMe(): Unit defined in A- Description copied from interface:
OverrideMe
+//INFO: public open fun overrideMe(): Unit defined in A
- Description copied from interface:
OverrideMe
//INFO: Some comment
//INFO:
- Specified by:
overrideMe in interface OverrideMe
diff --git a/idea/testData/editor/quickDoc/JavaMethodUsedInKotlin.kt b/idea/testData/editor/quickDoc/JavaMethodUsedInKotlin.kt
index a98e6526025..403f69fdefb 100644
--- a/idea/testData/editor/quickDoc/JavaMethodUsedInKotlin.kt
+++ b/idea/testData/editor/quickDoc/JavaMethodUsedInKotlin.kt
@@ -2,4 +2,6 @@ fun ktTest() {
Test.foo("SomeTest")
}
-//INFO: public open fun foo(param: String!): Array<(out) Any!>!
Java declaration:
Test...
+//INFO: Test@Contract(value = "_ -> !null", pure = true)
+//INFO: public static Object[] foo(String param)
+//INFO: Java Method
diff --git a/idea/testData/editor/quickDoc/KotlinClassUsedFromJava.java b/idea/testData/editor/quickDoc/KotlinClassUsedFromJava.java
index c01bbe787d9..ea3aea7edd6 100644
--- a/idea/testData/editor/quickDoc/KotlinClassUsedFromJava.java
+++ b/idea/testData/editor/quickDoc/KotlinClassUsedFromJava.java
@@ -6,4 +6,4 @@ class KotlinClassUsedFromJava {
}
}
-//INFO: public final class Test defined in testingSome comment
+//INFO: public final class Test defined in testing
Some comment
diff --git a/idea/testData/editor/quickDoc/KotlinPackageClassUsedFromJava.java b/idea/testData/editor/quickDoc/KotlinPackageClassUsedFromJava.java
index 3a5c38cb594..1471e1049a4 100644
--- a/idea/testData/editor/quickDoc/KotlinPackageClassUsedFromJava.java
+++ b/idea/testData/editor/quickDoc/KotlinPackageClassUsedFromJava.java
@@ -6,4 +6,5 @@ class KotlinPackageClassUsedFromJava {
}
}
-//INFO: [light_idea_test_case] testing...
+//INFO: testingpublic final class testing.KotlinPackageClassUsedFromJava_DataKt
+//INFO: extends Object
diff --git a/idea/testData/editor/quickDoc/MethodFromStdLib.kt b/idea/testData/editor/quickDoc/MethodFromStdLib.kt
index b1daded16be..ff448d6df98 100644
--- a/idea/testData/editor/quickDoc/MethodFromStdLib.kt
+++ b/idea/testData/editor/quickDoc/MethodFromStdLib.kt
@@ -2,4 +2,4 @@ fun test() {
listOf(1, 2, 4).filter { it > 0 }
}
-//INFO: public inline fun <T> Iterable<T>.filter(predicate: (T) → Boolean): List<T> defined in kotlin.collectionsReturns a list containing only elements matching the given predicate.
+//INFO: public inline fun <T> Iterable<T>.filter(predicate: (T) → Boolean): List<T> defined in kotlin.collections
Returns a list containing only elements matching the given predicate.
diff --git a/idea/testData/editor/quickDoc/OnClassDeclarationWithNoPackage.kt b/idea/testData/editor/quickDoc/OnClassDeclarationWithNoPackage.kt
index f906b1ed483..22390000ad0 100644
--- a/idea/testData/editor/quickDoc/OnClassDeclarationWithNoPackage.kt
+++ b/idea/testData/editor/quickDoc/OnClassDeclarationWithNoPackage.kt
@@ -3,4 +3,4 @@
*/
class Some
-//INFO: public final class Some defined in root packageUsefull comment
+//INFO: public final class Some defined in root package
Usefull comment
diff --git a/idea/testData/editor/quickDoc/OnFunctionDeclarationWithPackage.kt b/idea/testData/editor/quickDoc/OnFunctionDeclarationWithPackage.kt
index ebf8ec30ffe..7f0777db3ef 100644
--- a/idea/testData/editor/quickDoc/OnFunctionDeclarationWithPackage.kt
+++ b/idea/testData/editor/quickDoc/OnFunctionDeclarationWithPackage.kt
@@ -12,5 +12,5 @@ package test
*/
fun testFun(first: String, second: Int) = 12
-//INFO: public fun testFun(first: String, second: Int): Int defined in testTest function
+//INFO: public fun testFun(first: String, second: Int): Int defined in test
Test function
//INFO: - Parameters:
first - Somesecond - Other
diff --git a/idea/testData/editor/quickDoc/OnInheritedMethodUsage.kt b/idea/testData/editor/quickDoc/OnInheritedMethodUsage.kt
index 29586df5d8e..ceb71bce1fa 100644
--- a/idea/testData/editor/quickDoc/OnInheritedMethodUsage.kt
+++ b/idea/testData/editor/quickDoc/OnInheritedMethodUsage.kt
@@ -14,4 +14,4 @@ fun test() {
D().foo()
}
-//INFO: public open fun foo(): Int defined in DThis method returns zero.
+//INFO: public open fun foo(): Int defined in D
This method returns zero.
diff --git a/idea/testData/editor/quickDoc/OnInheritedPropertyUsage.kt b/idea/testData/editor/quickDoc/OnInheritedPropertyUsage.kt
index 6ebf11b717a..ab9c857aa27 100644
--- a/idea/testData/editor/quickDoc/OnInheritedPropertyUsage.kt
+++ b/idea/testData/editor/quickDoc/OnInheritedPropertyUsage.kt
@@ -14,4 +14,4 @@ fun test() {
D().foo
}
-//INFO: public open val foo: Int defined in DThis property returns zero.
+//INFO: public open val foo: Int defined in D
This property returns zero.
diff --git a/idea/testData/editor/quickDoc/OnMethodUsage.kt b/idea/testData/editor/quickDoc/OnMethodUsage.kt
index e6479e4de9b..792a157f64e 100644
--- a/idea/testData/editor/quickDoc/OnMethodUsage.kt
+++ b/idea/testData/editor/quickDoc/OnMethodUsage.kt
@@ -12,5 +12,5 @@ fun test() {
testMethod(1, "value")
}
-//INFO: public fun testMethod(a: Int, b: String): Unit defined in root packageSome documentation
+//INFO: public fun testMethod(a: Int, b: String): Unit defined in root package
Some documentation
//INFO: - Parameters:
a - Some intb - String
diff --git a/idea/testData/editor/quickDoc/OnMethodUsageMultiline.kt b/idea/testData/editor/quickDoc/OnMethodUsageMultiline.kt
index f273b92e222..9d720de94f1 100644
--- a/idea/testData/editor/quickDoc/OnMethodUsageMultiline.kt
+++ b/idea/testData/editor/quickDoc/OnMethodUsageMultiline.kt
@@ -10,4 +10,4 @@ fun test() {
testMethod()
}
-//INFO: public fun testMethod(): Unit defined in root packageSome documentation on two lines.
+//INFO: public fun testMethod(): Unit defined in root package
Some documentation on two lines.
diff --git a/idea/testData/editor/quickDoc/OnMethodUsageWithBracketsInParam.kt b/idea/testData/editor/quickDoc/OnMethodUsageWithBracketsInParam.kt
index db96215889f..9bcb9ead457 100644
--- a/idea/testData/editor/quickDoc/OnMethodUsageWithBracketsInParam.kt
+++ b/idea/testData/editor/quickDoc/OnMethodUsageWithBracketsInParam.kt
@@ -12,5 +12,5 @@ fun test() {
testMethod(1, "value")
}
-//INFO: public fun testMethod(a: Int, b: String): Unit defined in root packageSome documentation
+//INFO: public fun testMethod(a: Int, b: String): Unit defined in root package
Some documentation
//INFO: - Parameters:
a - Some intb - String
diff --git a/idea/testData/editor/quickDoc/OnMethodUsageWithCodeBlock.kt b/idea/testData/editor/quickDoc/OnMethodUsageWithCodeBlock.kt
index 2a22c4eb761..8087176e991 100644
--- a/idea/testData/editor/quickDoc/OnMethodUsageWithCodeBlock.kt
+++ b/idea/testData/editor/quickDoc/OnMethodUsageWithCodeBlock.kt
@@ -24,7 +24,7 @@ fun test() {
testMethod(1, "value")
}
-//INFO: public fun testMethod(): Unit defined in root packageSome documentation.
+//INFO: public fun testMethod(): Unit defined in root package
Some documentation.
//INFO:
//INFO: Code block
//INFO: Second line
diff --git a/idea/testData/editor/quickDoc/OnMethodUsageWithMarkdown.kt b/idea/testData/editor/quickDoc/OnMethodUsageWithMarkdown.kt
index dc51d2f542a..6e3d2bb6ead 100644
--- a/idea/testData/editor/quickDoc/OnMethodUsageWithMarkdown.kt
+++ b/idea/testData/editor/quickDoc/OnMethodUsageWithMarkdown.kt
@@ -27,7 +27,7 @@ fun test() {
testMethod(1, "value")
}
-//INFO: public fun testMethod(): Unit defined in root packageSome documentation. Bold underline code foo: bar (baz) quux 'apos'
+//INFO: public fun testMethod(): Unit defined in root package
Some documentation. Bold underline code foo: bar (baz) quux 'apos'
//INFO:
//INFO:
//INFO:
diff --git a/idea/testData/editor/quickDoc/OnMethodUsageWithReceiver.kt b/idea/testData/editor/quickDoc/OnMethodUsageWithReceiver.kt
index 6caef876148..fc6edf826d3 100644
--- a/idea/testData/editor/quickDoc/OnMethodUsageWithReceiver.kt
+++ b/idea/testData/editor/quickDoc/OnMethodUsageWithReceiver.kt
@@ -13,7 +13,7 @@ fun test() {
1.testMethod("value")
}
-//INFO: public fun Int.testMethod(b: String): Unit defined in root packageSome documentation
+//INFO: public fun Int.testMethod(b: String): Unit defined in root package
Some documentation
//INFO: - Receiver:
- Some int
//INFO: - Parameters:
b - String
//INFO: - Returns:
- Return a and nothing else
diff --git a/idea/testData/editor/quickDoc/OnMethodUsageWithReturnAndLink.kt b/idea/testData/editor/quickDoc/OnMethodUsageWithReturnAndLink.kt
index 79f856c02a5..d2689982a5b 100644
--- a/idea/testData/editor/quickDoc/OnMethodUsageWithReturnAndLink.kt
+++ b/idea/testData/editor/quickDoc/OnMethodUsageWithReturnAndLink.kt
@@ -13,6 +13,6 @@ fun test() {
testMethod(1, "value")
}
-//INFO: public fun testMethod(a: Int, b: String): Unit defined in root packageSome documentation
+//INFO: public fun testMethod(a: Int, b: String): Unit defined in root package
Some documentation
//INFO: - Parameters:
a - Some intb - String
//INFO: - Returns:
- Return a and nothing else
diff --git a/idea/testData/editor/quickDoc/OnMethodUsageWithReturnAndThrows.kt b/idea/testData/editor/quickDoc/OnMethodUsageWithReturnAndThrows.kt
index 50bbd0bd200..12e921a24a3 100644
--- a/idea/testData/editor/quickDoc/OnMethodUsageWithReturnAndThrows.kt
+++ b/idea/testData/editor/quickDoc/OnMethodUsageWithReturnAndThrows.kt
@@ -14,7 +14,7 @@ fun test() {
testMethod(1, "value")
}
-//INFO: public fun testMethod(a: Int, b: String): Unit defined in root packageSome documentation
+//INFO: public fun testMethod(a: Int, b: String): Unit defined in root package
Some documentation
//INFO: - Parameters:
a - Some intb - String
//INFO: - Returns:
- Return value
//INFO: - Throws:
IllegalArgumentException - if the weather is bad
diff --git a/idea/testData/editor/quickDoc/OnMethodUsageWithSee.kt b/idea/testData/editor/quickDoc/OnMethodUsageWithSee.kt
index 1b05406a617..363c22bd572 100644
--- a/idea/testData/editor/quickDoc/OnMethodUsageWithSee.kt
+++ b/idea/testData/editor/quickDoc/OnMethodUsageWithSee.kt
@@ -17,5 +17,5 @@ fun test() {
testMethod(1, "value")
}
-//INFO: public fun testMethod(): Unit defined in root package
+//INFO: public fun testMethod(): Unit defined in root package
//INFO: - See Also:
C, D, kotlin
diff --git a/idea/testData/editor/quickDoc/OnMethodUsageWithTypeParameter.kt b/idea/testData/editor/quickDoc/OnMethodUsageWithTypeParameter.kt
index 5e378c12200..07031f65495 100644
--- a/idea/testData/editor/quickDoc/OnMethodUsageWithTypeParameter.kt
+++ b/idea/testData/editor/quickDoc/OnMethodUsageWithTypeParameter.kt
@@ -13,5 +13,5 @@ fun test() {
testMethod(1, "value")
}
-//INFO: public fun <T> testMethod(a: Int, b: String): Unit defined in root packageSome documentation
+//INFO: public fun <T> testMethod(a: Int, b: String): Unit defined in root package
Some documentation
//INFO: - Parameters:
T - the type parametera - Some intb - String
diff --git a/idea/testData/editor/quickDoc/Samples.kt b/idea/testData/editor/quickDoc/Samples.kt
index d1d391304e5..6d9f3665425 100644
--- a/idea/testData/editor/quickDoc/Samples.kt
+++ b/idea/testData/editor/quickDoc/Samples.kt
@@ -19,7 +19,7 @@ fun castTextSpell(spell: String) {
throw SecurityException("Magic prohibited outside Hogwarts")
}
-//INFO: public fun castTextSpell(spell: String): Unit defined in magic
+//INFO: public fun castTextSpell(spell: String): Unit defined in magic
//INFO: - Samples:
Samples.sampleMagic
//INFO: castTextSpell("[asd] [dse] [asz]")
//INFO:
sampleScroll
diff --git a/idea/testData/editor/quickDoc/TopLevelMethodFromJava.java b/idea/testData/editor/quickDoc/TopLevelMethodFromJava.java
index 8731a9d887d..12a628445eb 100644
--- a/idea/testData/editor/quickDoc/TopLevelMethodFromJava.java
+++ b/idea/testData/editor/quickDoc/TopLevelMethodFromJava.java
@@ -8,4 +8,4 @@ class Testing {
}
}
-//INFO: public fun foo(bar: Int): Unit defined in someKDoc foo
+//INFO: public fun foo(bar: Int): Unit defined in some
KDoc foo
diff --git a/idea/testData/editor/quickDoc/TypeNamesFromStdLibNavigation.kt b/idea/testData/editor/quickDoc/TypeNamesFromStdLibNavigation.kt
index 378d061b225..81abe6e0328 100644
--- a/idea/testData/editor/quickDoc/TypeNamesFromStdLibNavigation.kt
+++ b/idea/testData/editor/quickDoc/TypeNamesFromStdLibNavigation.kt
@@ -8,4 +8,4 @@ fun main(args: Array) {
foo()
}
-//INFO: public fun foo(x: A): Unit defined in root package
+//INFO: public fun foo(x: A): Unit defined in root package
diff --git a/idea/tests/org/jetbrains/kotlin/idea/editor/quickDoc/AbstractQuickDocProviderTest.java b/idea/tests/org/jetbrains/kotlin/idea/editor/quickDoc/AbstractQuickDocProviderTest.java
index c6749053767..280d1f8b038 100644
--- a/idea/tests/org/jetbrains/kotlin/idea/editor/quickDoc/AbstractQuickDocProviderTest.java
+++ b/idea/tests/org/jetbrains/kotlin/idea/editor/quickDoc/AbstractQuickDocProviderTest.java
@@ -16,6 +16,7 @@
package org.jetbrains.kotlin.idea.editor.quickDoc;
+import com.intellij.codeInsight.documentation.DocumentationComponent;
import com.intellij.codeInsight.documentation.DocumentationManager;
import com.intellij.codeInsight.navigation.CtrlMouseHandler;
import com.intellij.openapi.util.io.FileUtil;
@@ -41,8 +42,9 @@ public abstract class AbstractQuickDocProviderTest extends KotlinLightCodeInsigh
DocumentationManager documentationManager = DocumentationManager.getInstance(myFixture.getProject());
PsiElement targetElement = documentationManager.findTargetElement(myFixture.getEditor(), myFixture.getFile());
+ PsiElement originalElement = DocumentationManager.getOriginalElement(targetElement);
- String info = CtrlMouseHandler.getInfo(targetElement, element);
+ String info = DocumentationManager.getProviderFromElement(targetElement).generateDoc(targetElement, originalElement);
if (info != null) {
info = StringUtil.convertLineSeparators(info);
}