scaladoc

Scaladoc [use case]

不问归期 提交于 2019-11-29 06:00:18
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? 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 implicit parameters, so ScalaDoc allows defining a simplified description of the method - a use case . This

Viewing Scaladoc in Eclipse

喜你入骨 提交于 2019-11-29 04:30:00
问题 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>$

Can I use sbt's `apiMappings` setting for managed dependencies?

百般思念 提交于 2019-11-28 08:47:50
I'd like the ScalaDoc I generate with sbt to link to external libraries, and in sbt 0.13 we have autoAPIMappings which is supposed to add these links for libraries that declare their apiURL . In practice though, none of the libraries I use provide this in their pom/ivy metadata, and I suspect some of these libraries will never do so. The apiMappings setting is supposed to help with just that, but it is typed as Map[File, URL] and hence geared towards setting doc urls for unmanaged dependencies. Managed dependencies are declared as instances of sbt.ModuleID and cannot be inserted directly in

Why are scaladoc method signatures wrong?

本秂侑毒 提交于 2019-11-28 00:02:14
There are a lot of places in the Scala API , particularly in collections, where method signatures are wrong. For example, the scaladoc signature for Map . flatMap says def flatMap[B](f: (A) ⇒ GenTraversableOnce[B]): Map[B] But the actual signature is flatMap[B, That](f: ((A, B)) ⇒ GenTraversableOnce[B]) (implicit bf: CanBuildFrom[Map[A, B], B, That]): That This one especially makes no sense because the scaladoc signature includes Map[B] , but Map has two type parameters, not one. What's going on here? Is this a mistake? Chris Martin The incorrect signatures you're see in the generated

Searching the Scala documentation for #::

筅森魡賤 提交于 2019-11-27 01:34:58
问题 I am trying to find the documentation for the Scala operator method #:: . I believe that it is defined in the Stream class because of an example I found that uses it. My question is not particular to this method (although I would like to know where the docs are), but how to search the Scala docs in general. I tried entering #:: in the search box in the upper left of the documentation page (2.8.1), but found nothing. 回答1: I suggest using the Reference Index - it's designed specifically to look

Why are scaladoc method signatures wrong?

眉间皱痕 提交于 2019-11-26 21:36:52
问题 There are a lot of places in the Scala API, particularly in collections, where method signatures are wrong. For example, the scaladoc signature for Map. flatMap says def flatMap[B](f: (A) ⇒ GenTraversableOnce[B]): Map[B] But the actual signature is flatMap[B, That](f: ((A, B)) ⇒ GenTraversableOnce[B]) (implicit bf: CanBuildFrom[Map[A, B], B, That]): That This one especially makes no sense because the scaladoc signature includes Map[B] , but Map has two type parameters, not one. What's going