summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorVlad Ureche <vlad.ureche@gmail.com>2012-07-19 15:03:13 +0200
committerVlad Ureche <vlad.ureche@gmail.com>2012-07-19 15:05:10 +0200
commit6539a9ddc5ecdec65ef1d874999a200cee46b2c4 (patch)
tree7637fe42a15336de8b4c39087ea6de2915cca14c /src/compiler
parent0d367d4794e45ef021d9dfc7eeca186ba9fb632a (diff)
downloadscala-6539a9ddc5ecdec65ef1d874999a200cee46b2c4.tar.gz
scala-6539a9ddc5ecdec65ef1d874999a200cee46b2c4.tar.bz2
scala-6539a9ddc5ecdec65ef1d874999a200cee46b2c4.zip
SI-5784 Scaladoc: Type templates
@template and @documentable are now synomims.
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/doc/model/ModelFactory.scala3
-rw-r--r--src/compiler/scala/tools/nsc/doc/model/comment/CommentFactory.scala2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/doc/model/ModelFactory.scala b/src/compiler/scala/tools/nsc/doc/model/ModelFactory.scala
index eba3e080ef..af33911681 100644
--- a/src/compiler/scala/tools/nsc/doc/model/ModelFactory.scala
+++ b/src/compiler/scala/tools/nsc/doc/model/ModelFactory.scala
@@ -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") }
}
diff --git a/src/compiler/scala/tools/nsc/doc/model/comment/CommentFactory.scala b/src/compiler/scala/tools/nsc/doc/model/comment/CommentFactory.scala
index ac737b6ee3..1a11964e37 100644
--- a/src/compiler/scala/tools/nsc/doc/model/comment/CommentFactory.scala
+++ b/src/compiler/scala/tools/nsc/doc/model/comment/CommentFactory.scala
@@ -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]] =