All Downloads are FREE. Search and download functionalities are using the official Maven repository.

scala.tools.nsc.doc.html.page.ReferenceIndex.scala Maven / Gradle / Ivy

There is a newer version: 2.11.2
Show newest version
/* NSC -- new Scala compiler
 * Copyright 2007-2013 LAMP/EPFL
 * @author  Pedro Furlanetto
 */

package scala.tools.nsc
package doc
package html
package page
import doc.model._

class ReferenceIndex(letter: Char, index: doc.Index, universe: Universe) extends HtmlPage {

  def path = List("index-"+letter+".html", "index")

  def title = {
    val s = universe.settings
    ( if (!s.doctitle.isDefault) s.doctitle.value else "" ) +
    ( if (!s.docversion.isDefault) (" " + s.docversion.value) else "" )
  }

  def headers =
    
      
      
    


  private def entry(name: String, methods: Iterable[MemberEntity]) = {
    val occurrences = methods.map(method => {
      val html = templateToHtml(method.inDefinitionTemplates.head)
      if (method.deprecation.isDefined) {
        { html }
      } else {
        html
      }
    }).toList.distinct

    
{ if (methods.find { ! _.deprecation.isDefined } != None) name else { name } }
{ for (owner <- occurrences) yield owner ++ scala.xml.Text(" ") }
} def body = { for(groups <- index.firstLetterIndex(letter)) yield entry(groups._1, groups._2.view) } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy