diff options
author | Paul Phillips <paulp@improving.org> | 2011-03-31 20:44:29 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-03-31 20:44:29 +0000 |
commit | fe0e4b473fe45157bd59012e5e44e87c8f1b99b0 (patch) | |
tree | 3f9a003a83fe73b5d81474d117b055a94b824235 /src | |
parent | 40263b7fa68b6dfa50b4f9a8e72726182243f3af (diff) | |
download | scala-fe0e4b473fe45157bd59012e5e44e87c8f1b99b0.tar.gz scala-fe0e4b473fe45157bd59012e5e44e87c8f1b99b0.tar.bz2 scala-fe0e4b473fe45157bd59012e5e44e87c8f1b99b0.zip |
Separated abstract and concrete value members i...
Separated abstract and concrete value members in scaladoc. This looks
like such a runaway improvement to me that I'm just checking it
in, but if anyone feels differently say the word. I eliminated the
abstract/concrete filter entirely as it is extraneous once you can just
see which is which.
Closes #3831, review by malayeri.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/doc/html/page/Template.scala | 24 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/doc/html/resource/lib/template.js | 18 |
2 files changed, 14 insertions, 28 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 8185b29246..93cc0beb89 100644 --- a/src/compiler/scala/tools/nsc/doc/html/page/Template.scala +++ b/src/compiler/scala/tools/nsc/doc/html/page/Template.scala @@ -31,6 +31,9 @@ class Template(tpl: DocTemplateEntity) extends HtmlPage { val valueMembers = tpl.methods ++ tpl.values ++ tpl.templates.filter(x => x.isObject || x.isPackage) sorted + val (absValueMembers, concValueMembers) = + valueMembers partition (_.isAbstract) + val typeMembers = tpl.abstractTypes ++ tpl.aliasTypes ++ tpl.templates.filter(x => x.isTrait || x.isClass) sorted @@ -82,12 +85,6 @@ class Template(tpl: DocTemplateEntity) extends HtmlPage { <ol><li class="public in">Public</li><li class="all out">All</li></ol> </div> } - { - <div id="impl"> - <span class="filtertype">Impl.</span> - <ol><li class="concrete in">Concrete</li><li class="abstract in">Abstract</li></ol> - </div> - } </div> { if (constructors.isEmpty) NodeSeq.Empty else @@ -104,10 +101,17 @@ class Template(tpl: DocTemplateEntity) extends HtmlPage { </div> } - { if (valueMembers.isEmpty) NodeSeq.Empty else - <div id="values" class="values members"> - <h3>Value Members</h3> - <ol>{ valueMembers map (memberToHtml(_)) }</ol> + { if (absValueMembers.isEmpty) NodeSeq.Empty else + <div id="abstract values" class="values members"> + <h3>Abstract Value Members</h3> + <ol>{ absValueMembers map (memberToHtml(_)) }</ol> + </div> + } + + { if (concValueMembers.isEmpty) NodeSeq.Empty else + <div id="concrete values" class="values members"> + <h3>{ if (absValueMembers.isEmpty) "Value Members" else "Concrete Value Members" }</h3> + <ol>{ concValueMembers map (memberToHtml(_)) }</ol> </div> } diff --git a/src/compiler/scala/tools/nsc/doc/html/resource/lib/template.js b/src/compiler/scala/tools/nsc/doc/html/resource/lib/template.js index ef98c13aaf..c0d6ae55a5 100644 --- a/src/compiler/scala/tools/nsc/doc/html/resource/lib/template.js +++ b/src/compiler/scala/tools/nsc/doc/html/resource/lib/template.js @@ -69,24 +69,6 @@ $(document).ready(function(){ filter(); }; }); - $("#impl > ol > li.concrete").click(function() { - if ($(this).hasClass("out")) { - $(this).removeClass("out").addClass("in"); - $("li[data-isabs='false']").show(); - } else { - $(this).removeClass("in").addClass("out"); - $("li[data-isabs='false']").hide(); - } - }); - $("#impl > ol > li.abstract").click(function() { - if ($(this).hasClass("out")) { - $(this).removeClass("out").addClass("in"); - $("li[data-isabs='true']").show(); - } else { - $(this).removeClass("in").addClass("out"); - $("li[data-isabs='true']").hide(); - } - }); $("#order > ol > li.alpha").click(function() { if ($(this).hasClass("out")) { $(this).removeClass("out").addClass("in"); |