Skip to content

Commit

Permalink
SI-5784 Scaladoc: Type templates
Browse files Browse the repository at this point in the history
@template and @documentable are now synomims.
  • Loading branch information
VladUreche committed Jul 19, 2012
1 parent 0d367d4 commit 6539a9d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/compiler/scala/tools/nsc/doc/model/ModelFactory.scala
Expand Up @@ -1075,6 +1075,7 @@ class ModelFactory(val global: Global, val settings: doc.Settings) {
// whether or not to create a page for an {abstract,alias} type
def typeShouldDocument(bSym: Symbol, inTpl: DocTemplateImpl) =
(settings.docExpandAllTypes.value && (bSym.sourceFile != null)) ||
global.expandedDocComment(bSym, inTpl.sym).contains("@template")
{ val rawComment = global.expandedDocComment(bSym, inTpl.sym)
rawComment.contains("@template") || rawComment.contains("@documentable") }
}

Expand Up @@ -383,7 +383,7 @@ trait CommentFactory { thisFactory: ModelFactory with CommentFactory with Member
case None => List.empty
}

val stripTags=List(inheritDiagramTag, contentDiagramTag, SimpleTagKey("template"))
val stripTags=List(inheritDiagramTag, contentDiagramTag, SimpleTagKey("template"), SimpleTagKey("documentable"))
val tagsWithoutDiagram = tags.filterNot(pair => stripTags.contains(pair._1))

val bodyTags: mutable.Map[TagKey, List[Body]] =
Expand Down
4 changes: 2 additions & 2 deletions test/scaladoc/resources/SI-5784.scala
Expand Up @@ -8,7 +8,7 @@ package test.templates {

/** @contentDiagram */
trait Base {
/** @template */
/** @documentable */
type String = test.templates.String
/** @template
* @inheritanceDiagram */
Expand All @@ -20,7 +20,7 @@ package test.templates {

/** @contentDiagram */
trait Api extends Base {
/** @template
/** @documentable
* @inheritanceDiagram */
override type T <: FooApi
trait FooApi extends Foo { def bar: String }
Expand Down

0 comments on commit 6539a9d

Please sign in to comment.