scaladoc

How to exclude java source files in doc task?

假装没事ソ 提交于 2019-12-04 17:17:34
问题 I'm using sbt 0.11.2 for a mixed Java/Scala project. I've realized that when I run the doc command from within sbt, it does not only create the scaladocs for the Scala source files in src/main/scala , but also for the Java source files in src/main/java (the sbt wiki claims to create them for src/main/scala only that seems not true). However, this does not look very well. For instance, for a Java class named Foo with static methods there are two entries in the generated scaladoc: a Foo class

How to disambiguate links to methods in scaladoc?

☆樱花仙子☆ 提交于 2019-12-03 01:11:32
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] method foo[A]:Nothing in object Doc Using foo[A,B >: A] etc. to the link doesn't work. The following seems

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

梦想的初衷 提交于 2019-12-02 20:33:05
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've configured sbt as follows: scalacOptions in (Compile,doc) += "-doc-external-doc:/usr/lib/jvm/java-7

How to run bash script after generating scaladoc using doc task?

有些话、适合烂在心里 提交于 2019-12-01 05:35:18
I have a short Bash script that does a find-and-replace on my Scaladoc comments in order to generate links to external documentation of a third-party library. I would like this script to run every time I generate Scaladocs using the doc task. How can I achieve this? It's actually pretty easy. First, I inspected doc to see what it was ( inspect doc on the sbt prompt), noticed it was a task, and proceeded with declaring a dependency on itself on build.sbt : doc in Compile <<= doc in Compile map { (file) => Seq("bash", "-c", "ls >tmp.log").! // CWD is sbt's current dir file } That thing I used to

How to run bash script after generating scaladoc using doc task?

雨燕双飞 提交于 2019-12-01 03:48:40
问题 I have a short Bash script that does a find-and-replace on my Scaladoc comments in order to generate links to external documentation of a third-party library. I would like this script to run every time I generate Scaladocs using the doc task. How can I achieve this? 回答1: It's actually pretty easy. First, I inspected doc to see what it was ( inspect doc on the sbt prompt), noticed it was a task, and proceeded with declaring a dependency on itself on build.sbt : doc in Compile <<= doc in

Is there a way to include math formulae in Scaladoc?

陌路散爱 提交于 2019-11-30 11:48:20
I would like to enter math formulae in Scaladoc documentation of mathematical Scala code. In Java, I found a library called LatexTaglet that can do exactly this for Javadoc, by writing formulae in Latex: http://latextaglet.sourceforge.net/ And it seems to integrate well with Maven (reporting/plugins section of a POM). Is there an equivalent library for Scaladoc? If not, how could I integrate this library with SBT? I also considered using MathML ( http://www.w3.org/Math/ ), but looks too verbose. Is there an editor you would recommend? Does MathML integrate well with Scaladoc? Thank you for

How to disable ScalaDoc generation in dist task in Play 2.2.x (using project/build.scala)?

懵懂的女人 提交于 2019-11-30 10:56:56
问题 Adding the following settings to the build.sbt file of a Play 2.2.x app does not disable Scaladoc generation. How can it be disabled? play.Project(appName, appVersion, appDependencies) .settings(scalaVersion := "2.10.3") .settings(jsSettings : _*) .settings( publishArtifact in (Compile, packageDoc) := false, publishArtifact in packageDoc := false ) 回答1: Add the following settings to the Play project: sources in (Compile,doc) := Seq.empty publishArtifact in (Compile, packageDoc) := false With

Viewing Scaladoc in Eclipse

纵然是瞬间 提交于 2019-11-30 05:35:01
In Eclipse I have set the Javadoc Location property of my Scala project to file:/D:/EclipseWorkspace/MyProject/target/scala-2.9.1/api where D:/EclipseWorkspace/MyProject is the location of my scala project. Now, if I am in a Scala file that implements a class/trait, when I type Shift + F2 , Eclipse opens the Scaladoc page of that class/trait. However, this does not work if it is an object since Eclipse tries to open <ObjectName>.html whereas the Scaladoc-generated file name is <ObjectName>$.html . Is there any workaround? Scaladoc is now integrated since release 4.0.0 RC1 of the Scala-IDE

How to disable ScalaDoc generation in dist task in Play 2.2.x (using project/build.scala)?

…衆ロ難τιáo~ 提交于 2019-11-29 22:54:39
Adding the following settings to the build.sbt file of a Play 2.2.x app does not disable Scaladoc generation. How can it be disabled? play.Project(appName, appVersion, appDependencies) .settings(scalaVersion := "2.10.3") .settings(jsSettings : _*) .settings( publishArtifact in (Compile, packageDoc) := false, publishArtifact in packageDoc := false ) Jacek Laskowski Add the following settings to the Play project: sources in (Compile,doc) := Seq.empty publishArtifact in (Compile, packageDoc) := false With the change it should be as follows: play.Project(appName, appVersion, appDependencies)

Is there a way to include math formulae in Scaladoc?

六月ゝ 毕业季﹏ 提交于 2019-11-29 17:44:05
问题 I would like to enter math formulae in Scaladoc documentation of mathematical Scala code. In Java, I found a library called LatexTaglet that can do exactly this for Javadoc, by writing formulae in Latex: http://latextaglet.sourceforge.net/ And it seems to integrate well with Maven (reporting/plugins section of a POM). Is there an equivalent library for Scaladoc? If not, how could I integrate this library with SBT? I also considered using MathML (http://www.w3.org/Math/), but looks too verbose