diff options
author | Vlad Ureche <vlad.ureche@gmail.com> | 2012-07-11 22:28:00 +0200 |
---|---|---|
committer | Vlad Ureche <vlad.ureche@gmail.com> | 2012-07-16 23:41:44 +0200 |
commit | b651269275a4cfd72761586e088bff5a130949b5 (patch) | |
tree | 661f3e5231908c9c6fde222c499f8bf5e123a924 | |
parent | 740361b8ae5e9ac8c545b0be878bcae06070dcf0 (diff) | |
download | scala-b651269275a4cfd72761586e088bff5a130949b5.tar.gz scala-b651269275a4cfd72761586e088bff5a130949b5.tar.bz2 scala-b651269275a4cfd72761586e088bff5a130949b5.zip |
Scaladoc: Reducing the memory footprint 2
- got rid of references to WikiParser when creating EntityLinks
-rw-r--r-- | src/compiler/scala/tools/nsc/doc/model/MemberLookup.scala | 3 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/doc/model/comment/CommentFactory.scala | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/doc/model/MemberLookup.scala b/src/compiler/scala/tools/nsc/doc/model/MemberLookup.scala index 7b131c13ef..277e86f9af 100644 --- a/src/compiler/scala/tools/nsc/doc/model/MemberLookup.scala +++ b/src/compiler/scala/tools/nsc/doc/model/MemberLookup.scala @@ -12,6 +12,9 @@ trait MemberLookup { import global._ + def makeEntityLink(title: Inline, pos: Position, query: String, inTplOpt: Option[DocTemplateImpl]) = + new EntityLink(title) { lazy val link = memberLookup(pos, query, inTplOpt) } + def memberLookup(pos: Position, query: String, inTplOpt: Option[DocTemplateImpl]): LinkTo = { assert(modelFinished) diff --git a/src/compiler/scala/tools/nsc/doc/model/comment/CommentFactory.scala b/src/compiler/scala/tools/nsc/doc/model/comment/CommentFactory.scala index eff899b789..df913555a7 100644 --- a/src/compiler/scala/tools/nsc/doc/model/comment/CommentFactory.scala +++ b/src/compiler/scala/tools/nsc/doc/model/comment/CommentFactory.scala @@ -744,7 +744,7 @@ trait CommentFactory { thisFactory: ModelFactory with CommentFactory with Member case (SchemeUri(uri), optTitle) => Link(uri, optTitle getOrElse Text(uri)) case (qualName, optTitle) => - new EntityLink(optTitle getOrElse Text(target)) { def link = memberLookup(pos, target, inTplOpt) } + makeEntityLink(optTitle getOrElse Text(target), pos, target, inTplOpt) } } |