diff options
author | Kato Kazuyoshi <kato.kazuyoshi@gmail.com> | 2011-08-20 19:38:57 +0000 |
---|---|---|
committer | Kato Kazuyoshi <kato.kazuyoshi@gmail.com> | 2011-08-20 19:38:57 +0000 |
commit | 96066dec3030ad080f4353b797c4906702a15fe2 (patch) | |
tree | 6fe6e8a6abc0f932b5bdc58a5f7bba8ddefffd4a /src | |
parent | 7a49a9aea9909a2ab24bc8b9a3e87c4199ab1563 (diff) | |
download | scala-96066dec3030ad080f4353b797c4906702a15fe2.tar.gz scala-96066dec3030ad080f4353b797c4906702a15fe2.tar.bz2 scala-96066dec3030ad080f4353b797c4906702a15fe2.zip |
Shows modifiers before kinds.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/doc/html/page/Template.scala | 8 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/doc/html/resource/lib/template.css | 14 |
2 files changed, 12 insertions, 10 deletions
diff --git a/src/compiler/scala/tools/nsc/doc/html/page/Template.scala b/src/compiler/scala/tools/nsc/doc/html/page/Template.scala index 5617113ce3..9cac59c617 100644 --- a/src/compiler/scala/tools/nsc/doc/html/page/Template.scala +++ b/src/compiler/scala/tools/nsc/doc/html/page/Template.scala @@ -314,7 +314,7 @@ class Template(tpl: DocTemplateEntity) extends HtmlPage { // --- start attributes block vals val attributes: Seq[scala.xml.Node] = { - val fvs: List[comment.Paragraph] = visibility(mbr).toList ::: mbr.flags + val fvs: List[comment.Paragraph] = visibility(mbr).toList if (fvs.isEmpty || isReduced) NodeSeq.Empty else { <dt>Attributes</dt> @@ -487,7 +487,6 @@ class Template(tpl: DocTemplateEntity) extends HtmlPage { case tpl: DocTemplateEntity => docEntityKindToString(tpl) case ctor: Constructor => "new" case tme: MemberEntity => - ( if (tme.isImplicit) "implicit " else "" ) + ( if (tme.isDef) "def" else if (tme.isVal) "val" else if (tme.isLazyVal) "lazy val" @@ -529,7 +528,10 @@ class Template(tpl: DocTemplateEntity) extends HtmlPage { def signature(mbr: MemberEntity, isSelf: Boolean, isReduced: Boolean = false): NodeSeq = { def inside(hasLinks: Boolean, nameLink: String = ""): NodeSeq = <xml:group> - <span class="kind">{ kindToString(mbr) }</span> + <span class="modifier_kind"> + <span class="modifier">{ mbr.flags.map(flag => inlineToHtml(flag.text) ++ xml.Text(" ")) }</span> + <span class="kind">{ kindToString(mbr) }</span> + </span> <span class="symbol"> { val nameHtml = { diff --git a/src/compiler/scala/tools/nsc/doc/html/resource/lib/template.css b/src/compiler/scala/tools/nsc/doc/html/resource/lib/template.css index 441f6153e9..c9435338f8 100644 --- a/src/compiler/scala/tools/nsc/doc/html/resource/lib/template.css +++ b/src/compiler/scala/tools/nsc/doc/html/resource/lib/template.css @@ -125,7 +125,7 @@ text-decoration: none; padding: 8px; } -#signature > span.kind { +#signature > span.modifier_kind { display: inline; float: left; text-align: left; @@ -288,10 +288,10 @@ div.members > ol > li:last-child { text-shadow: white 0px 1px 0px; } -.signature .kind { +.signature .modifier_kind { position: absolute; text-align: right; - width: 8em; + width: 14em; } .signature > a > .symbol > .name { @@ -308,7 +308,7 @@ div.members > ol > li:last-child { .signature > .symbol { display: block; - padding-left: 8.7em; + padding-left: 14.7em; } .signature .name { @@ -477,7 +477,7 @@ div.members > ol > li:last-child { p.comment { display: block; - margin-left: 8.7em; + margin-left: 14.7em; margin-top: 5px; } @@ -499,11 +499,11 @@ div.fullcomment { #template div.fullcommenttop, #template div.fullcomment { display:none; - margin: 5px 0 0 8.7em; + margin: 5px 0 0 14.7em; } #template .shortcomment { - margin: 5px 0 0 8.7em; + margin: 5px 0 0 14.7em; padding: 0; } |