dokka icon indicating copy to clipboard operation
dokka copied to clipboard

Fix some Javadoc links with generic parameters

Open vmishenev opened this issue 6 months ago • 3 comments

In K1, we register IDE's service JavadocManager, we could do the same in K2: registerProjectService(JavadocManager::class.java, JavadocManagerImpl(project)) However, it seems unnecessary, since the link is unresolved in K1 as well.

vmishenev avatar Jun 25 '25 17:06 vmishenev

Notice

According to the specification , Javadoc links can have type parameters,

Parameterized types may be used in the class and member parts of the reference

In Dokka, rendered links and labels have no type parameters at all.

vmishenev avatar Jun 25 '25 18:06 vmishenev

In K1, we register IDE's service JavadocManager; we could do the same in K2

Is there a reason not to do it in K2? I mean, if we don't register it, we may throw NPE in some cases when parsing Javadoc. But if we register it, as far as I understand, we will just receive some empty results instead of NPE.

Or maybe I'm wrong, and with the changes in this PR, we will not fall back to using JavadocManager at all?

whyoleg avatar Jun 26 '25 12:06 whyoleg

Or maybe I'm wrong, and with the changes in this PR, we will not fall back to using JavadocManager at all?

I mean this, at least in the current case. However, I do know why it was registered in K1. It just seems unnecessary.

vmishenev avatar Jun 26 '25 13:06 vmishenev