OSDN Git Service

Refactor show_annotations_list to remove HTML tags from method params
authorJeff Arneson <jarneson@google.com>
Mon, 15 Sep 2014 16:53:15 +0000 (09:53 -0700)
committerJeff Arneson <jarneson@google.com>
Mon, 15 Sep 2014 17:02:14 +0000 (10:02 -0700)
No need to pass in the HTML tags to start and end the list, since
we do the same thing everywhere, and it wasn't very complete anyways.

Change-Id: I504b78b699a03cc5ba7c6f0584173087aab2024b

tools/droiddoc/templates-sdk/class.cs
tools/droiddoc/templates-sdk/classes.cs
tools/droiddoc/templates-sdk/macros_override.cs

index deffa30..8ffe2f9 100644 (file)
@@ -124,7 +124,7 @@ Summary:
   <?cs /if ?>
   <?cs set:colspan = colspan-1 ?>
 <?cs /each ?>
-<?cs call:show_annotations_list(class, "<span class='annotation-message'>Included in documentation by the annotations: ", "</span>") ?>
+<?cs call:show_annotations_list(class) ?>
 
 </div><!-- end header -->
 
@@ -197,7 +197,7 @@ Summary:
         <?cs if:subcount(method.shortDescr) || subcount(method.deprecated) ?>
         <div class="jd-descrdiv">
           <?cs call:short_descr(method) ?>
-          <?cs call:show_annotations_list(method, "<span class='annotation-message'>Included in documentation by the annotations: ", "</span>") ?>
+          <?cs call:show_annotations_list(method) ?>
         </div>
   <?cs /if ?>
   </td></tr>
@@ -217,7 +217,7 @@ Summary:
           <td class="jd-linkcol"><?cs call:cond_link(field.name, toroot, field.href, included) ?></td>
           <td class="jd-descrcol" width="100%">
             <?cs call:short_descr(field) ?>
-            <?cs call:show_annotations_list(field, "<span class='annotation-message'>Included in documentation by the annotations: ", "</span>") ?>
+            <?cs call:show_annotations_list(field) ?>
           </td>
       </tr>
       <?cs set:count = count + #1 ?>
@@ -232,7 +232,7 @@ Summary:
         <td class="jd-linkcol"><?cs call:cond_link(field.name, toroot, field.href, included) ?></td>
         <td class="jd-descrcol" width="100%">
           <?cs call:short_descr(field) ?>
-          <?cs call:show_annotations_list(field, "<span class='annotation-message'>Included in documentation by the annotations: ", "</span>") ?>
+          <?cs call:show_annotations_list(field) ?>
         </td>
     </tr>
     <?cs set:count = count + #1 ?>
@@ -255,7 +255,7 @@ Summary:
         </td>
         <td class="jd-descrcol" width="100%">
           <?cs call:short_descr(attr) ?>&nbsp;
-          <?cs call:show_annotations_list(attr, "<span class='annotation-message'>Included in documentation by the annotations: ", "</span>") ?>
+          <?cs call:show_annotations_list(attr) ?>
         </td>
     </tr>
     <?cs set:count = count + #1 ?>
@@ -275,7 +275,7 @@ Summary:
       <td class="jd-linkcol"><?cs call:type_link(cl.type) ?></td>
       <td class="jd-descrcol" width="100%">
         <?cs call:short_descr(cl) ?>&nbsp;
-        <?cs call:show_annotations_list(cl, "<span class='annotation-message'>Included in documentation by the annotations: ", "</span>") ?>
+        <?cs call:show_annotations_list(cl) ?>
       </td>
     </tr>
     <?cs set:count = count + #1 ?>
@@ -354,7 +354,7 @@ Summary:
         <td class="jd-linkcol"><?cs call:cond_link(field.name, toroot, field.href, cl.included) ?>&nbsp;</td>
         <td class="jd-descrcol" width="100%">
           <?cs call:short_descr(field) ?>&nbsp;
-          <?cs call:show_annotations_list(field, "<span class='annotation-message'>Included in documentation by the annotations: ", "</span>") ?>
+          <?cs call:show_annotations_list(field) ?>
         </td>
     </tr>
     <?cs set:count = count + #1 ?>
@@ -524,7 +524,7 @@ From <?cs var:cl.kind ?>
         <?cs call:federated_refs(field) ?>
       </div>
     <div class="jd-details-descr">
-      <?cs call:show_annotations_list(field, "<span class='annotation-message'>Included in documentation by the annotations: ", "</span>") ?>
+      <?cs call:show_annotations_list(field) ?>
       <?cs call:description(field) ?>
     <?cs if:subcount(field.constantValue) ?>
         <div class="jd-tagdata">
@@ -567,7 +567,7 @@ From <?cs var:cl.kind ?>
         <?cs call:federated_refs(method) ?>
       </div>
     <div class="jd-details-descr">
-      <?cs call:show_annotations_list(method, "<span class='annotation-message'>Included in documentation by the annotations: ", "</span>") ?>
+      <?cs call:show_annotations_list(method) ?>
       <?cs call:description(method) ?>
     </div>
 </div>
@@ -582,7 +582,7 @@ From <?cs var:cl.kind ?>
     <h4 class="jd-details-title"><?cs var:attr.name ?>
     </h4>
     <div class="jd-details-descr">
-        <?cs call:show_annotations_list(attr, "<span class='annotation-message'>Included in documentation by the annotations: ", "</span>") ?>
+        <?cs call:show_annotations_list(attr) ?>
         <?cs call:description(attr) ?>
 
         <div class="jd-tagdata">
index 84cca81..4eab438 100644 (file)
@@ -33,7 +33,7 @@
             <td class="jd-linkcol"><?cs call:type_link(cl.type) ?></td>
             <td class="jd-descrcol" width="100%">
               <?cs call:short_descr(cl) ?>&nbsp;
-              <?cs call:show_annotations_list(cl, "<span class='annotation-message'>Included in documentation by the annotations: ", "</span>") ?>
+              <?cs call:show_annotations_list(cl) ?>
             </td>
         </tr>
     <?cs set:count = count + #1 ?>
index 6ff8f58..1525be5 100644 (file)
@@ -2,17 +2,18 @@
 <?cs # pre is an HTML string to start the list, post is an HTML string to close the list ?>
 <?cs # for example call:show_annotations_list(cl, "<td>Annotations: ", "</td>") ?>
 <?cs # if obj has nothing on obj.showAnnotations, nothing will be output ?>
-<?cs def:show_annotations_list(obj, pre, post) ?>
+<?cs def:show_annotations_list(obj) ?>
     <?cs each:anno = obj.showAnnotations ?>
       <?cs if:first(anno) ?>
-        <?cs var:pre ?>
+        <span class='annotation-message'>
+          Included in documention by the annotations:
       <?cs /if ?>
       @<?cs var:anno.type.label ?>
       <?cs if:last(anno) == 0 ?>
         , &nbsp;
       <?cs /if ?>
       <?cs if:last(anno)?>
-        <?cs var:post ?>
+        </span>
       <?cs /if ?>
     <?cs /each ?>
 <?cs /def ?>
@@ -26,7 +27,7 @@
         <td class="jd-linkcol"><?cs call:type_link(cl.type) ?></td>
         <td class="jd-descrcol" width="100%">
           <?cs call:short_descr(cl) ?>&nbsp;
-          <?cs call:show_annotations_list(cl, "<span class='annotation-message'>Included in documentation by the annotations: ", "</span>") ?>
+          <?cs call:show_annotations_list(cl) ?>
         </td>
       </tr>
       <?cs set:count = count + #1 ?>