有没有办法在 IntelliJ 中打开 Kotlin 示例?

Pav*_*ský 5 intellij-idea kotlin

使用Kotlin 1.4.32in时, Kotlin 的 Kdoc 中IntelliJ 2021.1.1有很多实现。@sample但是,这些在 IntelliJ 中不可单击。

例如,它kotlin.properties.Delegates#observable引用了未解析的samples.properties.Delegates.observableDelegate样本。

这些stdlib示例可以在这里找到https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib/samples,但我还没有找到一种方法来获取类路径上的示例,以便我可以在IntelliJ。

Ada*_*hip 2

正如 JetBrains 的 Alexey Belkov 在评论中所说,IntelliJ 目前不支持它。

然而,它们并不是“实际上毫无用处”,因为这些示例可以从在线文档中执行。例如,这里是map().