diff options
author | Vlad Ureche <vlad.ureche@gmail.com> | 2012-06-25 16:53:29 +0200 |
---|---|---|
committer | Vlad Ureche <vlad.ureche@gmail.com> | 2012-07-02 13:34:15 +0200 |
commit | c11427c13e85ba6fb210c1f05724c21c8aeb4be3 (patch) | |
tree | 1bb7324483e1fad5446036eeaa121259108e19e3 /test/scaladoc/run/package-object.scala | |
parent | 44ec110bf059a089f54c06469ff2a54275d0f05f (diff) | |
download | scala-c11427c13e85ba6fb210c1f05724c21c8aeb4be3.tar.gz scala-c11427c13e85ba6fb210c1f05724c21c8aeb4be3.tar.bz2 scala-c11427c13e85ba6fb210c1f05724c21c8aeb4be3.zip |
Reorganized scaladoc model
Since the old model was "interruptible", it was prone to something
similar to race conditions -- where the model was creating a template,
that template creating was interrupted to creat another template, and
so on until a cycle was hit -- then, the loop would be broken by
returning the originally not-yet-finished template.
Now everything happens in a depth-first order, starting from root,
traversing packages and classes all the way to members. The previously
interrupting operations are now grouped in two categories:
- those that were meant to add entities, like inheriting a class from
a template to the other (e.g. trait T { class C }; trait U extends T)
=> those were moved right after the core model creation
- those that were meant to do lookups - like finding the companion
object -- those were moved after the model creation and inheritance
and are not allowed to create new documentable templates.
Now, for the documentable templates we have:
DocTemplateImpl - the main documentable template, it represents a
Scala template (class, trait, object or package).
It may only be created when modelFinished=false by
methods in the modelCreation object
NoDocTemplateMemberImpl - a non-documented (source not present)
template that was inherited. May be used as
a member, but does not get its own page
NoDocTemplateImpl - a non-documented (source not present) template
that may not be used as a member and does not
get its own page
For model users: you can use anything in the ModelFactory trait at
will, but not from the modelCreation object -- that is reserved for the
core model creation and using those functions may lead to duplicate
templates, invalid links and other ugly problems.
Diffstat (limited to 'test/scaladoc/run/package-object.scala')
-rw-r--r-- | test/scaladoc/run/package-object.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/scaladoc/run/package-object.scala b/test/scaladoc/run/package-object.scala index fd36a8df7b..5fb5a4ddf1 100644 --- a/test/scaladoc/run/package-object.scala +++ b/test/scaladoc/run/package-object.scala @@ -9,7 +9,8 @@ object Test extends ScaladocModelTest { import access._ val p = root._package("test") - println(p.linearization) + println(p.linearizationTemplates) + println(p.linearizationTypes) } } |