Kotlindoc @includeFunctionBody ... not seeing code examples in the IDE


So in the ‘kotlindoc’ I see includes for the code examples like:

  @includeFunctionBody …/…/test/collections/MapTest.kt createUsingPairs

I don’t see the actual example code though via the IDE (either the ‘mouse hover over method’ or ‘linking through to the source’).

Perhaps I have a setup problem with my IDE?  If not then my comment would be that if I’m on a team of 5 java developers using Kotlin for the first time I believe those code examples will be very helpful in assisting the learning curve (both how to use the API and example syntax) and it would be really great to see those code examples showing up to developers in the IDE.

Cheers, Rob.

Hello Rob,

It’s a bug. I’d rather say that it’s not implemented feature: KDoc comments are not processed in any way when shown in IDE. I have updated corresponding issue, you can subscribe to its changes: KT-3740.

To anybody wondering why this does not work in a recent version of KDoc: this tag is now called @sample

1 Like