diff options
author | aclement <aclement> | 2004-04-05 15:00:49 +0000 |
---|---|---|
committer | aclement <aclement> | 2004-04-05 15:00:49 +0000 |
commit | 806b737230fd064080a38157b0bef0a7544a63f7 (patch) | |
tree | 9131896d321cbdaa9ae69b1aed85822725fa5b35 /ajdoc | |
parent | a5b477d102e2ba32d7e431bd2ab15c394b910e73 (diff) | |
download | aspectj-806b737230fd064080a38157b0bef0a7544a63f7.tar.gz aspectj-806b737230fd064080a38157b0bef0a7544a63f7.zip |
Fix broken links in ajdoc.
Diffstat (limited to 'ajdoc')
-rw-r--r-- | ajdoc/src/org/aspectj/tools/ajdoc/HtmlDecorator.java | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/ajdoc/src/org/aspectj/tools/ajdoc/HtmlDecorator.java b/ajdoc/src/org/aspectj/tools/ajdoc/HtmlDecorator.java index 7517f4f4e..8b85a6761 100644 --- a/ajdoc/src/org/aspectj/tools/ajdoc/HtmlDecorator.java +++ b/ajdoc/src/org/aspectj/tools/ajdoc/HtmlDecorator.java @@ -483,7 +483,13 @@ class HtmlDecorator { } else { linkName = packagePath + currDecl.getParent().getName() + "." + currDecl.getName(); - linkRef = currDecl.getParent().getName() + ".html" + "#" + currDecl.toLabelString(); + linkRef = + getRelativeComponent(packagePath) + + packagePath + + currDecl.getParent().getName() + + ".html" + + "#" + + currDecl.toLabelString(); // // XXX: only one level of nested classes if (currDecl.getParent().getParent().getKind().isType()) { @@ -502,7 +508,27 @@ class HtmlDecorator { return entry; } - static String generateIntroductionSignatures(IProgramElement decl, boolean isDetails) { + /** + * Generates a relative directory path fragment that can be + * usd to navigate "upwards". + * @param packagePath + * @return String consisting of multiple "../" parts, one for + * each component part of the input <code>packagePath</code>. + */ + private static String getRelativeComponent(String packagePath) { + StringBuffer result = new StringBuffer(""); + if (packagePath != null) { + StringTokenizer sTok = new StringTokenizer(packagePath, "/", false); + while (sTok.hasMoreTokens()) { + sTok.nextToken(); // don't care about the token value + result.append(".." + Config.DIR_SEP_CHAR); + }// end while + }// end if + + return result.toString(); + } + + static String generateIntroductionSignatures(IProgramElement decl, boolean isDetails) { return "<not implemented>"; // Declaration[] decls = decl.getDeclarations(); // String entry = ""; |