Setting up Javadoc for Scala projects in IntelliJ

我与影子孤独终老i 提交于 2019-12-07 12:53:33

问题


After setting up my Scaladoc, i see that some documentation is still missing from the IDE

It seems to me (many thanks to Peter for noticing this) that:

  • functions with non-bold font have no documentation
  • functions with bold font have bare minimum
  • underlined functions have complete documentation

No documentation (normal non-bold font)

Bare minimum documentation (bold)

Complete documentation (underlined)

For the record, my scaladoc is installed as follows

doc
├── scala-devel-docs
│   └── api
│       ├── index
│       ├── lib
│       └── scala
│           ├── actors
│           │   ├── remote
│           │   └── scheduler
│           ├── annotation
│           │   ├── meta
│           │   └── unchecked

and is configured as follows:

EDIT:

Downloaded Javadoc from Oracle and placed into the /Library/Scala/2.10.0-RC2/doc/javadoc

javadoc/api
├── index-files
├── java
│   ├── applet
│   │   └── class-use
│   ├── awt
│   │   ├── class-use
│   │   ├── color
│   │   │   └── class-use
│   │   ├── datatransfer
│   │   │   └── class-use

Added 1 more entry to IDEA:

Does not seem to help.

Please clarify


回答1:


You should install Javadocs as well - those bold methods have in fact plenty of documentation because they come from Java. On the meaning of highlighting, I've answered on your other thread.

To add the JavaDocs, take a look at the picture below:

.

From your snapshot, I'm tempted to guess you added them next to the ScalaDocs for the same library. However, the JavaDocs/ScalaDocs are associated with a specific library, so you should undo the step you did - IDEA will only look for docs of Scala library classes within the paths you specified there. The picture shows that within the "Project structure" dialog, you need to go to SDKs, select the Java SDK you're using, go to documentation paths and press one of the "+" buttons on the bottom. The picture shows how to add a link to the Internet documentation, but with the other "+" button you can add the local documentation you downloaded (which will be faster to access). The path you specified seems correct.



来源:https://stackoverflow.com/questions/13791572/setting-up-javadoc-for-scala-projects-in-intellij

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!