summaryrefslogtreecommitdiffstats
path: root/ajdoc
diff options
context:
space:
mode:
authoraclement <aclement>2004-04-14 16:02:15 +0000
committeraclement <aclement>2004-04-14 16:02:15 +0000
commitd3f22340b84c9254f7893e71fedb40ac7467abf9 (patch)
treed0927679e4638e632da9ae9438bf0df5653a3f63 /ajdoc
parentf00f5060e388cde58ad0088d29fb6cb7c66302aa (diff)
downloadaspectj-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')
-rw-r--r--ajdoc/src/org/aspectj/tools/ajdoc/HtmlDecorator.java20
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>&nbsp;Advised&nbsp;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>&nbsp;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";