]> source.dussan.org Git - aspectj.git/commitdiff
240234, comment 19 - patch for ajdoc
authoraclement <aclement>
Thu, 31 Jul 2008 18:24:25 +0000 (18:24 +0000)
committeraclement <aclement>
Thu, 31 Jul 2008 18:24:25 +0000 (18:24 +0000)
ajdoc/src/org/aspectj/tools/ajdoc/Config.java
ajdoc/src/org/aspectj/tools/ajdoc/Main.java

index eeea9d9c93f8b9f3bcb992de96b560876186f96a..4a65f105fa34ebffadfe54084440c0d35feb0f9b 100644 (file)
@@ -33,6 +33,9 @@ interface Config {
                                "  -classpath <pathlist>     Specify where to find user class files\n" +
                                "  -bootclasspath <pathlist> Override location of class files loaded\n" +
                                "  -d <directory>            Destination directory for output files\n" +
+                               "  -windowtitle <text>       Browser window title for the documenation" +
+                               "  -bottom <html-code>       Include bottom text for each page" +
+                               "  -link <url>               Create links to javadoc output at <url>" +
                                "  -argfile <file>           Build config file (wildcards not supported)\n" +
                                "  -verbose                  Output messages about what Javadoc is doing\n" +
                                "  -v                        Print out the version of ajdoc\n" +
index 913e07992ff6a84b3c3fd8cdc6ab47a256679bbf..a236421efb66463bfc3171d77fb6a9814acc4d2e 100644 (file)
@@ -224,7 +224,7 @@ public class Main implements Config {
                                           inputFiles,
                                           docModifier); 
         
-        System.out.println( "> Removing generated tags (this may take a while)..." );
+        System.out.println( "> Removing generated tags..." );
         removeDeclIDsFromFile("index-all.html", true);
         removeDeclIDsFromFile("serialized-form.html", true);
         if (packageList.size() > 0) {
@@ -261,7 +261,8 @@ public class Main implements Config {
         try {
         if ( indexFile.exists() ) {
             BufferedReader indexFileReader = new BufferedReader( new FileReader( indexFile ) );
-            String indexFileBuffer = "";
+            // StringBuffer greatly reduces the time it takes to remove generated tags
+            StringBuffer indexFileBuffer = new StringBuffer((int)indexFile.length());
             String line = indexFileReader.readLine();
             while ( line != null ) {
               int indexStart = line.indexOf( Config.DECL_ID_STRING );
@@ -270,11 +271,11 @@ public class Main implements Config {
                 line = line.substring( 0, indexStart ) +
                        line.substring( indexEnd+Config.DECL_ID_TERMINATOR.length() );
               }
-              indexFileBuffer += line;
+              indexFileBuffer.append(line);
               line = indexFileReader.readLine();
             }
             FileOutputStream fos = new FileOutputStream( indexFile );
-            fos.write( indexFileBuffer.getBytes() );
+            fos.write( indexFileBuffer.toString().getBytes() );
             
             indexFileReader.close();
             fos.close();
@@ -515,6 +516,15 @@ public class Main implements Config {
                 addNextAsSourcePath = true;
                 //options.addElement( arg );
                 //ajcOptions.addElement( arg );
+            } else if ( arg.equals( "-link" ) ) {
+                addNextAsOption = true;
+               options.addElement(arg);
+            } else if ( arg.equals( "-bottom" ) ) {
+                addNextAsOption = true;
+               options.addElement(arg);
+            } else if ( arg.equals( "-windowtitle" ) ) {
+                addNextAsOption = true;
+               options.addElement(arg);
             } else if (arg.equals("-XajdocDebug")) {
                deleteTempFilesOnExit = false;
             } else if (arg.equals("-use")) {