コード例 #1
0
  String getFileCommentContent(Element e) {
    if (e == null || result.config.limitComments) return null;

    String f = Element.getFileOfAscendency(e);
    if (f == null && e != null && e.getElementLine() >= 0)
      return "<i>native declaration : line " + e.getElementLine() + "</i>";

    return f == null ? null : getFileCommentContent(new File(f), e);
  }
コード例 #2
0
 String getFileCommentContent(File file, Element e) {
   if (file != null) {
     String path = result.config.relativizeFileForSourceComments(file.getAbsolutePath());
     String inCategoryStr = "";
     if (e instanceof Function) {
       Function fc = (Function) e;
       Struct parent;
       if (fc.getType() == Type.ObjCMethod
           && ((parent = as(fc.getParentElement(), Struct.class)) != null)
           && (parent.getCategoryName() != null)) {
         inCategoryStr = "from " + parent.getCategoryName() + " ";
       }
     }
     return "<i>"
         + inCategoryStr
         + "native declaration : "
         + path
         + (e == null || e.getElementLine() < 0 ? "" : ":" + e.getElementLine())
         + "</i>";
   } else if (e != null && e.getElementLine() >= 0) {
     return "<i>native declaration : <input>:" + e.getElementLine() + "</i>";
   }
   return null;
 }