cherry pick from jb-dev-docs
Change-Id: I87accadfadc9d4535f3c4aed1b4bcebb05a38454

don't show generics declarations in the sidenav
this requires adding a second "override" method to take an argument
specifying whether the link is for the sidenav, so that we still
show the generics info in other places such as where the class is
cited as a method argument.

bug: 7242415
diff --git a/res/assets/templates/macros.cs b/res/assets/templates/macros.cs
index db958cd..72139f4 100644
--- a/res/assets/templates/macros.cs
+++ b/res/assets/templates/macros.cs
@@ -6,6 +6,8 @@
 <?cs # A link to a type, or not if it's a primitive type
         link: whether to create a link at the top level, always creates links in
               recursive invocations.
+              Overloaded version to support use of 'nav' parameter, which when true,
+              will not include the generics in the class name (good for sidenav lists)
         Expects the following fields:
             .name
             .link
@@ -14,14 +16,16 @@
             .extendsBounds.N.(more links) (... extends ... & ...)
             .typeArguments.N.(more links) (< ... >)
 ?><?cs 
-def:type_link_impl(type, link) ?><?cs 
+def:type_link_impl(type, link) ?><?cs call:type_link_impl2(type, link, "false") ?><?cs /def ?><?cs
+def:type_link_impl2(type, link, nav) ?><?cs
   if:type.link && link=="true" ?><?cs
     if:type.federated ?><a href="<?cs var:type.link ?>"><?cs
       var:type.label ?></a><?cs 
     else ?><a href="<?cs var:toroot ?><?cs var:type.link ?>"><?cs var:type.label ?></a><?cs
     /if ?><?cs
   else ?><?cs var:type.label ?><?cs
-  /if ?><?cs if:subcount(type.extendsBounds) ?><?cs
+  /if ?><?cs 
+  if:subcount(type.extendsBounds) ?><?cs
       each:t=type.extendsBounds ?><?cs
           if:first(t) ?>&nbsp;extends&nbsp;<?cs else ?>&nbsp;&amp;&nbsp;<?cs /if ?><?cs
           call:type_link_impl(t, "true") ?><?cs
@@ -33,7 +37,7 @@
           call:type_link_impl(t, "true") ?><?cs
       /each ?><?cs
   /if ?><?cs
-  if:subcount(type.typeArguments)
+  if:subcount(type.typeArguments) && nav=="false"
       ?>&lt;<?cs each:t=type.typeArguments ?><?cs call:type_link_impl(t, "true") ?><?cs
           if:!last(t) ?>,&nbsp;<?cs /if ?><?cs
       /each ?>&gt;<?cs
@@ -41,7 +45,8 @@
 /def ?>
 
 <?cs def:class_name(type) ?><?cs call:type_link_impl(type, "false") ?><?cs /def ?>
-<?cs def:type_link(type) ?><?cs call:type_link_impl(type, "true") ?><?cs /def ?>
+<?cs def:type_link2(type,nav) ?><?cs call:type_link_impl2(type, "true", nav) ?><?cs /def ?>
+<?cs def:type_link(type) ?><?cs call:type_link2(type, "false") ?><?cs /def ?>
 
 <?cs # a conditional link.
       if the "condition" parameter evals to true then the link is displayed
@@ -236,7 +241,7 @@
     <li><h2><?cs var:label ?></h2>
       <ul><?cs 
       each:cl=classes ?>
-          <li class="<?cs if:class.name == cl.label?>selected <?cs /if ?>api apilevel-<?cs var:cl.since ?>"><?cs call:type_link(cl) ?></li><?cs 
+          <li class="<?cs if:class.name == cl.label?>selected <?cs /if ?>api apilevel-<?cs var:cl.since ?>"><?cs call:type_link2(cl,"true") ?></li><?cs
       /each ?>
       </ul>
     </li><?cs