Dear Kotlin plugin community, There is a question...
# intellij
j
Dear Kotlin plugin community, There is a question I would like to ask you. Given
Copy code
package tornadofx

/**
 * …
 * @sample tornadofx.tests.FirstInterceptor
 * @sample tornadofx.tests.SecondInterceptor
 *
 */
interface ChildInterceptor {
If I my project is gradle bases, is there a way to configure the gradle.build (and/or IntelliJ Idea) to allow me to see and|or navigate to the samples? Thank you for your support in advance. Tony
c
Hi, Tony, if samples are in the source dir, than just surround the FQDN with brackets, like this:
Copy code
package tornadofx

/**
* …
* @sample [tornadofx.tests.FirstInterceptor]
* @sample [tornadofx.tests.SecondInterceptor]
*
*/
interface ChildInterceptor {
👍 1
As a side note, it's a slack chat (as opposed to email), you don't have to put your name at the end 🙂
j
Thank you very much for the suggestion/help and the side note. I tried on your suggestion and I really like the way it works in Idea. The navigation to the sample works and the quick documentation show the sample code inline. I am working on sort of kt library and I would like to provide @sample samples for easily understands its API. One thing I didn’t manage to make it work was @samples for test methods like
test if length is greater than zero
. I tried to refer it in @sample with back-ticks, single quote, double quote, but, unfortunately idea did not recognise the link. Maybe it is not supported by kotlin idea plugin.
c
You're welcome! in Kotlin documentation is rendered by dokka engine, sorry can't answer your question, but maybe you can find something in dokka documentation, there is also #dokka channel in this slack.
j
Thank you Alexander, You provided me, again, with useful information. I am going to dive a bit in the documentation of dokka and kdoc.
😉 1