KT-32163: Open Quick Documentation when cursor inside function / constructor brackets (#2502)

* Show function docs when cursor is in args of the function call

* Show constructor docs when cursor is in args of the constructor call

* Show function docs when cursor is in args of the kt function call

* Add some tests

* Use JavaDocumentationProvider to fetch java method document

* Support caret in params

#KT-32163 fixed
This commit is contained in:
Yuku Kotani
2020-04-28 00:15:24 +09:00
committed by GitHub
parent 6b5b23f37b
commit de28a41caa
8 changed files with 107 additions and 1 deletions
@@ -0,0 +1,7 @@
fun testing() {
SomeClassWithParen("param", 1<caret>)
}
//INFO: <div class='definition'><pre><a href="psi_element://SomeClassWithParen"><code>SomeClassWithParen</code></a><br><i>@Contract(pure = true)</i>&nbsp;
//INFO: public&nbsp;<b>SomeClassWithParen</b>(<a href="psi_element://java.lang.String"><code>String</code></a>&nbsp;str,
//INFO: int&nbsp;num)</pre></div><table class='sections'><p><tr><td valign='top' class='section'><p><i>Inferred</i> annotations:</td><td valign='top'><p><i>@org.jetbrains.annotations.Contract(pure = true)</i></td></table>