由于我从Java切换到Kotlin,因此不得不重写文档。Kotlin具有自己的文档格式,或者据我所知扩展了普通的javadocs。我已经检查了官方文档,该文档指出,有一个property
标签可以让您记录类的属性。
如果我有一个kdoc看起来像这样:
/**
* Tablemodel for the Players of a server, only holds two properties:
*
* * Name
* * Score
*
* @author marcel
* @since Jan 10, 2018
* @property playerName Ingame name of the player
* @property playerScore Ingame score of the player
*/
这两个属性都不是IntelliJ中渲染的kdoc的一部分。
如果我将两个属性移到author
和上方since
,这些也不会显示。我不太明白为什么。缺乏适当的kdoc支持的IntelliJ吗?
正如当您在类上调用“显示快速文档”操作时,IntelliJ for Java不会向您显示该类的所有字段的javadocs时一样,IntelliJ for Kotlin不会将所有属性的文档显示为quickdoc类的一部分。@property
如果您在媒体资源上调用“显示快速文档”操作,则会显示您在标签中添加的文档。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句