Shows modifiers before kinds. Fixes #4451. Contributed by Shows modifiers before kinds. Fixes #4451. Review by heathermiller.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25528 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
kzys 2011-08-20 19:38:57 +00:00
parent f104d80085
commit 4d6bb7beb9
2 changed files with 12 additions and 10 deletions

View File

@ -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 = {

View File

@ -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;
}