scaladoc

How do I link variables inside another object in scaladocs?

倾然丶 夕夏残阳落幕 提交于 2021-01-20 04:28:05
问题 To link another class, I can use [[package.Classname]] . Linking functions defined by def works as well, but trying to link variables doesn't work. What I've tried: object Foo { val BAR = 0 } object Example { /** * Does the thing with [[Foo.BAR]] */ def doTheThing(): Unit = { } } I've also tried [[Foo#BAR]] (from another post) instead of [[Foo.BAR]] , which fails as well. What's the proper way to link variables in scaladoc? 回答1: The right way to go is what you have already tried: /** * Does

How to reference the name of a val in a Object class in scaladoc?

时光毁灭记忆、已成空白 提交于 2020-12-08 06:01:11
问题 Is there a way that I can reference the name of a val in a Object class using scaladoc, similar to {@value #STATIC_FIELD} in javadoc. 回答1: you can do it two ways: package your.package_path object SomeObject extends App { val someList: List[Int] = List.empty[Int] /** * @see [[your.package_path.SomeObject#someList]] * @see [[someList]] * ... */ def bar(): String = ??? } 来源: https://stackoverflow.com/questions/29854895/how-to-reference-the-name-of-a-val-in-a-object-class-in-scaladoc

Where does scaladoc look for the rootdoc.txt to create the root doc

最后都变了- 提交于 2020-01-04 06:27:08
问题 This is a duplicate of Generate scaladoc for root package, however the Answer does not state where sbt doc looks for the rootdoc.txt . I added scalacOptions in doc ++= Seq("-doc-root-content", "rootdoc.txt") to my build.sbt , but sbt doc does not seem to scan it. I tried to put it next to the build.sbt , in src , src/main , src/main/scala I am using sbt 0.12.3 回答1: It seems that your arguments are not given to scaladoc at all. I cannot figure out why the command line arguments are not passed

SBT Scaladoc Configuration

给你一囗甜甜゛ 提交于 2020-01-02 01:10:14
问题 I'm trying to configure the Scaladoc in SBT, specifically the title, output directory and classpath. I managed to define the title by adding the following to build.sbt: scalacOptions in (Compile, doc) ++= Opts.doc.title("Scala-Tools") I can't figure out how to change the doc output directory. I also can't figure out how to add jars to classpath. The reason I want to edit the classpath is because it appears the standard Scala library is not getting picked up by scaladoc when I refer to its

Scaladoc [use case]

北城余情 提交于 2019-12-29 06:43:24
问题 Why do some method descriptions in Scaladoc start with [use case] ? Example: scala.collection.immutable.StringOps.++ Is it just a placeholder to be replaced in the future? 回答1: They are simplified examples of how these methods are called. Usually these methods ( ++ , map , flatMap , etc.) contain an implicit parameter, most often an argument called a builder factory which (simply put) abstracts creation of resulting collections. In most cases, a client of a collection does not specify these

Disable sbt subproject doc generation

守給你的承諾、 提交于 2019-12-24 13:13:47
问题 I have a multi-project Scala build in SBT, in which I have a root project that effectively just aggregates two subprojects: a macro library and a core library that uses that macro library. I'm using the excellent sbt-unidoc plugin to create a single, unified scaladoc API for the entire library (macro + core combined). Unfortunately, sbt-unidoc has some limitations. For instance, by default, it does not hook into the doc task, and its output is placed in the target directory's unidoc folder,

Generate scaladoc for root package

天涯浪子 提交于 2019-12-23 15:31:23
问题 I'm curious how it's possible to document the root package, displayed as the first page in a scala-doc compilation. Can one create a package object referring to the root-package somehow, or is are there any configuration options? The descriptions on the matter are somewhat vague. 回答1: There appears to be an option for scaladoc called -doc-root-content which was added in 2.9.2. You can see this in the ant build.xml for scala 2.9.2 and also in the compiler source code. It's not present in 2.9.1

How to disambiguate links to methods in scaladoc?

和自甴很熟 提交于 2019-12-20 11:05:49
问题 I'm documenting a Scala class with overloaded methods. How can I distinguish them when referring to them in scaladoc comments? For example, if I have /** * The most important method is [[Doc.foo]]. */ object Doc { def foo[A]: A = throw new UnsupportedOperationException; def foo[A,B >: A](x: A): B = x; } and run sbt doc I get Doc.scala:1: warning: The link target "Doc.foo" is ambiguous. Several (possibly overloaded) members fit the target: method foo[A,B>:A](x:A):B in object Doc [chosen]

How to link classes from JDK into scaladoc-generated doc?

偶尔善良 提交于 2019-12-20 09:53:09
问题 I'm trying to link classes from the JDK into the scaladoc-generated doc. I've used the -doc-external-doc option of scaladoc 2.10.1 but without success. I'm using -doc-external-doc:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/rt.jar#http://docs.oracle.com/javase/7/docs/api/ , but I get links such as index.html#java.io.File instead of index.html?java/io/File.html . Seems like this option only works for scaladoc-generated doc. Did I miss an option in scaladoc or should I fill a feature request? I

How to configure scaladoc in eclipse juno? [closed]

萝らか妹 提交于 2019-12-18 07:24:55
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . I'm new to scala. I've installed the nightly build since I use eclipse juno. The problem I'm facing is I do not see scaladoc when the cursor is on a class/trait and I press F2(like in java). 回答1: That is because it is not implemented yet. See ticket #1000954 and #1000210 for more information and future work on