aboutsummaryrefslogtreecommitdiff
path: root/dottydoc/jvm/src/dotty/tools/dottydoc/model/factories.scala
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2016-08-06 20:53:15 +0200
committerFelix Mulder <felix.mulder@gmail.com>2016-08-19 15:37:33 +0200
commit922788ac39f7538b79b58c326bd22c641a8e2490 (patch)
treec24de6db3dc8536a7aadc72d569a3212fcafe9f2 /dottydoc/jvm/src/dotty/tools/dottydoc/model/factories.scala
parent94dd0bccbb68618bc668c6005316d6930ae26069 (diff)
downloaddotty-922788ac39f7538b79b58c326bd22c641a8e2490.tar.gz
dotty-922788ac39f7538b79b58c326bd22c641a8e2490.tar.bz2
dotty-922788ac39f7538b79b58c326bd22c641a8e2490.zip
Add info on where implicitly added members originate from
Diffstat (limited to 'dottydoc/jvm/src/dotty/tools/dottydoc/model/factories.scala')
-rw-r--r--dottydoc/jvm/src/dotty/tools/dottydoc/model/factories.scala19
1 files changed, 2 insertions, 17 deletions
diff --git a/dottydoc/jvm/src/dotty/tools/dottydoc/model/factories.scala b/dottydoc/jvm/src/dotty/tools/dottydoc/model/factories.scala
index f0c78fa41..4d80c08a9 100644
--- a/dottydoc/jvm/src/dotty/tools/dottydoc/model/factories.scala
+++ b/dottydoc/jvm/src/dotty/tools/dottydoc/model/factories.scala
@@ -29,26 +29,11 @@ object factories {
def path(sym: Symbol)(implicit ctx: Context): List[String] = sym match {
case sym if sym.name.decode.toString == "<root>" => Nil
- case sym if sym is Flags.Module => path(sym.owner) :+ sym.name.decode.toString.dropRight(1)
- case sym => path(sym.owner) :+ sym.name.decode.toString
+ case sym => path(sym.owner) :+ sym.name.show
}
private val product = """Product[1-9][0-9]*""".r
- private def cleanTitle(title: String): String = title match {
- // matches Entity.this.Something
- case x if x matches "[^\\[]+\\.this\\..+" => x.split("\\.").last
- // Matches Entity[P, ...]
- case x if x matches "[^\\[]+\\[[^\\]]+\\]" =>
- val Array(tpe, params) = x.dropRight(1).split("\\[")
- s"""$tpe[${params.split(",").map(x => cleanTitle(x.trim)).mkString(", ")}]"""
- case _ => title
- }
-
- private def cleanQuery(query: String): String = query match {
- case x if x matches "[^\\[]+\\[[^\\]]+\\]" => x.takeWhile(_ != '[')
- case _ => query
- }
def returnType(t: Type)(implicit ctx: Context): Reference = {
val defn = ctx.definitions
@@ -107,7 +92,7 @@ object factories {
case tt: ThisType =>
expandTpe(tt.underlying)
case ci: ClassInfo =>
- typeRef(ci.cls.show)
+ typeRef(ci.cls.name.show)
case mt: MethodType =>
expandTpe(mt.resultType)
case pt: PolyType =>