diff options
author | Vlad Ureche <vlad.ureche@gmail.com> | 2012-06-13 16:35:58 +0200 |
---|---|---|
committer | Vlad Ureche <vlad.ureche@gmail.com> | 2012-06-14 10:43:44 +0200 |
commit | 831f09bb6d00c152bd8aef3ce8bf9e200080fe36 (patch) | |
tree | 9959919ab28c10cbcaebd0f10932152e56abea16 /test/scaladoc/scalacheck | |
parent | 1c2d466804b22f388ab4d66a034327539ac2e50f (diff) | |
download | scala-831f09bb6d00c152bd8aef3ce8bf9e200080fe36.tar.gz scala-831f09bb6d00c152bd8aef3ce8bf9e200080fe36.tar.bz2 scala-831f09bb6d00c152bd8aef3ce8bf9e200080fe36.zip |
Scaladoc class diagrams part 1
This commit contains model changes required for adding class diagrams
to scaladoc. It also contains an improved implicit shadowing
computation, which hides the shadowed implicitly inherited members
from the main view and gives instructions on how to access them.
This is joint work with Damien Obrist (@damienobrist) on supporting
diagram generation in scaladoc, as part of Damien's semester project
in the LAMP laborarory at EPFL.
The full history is located at:
https://github.com/damienobrist/scala/tree/feature/diagrams-dev
Commit summary:
- diagrams model
- diagram settings (Settings.scala, ScalaDoc.scala)
- diagram model object (Entity.scala, Diagram.scala)
- model: tracking direct superclasses and subclasses,
implicit conversions from and to (ModelFactory.scala)
- diagram object computation (DiagramFactory.scala, DocFactory.scala)
- capacity to filter diagrams (CommentFactory.scala,
DiagramDirectiveParser.scala)
- diagram statistics object (DiagramStats.scala)
- delayed link evaluation (Body.scala, Comment.scala)
- tests
- improved implicits shadowing information
- model shadowing computation (ModelFactoryImplicitSupport.scala,
Entity.scala)
- html generation for shadowing information (Template.scala)
- tests
Also fixes an issue reported by @dragos, where single-line comment
expansion would lead to the comment disappearing.
Review by @kzys, @pedrofurla.
Diffstat (limited to 'test/scaladoc/scalacheck')
-rw-r--r-- | test/scaladoc/scalacheck/CommentFactoryTest.scala | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/scaladoc/scalacheck/CommentFactoryTest.scala b/test/scaladoc/scalacheck/CommentFactoryTest.scala index 68ca68efdd..b576ba5544 100644 --- a/test/scaladoc/scalacheck/CommentFactoryTest.scala +++ b/test/scaladoc/scalacheck/CommentFactoryTest.scala @@ -5,10 +5,12 @@ import scala.tools.nsc.Global import scala.tools.nsc.doc import scala.tools.nsc.doc.model._ import scala.tools.nsc.doc.model.comment._ +import scala.tools.nsc.doc.model._ +import scala.tools.nsc.doc.model.diagram._ class Factory(val g: Global, val s: doc.Settings) extends doc.model.ModelFactory(g, s) { - thisFactory: Factory with ModelFactoryImplicitSupport with CommentFactory with doc.model.TreeFactory => + thisFactory: Factory with ModelFactoryImplicitSupport with DiagramFactory with CommentFactory with doc.model.TreeFactory => def strip(c: Comment): Option[Inline] = { c.body match { @@ -29,7 +31,7 @@ object Test extends Properties("CommentFactory") { val settings = new doc.Settings((str: String) => {}) val reporter = new scala.tools.nsc.reporters.ConsoleReporter(settings) val g = new Global(settings, reporter) - (new Factory(g, settings) with ModelFactoryImplicitSupport with CommentFactory with doc.model.TreeFactory) + (new Factory(g, settings) with ModelFactoryImplicitSupport with DiagramFactory with CommentFactory with doc.model.TreeFactory) } def parse(src: String, dst: Inline) = { |