From 4b9de7deb27682100e09e0b55780f029754e0b7e Mon Sep 17 00:00:00 2001 From: chrisJames Date: Thu, 12 Aug 2010 11:59:21 +0000 Subject: [Scaladoc] Fixes a bug in defaultValues display... [Scaladoc] Fixes a bug in defaultValues display ('new A' now creates a link on A). Review by dubochet --- src/compiler/scala/tools/nsc/doc/model/TreeFactory.scala | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/compiler/scala/tools/nsc/doc/model/TreeFactory.scala') diff --git a/src/compiler/scala/tools/nsc/doc/model/TreeFactory.scala b/src/compiler/scala/tools/nsc/doc/model/TreeFactory.scala index 6d71e93ae4..6a5c8f6e8d 100755 --- a/src/compiler/scala/tools/nsc/doc/model/TreeFactory.scala +++ b/src/compiler/scala/tools/nsc/doc/model/TreeFactory.scala @@ -2,12 +2,12 @@ package scala.tools.nsc package doc package model -/** The goal of this trait is , using makeDefaultValue, - * to browse the tree of default values to - * 1- have the String of the DefaultValue (tree.expression) +/** The goal of this trait is , using makeTree, + * to browse a tree to + * 1- have the String of the complete tree (tree.expression) * 2- fill references to create hyperLinks later in html.pageTemplate * - * It is applied in ModelFactory => makeValueParam + * It is applied in ModelFactory => makeTree * */ @@ -62,9 +62,11 @@ trait TreeFactory { } } } - /** Goes through the tree of the rhs and makes links when a Select occurs, - * The cas of New(_) is ignored because the object we want to create a link on + /** + * Goes through the tree and makes links when a Select occurs, + * The case of New(_) is ignored because the object we want to create a link on * will be reached with recursivity and we don't want a link on the "new" string + * If a link is not created, its case is probably not defined in here */ override def traverse(tree:Tree) = tree match { case Select(qualifier, name) => @@ -73,6 +75,7 @@ trait TreeFactory { case _ => makeLink(tree) } traverse(qualifier) + case Ident(_) => makeLink(tree) case _ => super.traverse(tree) } -- cgit v1.2.3