Fix for KT-14819 Quick documentation for special Enum functions doesn't work

#KT-14819 fixed
This commit is contained in:
Simon Ogorodnik
2016-12-15 19:44:25 +03:00
committed by Simon Ogorodnik
parent fa01a4efad
commit d0cf1b0c5f
10 changed files with 153 additions and 9 deletions
+10
View File
@@ -0,0 +1,10 @@
/**
* Useless one
*/
enum class SomeEnum
fun use() {
Some<caret>Enum::class
}
//INFO: <pre><b>public</b> <b>final</b> <b>enum class</b> SomeEnum : <a href="psi_element://kotlin.Enum">Enum</a>&lt;<a href="psi_element://SomeEnum">SomeEnum</a>&gt; <i>defined in</i> root package</pre><p>Useless one</p>
+6
View File
@@ -0,0 +1,6 @@
/**
* Useless one
*/
enum class SomeEnum<caret>
//INFO: <pre><b>public</b> <b>final</b> <b>enum class</b> SomeEnum : <a href="psi_element://kotlin.Enum">Enum</a>&lt;<a href="psi_element://SomeEnum">SomeEnum</a>&gt; <i>defined in</i> root package</pre><p>Useless one</p>
+12
View File
@@ -0,0 +1,12 @@
/**
* Enum of 1, 2
*/
enum class SomeEnum(val i: Int) {
One(1), Two(2);
}
fun use() {
Some<caret>Enum.One
}
//INFO: <pre><b>public</b> <b>final</b> <b>enum class</b> SomeEnum : <a href="psi_element://kotlin.Enum">Enum</a>&lt;<a href="psi_element://SomeEnum">SomeEnum</a>&gt; <i>defined in</i> root package</pre><p>Enum of 1, 2</p>
+11
View File
@@ -0,0 +1,11 @@
enum class E {
A
}
fun use() {
E.valueOf<caret>("A")
}
//INFO: <b>public</b> <b>final</b> <b>fun</b> valueOf(value: String): <a href="psi_element://E">E</a> <i>defined in</i> E<p>Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)</p>
//INFO: <dl><dt><b>Throws:</b></dt><dd><code>IllegalArgumentException</code> - if this enum type has no constant with the specified name</dd></dl>
+9
View File
@@ -0,0 +1,9 @@
enum class E {
}
fun use() {
E.values<caret>()
}
//INFO: <b>public</b> <b>final</b> <b>fun</b> values(): Array&lt;<a href="psi_element://E">E</a>&gt; <i>defined in</i> E<p>Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants.</p>