JsTemplate/Link.js
[gnome.introspection-doc-generator] / JSDOC / BuildDocs.js
index ae3ecd1..e85c99c 100644 (file)
@@ -11,11 +11,13 @@ File = imports.File.File;
 Template = imports.JsTemplate.Template.Template;
 Link = imports.JsTemplate.Link.Link; // ?? fixme!??
 
-Parser   = imports.Parser.Parser;
-TextStream = imports.TextStream.TextStream;
+Parser      = imports.Parser.Parser;
+TextStream  = imports.TextStream.TextStream;
 TokenReader = imports.TokenReader.TokenReader;
 TokenStream = imports.TokenStream.TokenStream;
-Symbol = imports.Symbol.Symbol;
+Symbol      = imports.Symbol.Symbol;
+DocComment  = imports.DocComment.DocComment;
+
 /******************    INCLUDES ARE ALL AT THE BOTTOM OF THIS FILE!!!!! *******************/
 
 // should not realy be here -- or anywhere...??
@@ -218,6 +220,25 @@ BuildDocs = {
         function isaClass($) { 
             return ($.is("CONSTRUCTOR") || $.isNamespace); 
         }
+        function makeSortby(attribute) {
+            return function(a, b) {
+                if (a[attribute] != undefined && b[attribute] != undefined) {
+                    a = a[attribute]; //.toLowerCase();
+                    b = b[attribute];//.toLowerCase();
+                    if (a < b) return -1;
+                    if (a > b) return 1;
+                    return 0;
+                }
+            }
+        }
+        
+        
+        
+        
+        
+        
+        
+        
         
         var symbols = this.symbolSet.toArray();
         
@@ -273,7 +294,7 @@ BuildDocs = {
         var allFiles = [];
         
         for (var i = 0; i < files.length; i++) {
-            allFiles.push(new  Symbol(files[i], [], "FILE", new JSDOC.DocComment("/** */")));
+            allFiles.push(new  Symbol(files[i], [], "FILE", new DocComment("/** */")));
         }
         
         for (var i = 0; i < documentedFiles.length; i++) {