scalaintellij-ideascaladoc

Scaladoc: Do I really need to give the full path everytime I use a link?


This screenshot summarizes my problem pretty well I think:

I want to link to an object/class/method/... in Scaladoc. Even when I have the package correctly importet (see: import zoo.animals.Dog in my example) IntelliJ does not correctly recognize the path to that object (marks it as red; non-clickable. This does not even work if that object I am referencing is in the same package!

It doesn't work like that!

Do I really have to write something like e.g. @return a [[zoo.animals.Dog]] everytime? This can get quite tedious when dealing with large projects with very deep package structures. But then it works:

It works like that!


Solution

  • If you run the scaladoc for the project (in IDE you can run it via Tools | "Generate Scaladoc" action) it will also generate the scaladoc without the link if you do not specify the fully qualified class name. So the full class name is required there.