在IntelliJ中为Scala项目设置Javadoc [英] Setting up Javadoc for Scala projects in IntelliJ

查看:763
本文介绍了在IntelliJ中为Scala项目设置Javadoc的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

设置我的Scaladoc后,我发现IDE中仍然缺少一些文档



在我看来(非常感谢并放入 /Library/Scala/2.10。 0-RC2 / doc / javadoc

  javadoc / api $ b $b├──index-文件$ b $b├──java$ b $b│├──小程序$ b $b│ │└──类使用$ b $b│├──awt$ b $b││├──类使用$ b $b││├──颜色$ b $b│││└──类 - 使用$ b $b││├──datatransfer$ b $b│││└──类使用

又向IDEA添加了1个条目:





似乎无济于事。



请澄清

解决方案

你也应该安装Javadocs - 这些大胆的方法实际上有很多文档,因为它们来自Java。
关于突出显示的含义,我已经在你的另一个帖子上回答。



要添加JavaDocs,请看下面的图片:。



从你的快照,我'我很想猜你在同一个库的ScalaDocs旁边添加了它们。但是,JavaDocs / ScalaDocs与特定库相关联,因此您应该撤消所执行的步骤 - IDEA将仅在您指定的路径中查找Scala库类的文档。
图片显示在项目结构对话框中,您需要转到SDK,选择您正在使用的Java SDK,转到文档路径并按下底部的+按钮之一。该图显示了如何添加Internet文档的链接,但使用其他+按钮可以添加下载的本地文档(访问速度更快)。您指定的路径似乎正确。


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

解决方案

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.

这篇关于在IntelliJ中为Scala项目设置Javadoc的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆