From 8f00831a5444d8bcdd81584596033fd5a6dc9add Mon Sep 17 00:00:00 2001 From: aclement Date: Thu, 31 Jul 2008 18:24:25 +0000 Subject: [PATCH] 240234, comment 19 - patch for ajdoc --- ajdoc/src/org/aspectj/tools/ajdoc/Config.java | 3 +++ ajdoc/src/org/aspectj/tools/ajdoc/Main.java | 18 ++++++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/ajdoc/src/org/aspectj/tools/ajdoc/Config.java b/ajdoc/src/org/aspectj/tools/ajdoc/Config.java index eeea9d9c9..4a65f105f 100644 --- a/ajdoc/src/org/aspectj/tools/ajdoc/Config.java +++ b/ajdoc/src/org/aspectj/tools/ajdoc/Config.java @@ -33,6 +33,9 @@ interface Config { " -classpath Specify where to find user class files\n" + " -bootclasspath Override location of class files loaded\n" + " -d Destination directory for output files\n" + + " -windowtitle Browser window title for the documenation" + + " -bottom Include bottom text for each page" + + " -link Create links to javadoc output at " + " -argfile Build config file (wildcards not supported)\n" + " -verbose Output messages about what Javadoc is doing\n" + " -v Print out the version of ajdoc\n" + diff --git a/ajdoc/src/org/aspectj/tools/ajdoc/Main.java b/ajdoc/src/org/aspectj/tools/ajdoc/Main.java index 913e07992..a236421ef 100644 --- a/ajdoc/src/org/aspectj/tools/ajdoc/Main.java +++ b/ajdoc/src/org/aspectj/tools/ajdoc/Main.java @@ -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")) { -- 2.39.5