Setting up Javadoc for Scala projects in IntelliJ

2019-05-15 00:34发布

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) enter image description here

Bare minimum documentation (bold) enter image description here

Complete documentation (underlined) enter image description here

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:

enter image description here

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:

enter image description here

Does not seem to help.

Please clarify

1条回答
冷血范
2楼-- · 2019-05-15 00:52

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: Snapshot from IDEA 12 configuration.

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.

查看更多
登录 后发表回答