summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten <mkersten>2004-04-08 15:08:23 +0000
committermkersten <mkersten>2004-04-08 15:08:23 +0000
commit0c17e65b4d18052e78c6a67bae77a0b3a0427a8c (patch)
tree845af4677b524fb282fccee760101224d10cf6ae
parent66be44ad6c64129239852054a3e75b0c5958035f (diff)
downloadaspectj-0c17e65b4d18052e78c6a67bae77a0b3a0427a8c.tar.gz
aspectj-0c17e65b4d18052e78c6a67bae77a0b3a0427a8c.zip
Fixed: 57780 ajdoc package summary should not show synthetic information
-rw-r--r--ajdoc/src/org/aspectj/tools/ajdoc/Main.java44
1 files changed, 32 insertions, 12 deletions
diff --git a/ajdoc/src/org/aspectj/tools/ajdoc/Main.java b/ajdoc/src/org/aspectj/tools/ajdoc/Main.java
index dfccf037c..ea8a2d96f 100644
--- a/ajdoc/src/org/aspectj/tools/ajdoc/Main.java
+++ b/ajdoc/src/org/aspectj/tools/ajdoc/Main.java
@@ -17,7 +17,10 @@ package org.aspectj.tools.ajdoc;
import java.io.*;
import java.util.*;
+import java.io.FileFilter;
+
import org.aspectj.bridge.Version;
+import org.aspectj.util.FileUtil;
/**
* This is an old implementation of ajdoc that does not use an OO style. However, it
@@ -214,13 +217,25 @@ public class Main implements Config {
symbolManager,
inputFiles,
docModifier);
+
System.out.println( "> Removing generated tags (this may take a while)..." );
- removeDeclIDsFromFile("index-all.html");
- removeDeclIDsFromFile("serialized-form.html");
- for (int p = 0; p < packageList.size(); p++) {
- removeDeclIDsFromFile(((String)packageList.elementAt(p)).replace('.','/') +
- Config.DIR_SEP_CHAR +
- "package-summary.html" );
+ removeDeclIDsFromFile("index-all.html", true);
+ removeDeclIDsFromFile("serialized-form.html", true);
+ if (packageList.size() > 0) {
+ for (int p = 0; p < packageList.size(); p++) {
+ removeDeclIDsFromFile(((String)packageList.elementAt(p)).replace('.','/') +
+ Config.DIR_SEP_CHAR +
+ "package-summary.html", true);
+ }
+ } else {
+ File[] files = FileUtil.listFiles(rootDir, new FileFilter() {
+ public boolean accept(File f) {
+ return f.getName().equals("package-summary.html");
+ }
+ });
+ for (int j = 0; j < files.length; j++) {
+ removeDeclIDsFromFile(files[j].getAbsolutePath(), false);
+ }
}
System.out.println( "> Finished." );
} catch (Throwable e) {
@@ -228,10 +243,15 @@ public class Main implements Config {
exit(-2);
}
}
-
- static void removeDeclIDsFromFile(String filename) {
+
+ private static void removeDeclIDsFromFile(String filename, boolean relativePath) {
// Remove the decl ids from "index-all.html"
- File indexFile = new File( docDir + Config.DIR_SEP_CHAR + filename );
+ File indexFile;
+ if (relativePath) {
+ indexFile = new File(docDir + Config.DIR_SEP_CHAR + filename);
+ } else {
+ indexFile = new File(filename);
+ }
try {
if ( indexFile.exists() ) {
BufferedReader indexFileReader = new BufferedReader( new FileReader( indexFile ) );
@@ -495,9 +515,9 @@ public class Main implements Config {
else if ( arg.equals( "-source" ) ) {
addNextAsOption = true;
addNextToAJCOptions = true;
- addNextAsClasspath = true;
- options.addElement( arg );
- ajcOptions.addElement( arg );
+ addNextAsClasspath = false;
+ options.addElement(arg);
+ ajcOptions.addElement(arg);
}
else if ( arg.equals( "-classpath" ) ) {
addNextAsOption = true;