Questions tagged [scaladoc]

Scaladoc is a documentation generation system which reads specially formatted comments in Scala source code and generates compiled documentation. It is typically used to produce API documentation in the form of HTML web pages.

Resources

146 questions
5
votes
3 answers

Scaladoc: @group tag not showing in API documentation

I'm trying to organise the members of a class in my library API documentation using @groupname and @group tags, but it doesn't work (I'm using sbt 0.13.11) My toy build.sbt: name := "test" scalaVersion := "2.10.5" My toy code…
Wilmerton
  • 1,448
  • 1
  • 12
  • 31
5
votes
1 answer

Adding code examples in scaladoc

What is the standard convention (or tag) to add code examples in ScalaDoc? Example in the code below, I want to provide coding example to demonstrate it's usage: /** * Adds a filter on DB Table Query if value is defined. Example: * * {code} *…
panther
  • 767
  • 5
  • 21
5
votes
1 answer

How do I document vals in pattern definitions

I would like to create ScalaDoc entries to every val and def of my class. The problem is that the vals lie inside a pattern definition, and don't know how to use the /** */ syntax. Example: class C(id: String) { val (part1, part2) = { …
david.perez
  • 6,090
  • 4
  • 34
  • 57
5
votes
1 answer

How do you indent code block for scaladoc

I wrote a comment like this: /** Blah blah blah. * * {{{ * class MyAppServlet extends ControllerServlet { * routes.publishWithReflection("/main", MainController) * routes.publishWithReflection("/foo", FooController) * } * }}} * …
Rob N
  • 15,024
  • 17
  • 92
  • 165
5
votes
2 answers

How to link Java API classes using apiMappings?

How do you link to Java classes in sbt using apiMappings? This is my code below which works for various dependencies, but I'm unclear how to link to Java standard library classes? apiMappings ++= { def findManagedDependency(organization: String,…
Taylor Leese
  • 51,004
  • 28
  • 112
  • 141
5
votes
0 answers

Defining scaladoc macros for reuse in companion object

I am trying to understand how scaladoc macros work. E.g. /** $DESCR * * @define DESCR * A `Consumer` simplifies resource management... * * @define KEY * the key type * * @define VALUE * the value type */ object Consumer { /**…
0__
  • 66,707
  • 21
  • 171
  • 266
5
votes
2 answers

sbt ignores my scaladoc settings

I am trying to follow the sbt documentation for scaladoc generation. I have a multi project (i.e. aggregate with sub-projects) build which was a ./build.sbt for general settings. I added the last entry in the following example: scalacOptions in…
0__
  • 66,707
  • 21
  • 171
  • 266
5
votes
2 answers

SBT Scaladoc configuration for the standard library

I'd like to setup ScalaDoc to link to the standard library, from SBT. I'm using 0.12.4 but I'm going to switch to 0.13 soon. Moreover, I'd like to make the setup simple by using 0.13's support. The best option would be automatic mapping with 0.13's…
Blaisorblade
  • 6,438
  • 1
  • 43
  • 76
5
votes
3 answers

Why does the scaladoc say HashMap.toArray returns Array[A] instead of Array[(A,B)]?

I was looking at the definition of toArray for hashmaps : http://www.scala-lang.org/api/current/index.html#scala.collection.immutable.HashMap It has toArray: Array[A] def toArray[B >: (A, B)](implicit arg0: ClassTag[B]): Array[B] I don't quite…
Austin
  • 1,122
  • 2
  • 10
  • 27
5
votes
2 answers

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

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…
Ryan
  • 7,227
  • 5
  • 29
  • 40
5
votes
3 answers

multi module aggregation for scaladoc in maven

I have a parent project with 5 modules. I am trying to figure out how to aggregate the module level scaladoc's into one cohesive site. Any help would be much appreciated.
fbl
  • 2,840
  • 3
  • 33
  • 41
4
votes
1 answer

Scaladoc could not find any member to link for external Java library

In the documentation of my Scala project, I want to link to a member from an external Java library. /** * Checks whether log entries at [[org.tinylog.Level.TRACE]] will be output. * * @return `true` if [[org.tinylog.Level.TRACE]] level is…
Martin
  • 598
  • 1
  • 4
  • 27
4
votes
1 answer

How to reference a typed class in ScalaDoc Documentation (version 2.10.6)

Sorry if this is a dumb question but I am just stuck on how to best document this typed class. I recently starting working in Scala and am working to clean up some code and add documentation. I have an API in my project that makes request to other…
DVS
  • 783
  • 7
  • 25
4
votes
1 answer

Scaladoc options with Maven

I'm looking for help with the scala-maven-plugin for Maven. I would like to generate my Scaladoc but I'm having some problems with it. I actually can create my Scaladoc typing the following command: mvn scala:doc The problem now is that I want to…
Rors
  • 159
  • 2
  • 10
4
votes
2 answers

Skip scaladoc when running 'dist' on a Play project

How can I stop scaladoc from running when executing 'dist' on a Play project (currently using Play 2.3.0)? As an example: $ git clone --branch play-2.3.0 git@github.com:guardian/gu-who.git $ cd gu-who $ sbt clean dist [info] Loading project…
Roberto Tyley
  • 24,513
  • 11
  • 72
  • 101