show "defined in" for declarations in quick doc popup

#KT-7320 Fixed
This commit is contained in:
Dmitry Jemerov
2015-04-15 20:43:31 +02:00
parent 0c6cd3b422
commit eeb2728b7e
15 changed files with 29 additions and 27 deletions
@@ -1,3 +1,3 @@
fun some(<caret>f: (Int) -> String) : String? = null
// INFO: <b>value-parameter</b> <b>val</b> f: (Int) &rarr; String
//INFO: <b>value-parameter</b> <b>val</b> f: (Int) &rarr; String <i>defined in</i> some
@@ -2,4 +2,4 @@ trait Base
class Some<<caret>T: Base>
// INFO: &lt;T : Base&gt;
//INFO: &lt;T : Base&gt; <i>defined in</i> Some
@@ -5,4 +5,4 @@ fun test() {
}
// INFO: <b>val</b> test: String?
//INFO: <b>val</b> test: String? <i>defined in</i> test
@@ -2,5 +2,5 @@ fun test() {
listOf(1, 2, 4).<caret>filter { it > 0 }
}
//INFO: inline <b>public</b> <b>fun</b> &lt;T&gt; Iterable&lt;T&gt;.filter(predicate: (T) &rarr; Boolean): List&lt;T&gt;<br/><p>Returns a list containing all elements matching the given <a href="psi_element://predicate">predicate</a>
//INFO: inline <b>public</b> <b>fun</b> &lt;T&gt; Iterable&lt;T&gt;.filter(predicate: (T) &rarr; Boolean): List&lt;T&gt; <i>defined in</i> kotlin<br/><p>Returns a list containing all elements matching the given <a href="psi_element://predicate">predicate</a>
//INFO: </p>
@@ -3,5 +3,5 @@
*/
class <caret>Some
//INFO: <b>internal</b> <b>final</b> <b>class</b> Some<br/><p>Usefull comment
//INFO: <b>internal</b> <b>final</b> <b>class</b> Some <i>defined in</i> root package<br/><p>Usefull comment
//INFO: </p>
@@ -12,6 +12,6 @@ package test
*/
fun <caret>testFun(first: String, second: Int) = 12
//INFO: <b>internal</b> <b>fun</b> testFun(first: String, second: Int): Int<br/><p>Test function
//INFO: <b>internal</b> <b>fun</b> testFun(first: String, second: Int): Int <i>defined in</i> test<br/><p>Test function
//INFO: <dl><dt><b>Parameters:</b></dt><dd><code>first</code> - Some</dd><dd><code>second</code> - Other</dd></dl>
//INFO: </p>
@@ -14,5 +14,5 @@ fun test() {
D().f<caret>oo()
}
//INFO: <b>internal</b> <b>open</b> <b>fun</b> foo(): Int<br/><p>This method returns zero.
//INFO: <b>internal</b> <b>open</b> <b>fun</b> foo(): Int <i>defined in</i> D<br/><p>This method returns zero.
//INFO: </p>
@@ -14,5 +14,5 @@ fun test() {
D().f<caret>oo
}
//INFO: <b>internal</b> <b>open</b> <b>val</b> foo: Int<br/><p>This property returns zero.
//INFO: <b>internal</b> <b>open</b> <b>val</b> foo: Int <i>defined in</i> D<br/><p>This property returns zero.
//INFO: </p>
@@ -12,6 +12,6 @@ fun test() {
<caret>testMethod(1, "value")
}
//INFO: <b>internal</b> <b>fun</b> testMethod(a: Int, b: String): Unit<br/><p>Some documentation
//INFO: <b>internal</b> <b>fun</b> testMethod(a: Int, b: String): Unit <i>defined in</i> root package<br/><p>Some documentation
//INFO: <dl><dt><b>Parameters:</b></dt><dd><code>a</code> - Some int</dd><dd><code>b</code> - String</dd></dl>
//INFO: </p>
@@ -12,6 +12,6 @@ fun test() {
<caret>testMethod(1, "value")
}
//INFO: <b>internal</b> <b>fun</b> testMethod(a: Int, b: String): Unit<br/><p>Some documentation
//INFO: <b>internal</b> <b>fun</b> testMethod(a: Int, b: String): Unit <i>defined in</i> root package<br/><p>Some documentation
//INFO: <dl><dt><b>Parameters:</b></dt><dd><code>a</code> - Some int</dd><dd><code>b</code> - String</dd></dl>
//INFO: </p>
@@ -18,7 +18,7 @@ fun test() {
<caret>testMethod(1, "value")
}
//INFO: <b>internal</b> <b>fun</b> testMethod(): Unit<br/><p><p>Some documentation. <strong>Bold</strong> <em>underline</em> <code>code</code> foo: bar (baz) <a href="psi_element://quux">quux</a> </p>
//INFO: <b>internal</b> <b>fun</b> testMethod(): Unit <i>defined in</i> root package<br/><p><p>Some documentation. <strong>Bold</strong> <em>underline</em> <code>code</code> foo: bar (baz) <a href="psi_element://quux">quux</a> </p>
//INFO: <p>a href="http://www.kotlinlang.org">Kotlin</a></p>
//INFO: <p><a href="psi_element://C">C</a></p>
//INFO: <p><a href="psi_element://C">See this class</a></p>
@@ -14,7 +14,7 @@ fun test() {
<caret>testMethod(1, "value")
}
//INFO: <b>internal</b> <b>fun</b> testMethod(a: Int, b: String): Unit<br/><p>Some documentation
//INFO: <b>internal</b> <b>fun</b> testMethod(a: Int, b: String): Unit <i>defined in</i> root package<br/><p>Some documentation
//INFO: <dl><dt><b>Parameters:</b></dt><dd><code>a</code> - Some int</dd><dd><code>b</code> - String</dd></dl>
//INFO: <dl><dt><b>Returns:</b></dt><dd>Return value</dd></dl>
//INFO: <dl><dt><b>Throws:</b></dt><dd><code>IllegalArgumentException</code> - if the weather is bad</dd></dl>
@@ -16,5 +16,5 @@ fun test() {
<caret>testMethod(1, "value")
}
//INFO: <b>internal</b> <b>fun</b> testMethod(): Unit<br/><p>
//INFO: <b>internal</b> <b>fun</b> testMethod(): Unit <i>defined in</i> root package<br/><p>
//INFO: <DD><DL><DT><b>See Also:</b><DD><a href="psi_element://C"><code>C</code></a>, <a href="psi_element://D"><code>D</code></a></DD></DL></DD></p>
@@ -8,5 +8,5 @@ class Testing {
}
}
//INFO: <b>internal</b> <b>fun</b> foo(bar: Int): Unit<br/><p>KDoc foo
//INFO: <b>internal</b> <b>fun</b> foo(bar: Int): Unit <i>defined in</i> some<br/><p>KDoc foo
//INFO: </p>