Render short type names in quick documentation and navigation

This commit is contained in:
Nikolay Krasko
2014-06-04 21:08:21 +04:00
parent 57fc2c8301
commit 2d72b5afc7
13 changed files with 46 additions and 30 deletions
@@ -1,3 +1,3 @@
fun some(<caret>f: (Int) -> String) : String? = null
//INFO: <b>value-parameter</b> <b>val</b> f: (kotlin.Int) &rarr; kotlin.String <i>defined in</i> some
// INFO: <b>value-parameter</b> <b>val</b> f: (Int) &rarr; String
@@ -2,4 +2,4 @@ trait Base
class Some<<caret>T: Base>
//INFO: &lt;T : Base&gt; <i>defined in</i> Some
// INFO: &lt;T : Base&gt;
@@ -5,4 +5,4 @@ fun test() {
}
//INFO: <b>val</b> test: kotlin.String? <i>defined in</i> test
// INFO: <b>val</b> test: String?
@@ -2,4 +2,4 @@ fun testing() {
<caret>SomeClass<List<String>>()
}
// INFO: <b>public</b> <b>constructor</b> SomeClass&lt;T : kotlin.List&lt;kotlin.Any?&gt;?&gt;() <i>defined in</i> SomeClass<br/>Java declaration:<br/>[light_idea_test_case] public class SomeClass&lt;T extends java.util.List&gt; extends Object
// INFO: <b>public</b> <b>constructor</b> SomeClass&lt;T : List&lt;Any?&gt;?&gt;()<br/>Java declaration:<br/>[light_idea_test_case] public class SomeClass&lt;T extends java.util.List&gt; extends Object
@@ -2,4 +2,4 @@ fun ktTest() {
Test.<caret>foo("SomeTest")
}
//INFO: <b>public</b> <b>open</b> <b>fun</b> foo(param: kotlin.String): kotlin.Array&lt;out kotlin.Any&gt; <i>defined in</i> Test<br/>Java declaration:<br/>Test...
// INFO: <b>public</b> <b>open</b> <b>fun</b> foo(param: String): Array&lt;out Any&gt;<br/>Java declaration:<br/>Test...
@@ -2,4 +2,4 @@ fun test() {
listOf(1, 2, 4).<caret>filter { it > 0 }
}
// INFO: kotlin.inline <b>public</b> <b>fun</b> &lt;T&gt; kotlin.Iterable&lt;T&gt;.filter(predicate: (T) &rarr; kotlin.Boolean): kotlin.List&lt;T&gt; <i>defined in</i> kotlin<br/><p>Returns a list containing all elements matching the given *predicate*<br/></p>
// 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 *predicate*<br/></p>
@@ -3,4 +3,4 @@
*/
class <caret>Some
// INFO: <b>internal</b> <b>final</b> <b>class</b> Some <i>defined in</i> root package<br/><p>Usefull comment<br/></p>
// INFO: <b>internal</b> <b>final</b> <b>class</b> Some<br/><p>Usefull comment<br/></p>
@@ -12,4 +12,4 @@ package test
*/
fun <caret>testFun(first: String, second: Int) = 12
// INFO: <b>internal</b> <b>fun</b> testFun(first: kotlin.String, second: kotlin.Int): kotlin.Int <i>defined in</i> test<br/><p>Test function<br/><br/><br/><b>@param</b> - <i>first</i> - Some<br/><b>@param</b> - <i>second</i> - Other<br/></p>
// INFO: <b>internal</b> <b>fun</b> testFun(first: String, second: Int): Int<br/><p>Test function<br/><br/><br/><b>@param</b> - <i>first</i> - Some<br/><b>@param</b> - <i>second</i> - Other<br/></p>
@@ -12,4 +12,4 @@ fun test() {
<caret>testMethod(1, "value")
}
// INFO: <b>internal</b> <b>fun</b> testMethod(a: kotlin.Int, b: kotlin.String): kotlin.Unit <i>defined in</i> root package<br/><p>Some documentation<br/><br/><b>@param</b> - <i>a</i> - Some int<br/><b>@param</b> - <i>b</i>: String<br/></p>
// INFO: <b>internal</b> <b>fun</b> testMethod(a: Int, b: String): Unit<br/><p>Some documentation<br/><br/><b>@param</b> - <i>a</i> - Some int<br/><b>@param</b> - <i>b</i>: String<br/></p>
@@ -8,4 +8,4 @@ class Testing {
}
}
// INFO: <b>internal</b> <b>fun</b> foo(bar: kotlin.Int): kotlin.Unit <i>defined in</i> some<br/><p>KDoc foo<br/></p>
// INFO: <b>internal</b> <b>fun</b> foo(bar: Int): Unit<br/><p>KDoc foo<br/></p>