diff options
author | aclement <aclement> | 2004-04-14 16:02:15 +0000 |
---|---|---|
committer | aclement <aclement> | 2004-04-14 16:02:15 +0000 |
commit | d3f22340b84c9254f7893e71fedb40ac7467abf9 (patch) | |
tree | d0927679e4638e632da9ae9438bf0df5653a3f63 /ajdoc/src | |
parent | f00f5060e388cde58ad0088d29fb6cb7c66302aa (diff) | |
download | aspectj-d3f22340b84c9254f7893e71fedb40ac7467abf9.tar.gz aspectj-d3f22340b84c9254f7893e71fedb40ac7467abf9.zip |
Georges fix for relative paths in ajdoc. Means we support multiple browsers and the doc is portable.
Diffstat (limited to 'ajdoc/src')
-rw-r--r-- | ajdoc/src/org/aspectj/tools/ajdoc/HtmlDecorator.java | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/ajdoc/src/org/aspectj/tools/ajdoc/HtmlDecorator.java b/ajdoc/src/org/aspectj/tools/ajdoc/HtmlDecorator.java index e680bdd0a..655eb4aca 100644 --- a/ajdoc/src/org/aspectj/tools/ajdoc/HtmlDecorator.java +++ b/ajdoc/src/org/aspectj/tools/ajdoc/HtmlDecorator.java @@ -431,6 +431,10 @@ class HtmlDecorator { = "<TABLE WIDTH=\"100%\" BGCOLOR=#FFFFFF><TR>" + "<TD width=\"15%\" bgcolor=\"#FFD8B0\"><B><FONT COLOR=000000> Advised by:</font></b></td><td>"; + String relativePackagePath = + getRelativePathFromHere( + node.getPackageName().replace('.', '/') + Config.DIR_SEP_CHAR); + List addedNames = new ArrayList(); for (Iterator it = targets.iterator(); it.hasNext(); ) { String currHandle = (String)it.next(); @@ -443,8 +447,11 @@ class HtmlDecorator { String hrefName = ""; String hrefLink = ""; - - hrefLink = rootDir.getAbsolutePath() + "/" + packagePath; + + // Start the hRefLink with the relative path based on where + // *this* type (i.e. the advised) is in the package structure. + hrefLink = relativePackagePath + packagePath; + if (currDecl.getPackageName() != null ) { hrefName = currDecl.getPackageName().replace('.', '/'); // hrefLink = "";//+ currDecl.getPackageName() + Config.DIR_SEP_CHAR; @@ -482,6 +489,10 @@ class HtmlDecorator { = "<TABLE WIDTH=\"100%\" BGCOLOR=#FFFFFF><TR>" + "<TD width=\"10%\" bgcolor=\"#FFD8B0\"><B><FONT COLOR=000000> Advises:</b></font></td><td>"; + String relativePackagePath = + getRelativePathFromHere( + decl.getPackageName().replace('.', '/') + Config.DIR_SEP_CHAR); + List addedNames = new ArrayList(); // for ensuring that we don't add duplciates for (Iterator it = targets.iterator(); it.hasNext(); ) { String currHandle = (String)it.next(); @@ -501,9 +512,10 @@ class HtmlDecorator { packagePath + typeSignature; + // Start the hRefLink with the relative path based on where + // *this* type (i.e. the advisor) is in the package structure. String hrefLink = - rootDir.getAbsolutePath() + "/" -// getRelativePathFromHere(packagePath) + relativePackagePath + packagePath + typeSignature + ".html"; |