Skip to content
Browse files

added exported imports sectio (not decoreated yet) to scaladoc.

  • Loading branch information...
1 parent 9df64b0 commit 3512e20d2ce014ea5fd51803dea955577b5a6355 @rssh committed
View
14 src/compiler/scala/tools/nsc/doc/html/page/Template.scala
@@ -635,6 +635,18 @@ class Template(universe: doc.Universe, generator: DiagramGenerator, tpl: DocTemp
case _ => NodeSeq.Empty
}
+ val exportedImports = mbr match {
+ case dtpl: DocTemplateEntity if isSelf && !isReduced && dtpl.exportedImports.nonEmpty =>
+ <div class="toggleContainer block">
+ <span class="toggle">Exported Imports</span>
+ <div class="exportedImports hiddenContent">{
+ // !!!
+ Text(dtpl.exportedImports.toString)
+ }</div>
+ </div>
+ case _ => NodeSeq.Empty
+ }
+
val subclasses = mbr match {
case dtpl: DocTemplateEntity if isSelf && !isReduced && dtpl.allSubClasses.nonEmpty =>
<div class="toggleContainer block">
@@ -669,7 +681,7 @@ class Template(universe: doc.Universe, generator: DiagramGenerator, tpl: DocTemp
val typeHierarchy = createDiagram(_.inheritanceDiagram, "Type Hierarchy", "inheritance-diagram")
val contentHierarchy = createDiagram(_.contentDiagram, "Content Hierarchy", "content-diagram")
- memberComment ++ paramComments ++ attributesBlock ++ linearization ++ subclasses ++ typeHierarchy ++ contentHierarchy
+ memberComment ++ paramComments ++ attributesBlock ++ linearization ++ subclasses ++ typeHierarchy ++ contentHierarchy ++ exportedImports
}
def boundsToHtml(hi: Option[TypeEntity], lo: Option[TypeEntity], hasLinks: Boolean): NodeSeq = {
View
4 src/compiler/scala/tools/nsc/doc/model/Entity.scala
@@ -331,6 +331,10 @@ trait DocTemplateEntity extends MemberTemplateEntity {
NOTE: Some classes might not be included in the scaladoc run so they will be NoDocTemplateEntities */
def outgoingImplicitlyConvertedClasses: List[(TemplateEntity, TypeEntity, ImplicitConversion)]
+ /** List of all exported imports */
+ def exportedImports: List[ExportedImportEntity]
+
+
/** If this template takes place in inheritance and implicit conversion relations, it will be shown in this diagram */
def inheritanceDiagram: Option[Diagram]
View
5 src/compiler/scala/tools/nsc/doc/model/ModelFactory.scala
@@ -378,7 +378,8 @@ class ModelFactory(val global: Global, val settings: doc.Settings) {
if (settings.docImplicits.value) makeImplicitConversions(sym, this) else Nil
// members as given by the compiler
- lazy val memberSyms = sym.info.members.filter(s => membersShouldDocument(s, this)).toList
+ lazy val memberSyms = sym.info.members.filter(s => membersShouldDocument(s, this)).toList
+
// the inherited templates (classes, traits or objects)
var memberSymsLazy = memberSyms.filter(t => templateShouldDocument(t, this) && !inOriginalOwner(t, this))
@@ -388,7 +389,7 @@ class ModelFactory(val global: Global, val settings: doc.Settings) {
val ownMembers = (memberSymsEager.flatMap(makeMember(_, None, this)))
// all the members that are documentented PLUS the members inherited by implicit conversions
- var members: List[MemberImpl] = ownMembers
+ var members: List[MemberImpl] = ownMembers
def templates = members collect { case c: TemplateEntity with MemberEntity => c }
def methods = members collect { case d: Def => d }

0 comments on commit 3512e20

Please sign in to comment.
Something went wrong with that request. Please try again.