summaryrefslogtreecommitdiff
path: root/src/partest/scala/tools/partest/ScaladocModelTest.scala
diff options
context:
space:
mode:
authorVlad Ureche <vlad.ureche@gmail.com>2012-07-18 20:28:06 +0200
committerVlad Ureche <vlad.ureche@gmail.com>2012-07-19 15:05:04 +0200
commit0d367d4794e45ef021d9dfc7eeca186ba9fb632a (patch)
tree3ad6ff57c5a8291e86c5938b171785c6c8be3e46 /src/partest/scala/tools/partest/ScaladocModelTest.scala
parent0018f9b3649f14d16debc966e7da4e54a9a0a4c3 (diff)
downloadscala-0d367d4794e45ef021d9dfc7eeca186ba9fb632a.tar.gz
scala-0d367d4794e45ef021d9dfc7eeca186ba9fb632a.tar.bz2
scala-0d367d4794e45ef021d9dfc7eeca186ba9fb632a.zip
Scaladoc: Groups
Group class members based on their semantic relationship. To do this: - @group on members, only need to do it for the non-overridden members - -groups flag passes to scaladoc, groups="on" in ant - @groupdesc Group Group Description to add descriptions - @groupname Group New name for group - @groupprio Group <int> (lower is better) See test/scaladoc/run/groups.scala for a top-to-bottom example
Diffstat (limited to 'src/partest/scala/tools/partest/ScaladocModelTest.scala')
-rw-r--r--src/partest/scala/tools/partest/ScaladocModelTest.scala9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/partest/scala/tools/partest/ScaladocModelTest.scala b/src/partest/scala/tools/partest/ScaladocModelTest.scala
index adf7abe11c..ffc5e74cc0 100644
--- a/src/partest/scala/tools/partest/ScaladocModelTest.scala
+++ b/src/partest/scala/tools/partest/ScaladocModelTest.scala
@@ -169,14 +169,19 @@ abstract class ScaladocModelTest extends DirectTest {
}).mkString(", ") + "]")
}
- def extractCommentText(c: Comment) = {
+ def extractCommentText(c: Any) = {
def extractText(body: Any): String = body match {
case s: String => s
case s: Seq[_] => s.toList.map(extractText(_)).mkString
case p: Product => p.productIterator.toList.map(extractText(_)).mkString
case _ => ""
}
- extractText(c.body)
+ c match {
+ case c: Comment =>
+ extractText(c.body)
+ case b: Body =>
+ extractText(b)
+ }
}
def countLinks(c: Comment, p: EntityLink => Boolean) = {