]> source.dussan.org Git - aspectj.git/commitdiff
pr121711 - from Helen - removing >1.3 apis that were introduced in previous patch.
authoraclement <aclement>
Mon, 16 Jan 2006 10:59:49 +0000 (10:59 +0000)
committeraclement <aclement>
Mon, 16 Jan 2006 10:59:49 +0000 (10:59 +0000)
ajdoc/src/org/aspectj/tools/ajdoc/HtmlDecorator.java
ajdoc/testsrc/org/aspectj/tools/ajdoc/DeclareFormsTest.java

index ba68dc2991eecaf84aad35214eac6ad1ca0dc0b0..87dc9d72c73f07204ec879bcd8c63d07f32cfc66 100644 (file)
@@ -228,7 +228,7 @@ class HtmlDecorator {
                 int secondClassStartIndex = fileContents.toString().indexOf("class <B>");
                 if (secondClassStartIndex != -1) {
                        String name = decl.toSignatureString();
-                                       int classEndIndex = fileContents.indexOf(name + "</B><DT>");
+                                       int classEndIndex = fileContents.toString().indexOf(name + "</B><DT>");
                                        if (secondClassStartIndex != -1 && classEndIndex != -1) {
                                                StringBuffer sb = new StringBuffer(fileContents.toString().
                                                                substring(secondClassStartIndex,classEndIndex));
@@ -601,8 +601,16 @@ class HtmlDecorator {
                                                + "." + currDecl.toLabelString();                
                   
                 // need to replace " with quot; otherwise the links wont work
+                // for 'matches declare' relationship
+                StringBuffer sb = new StringBuffer(currDecl.toLabelString());
+                int nextQuote = sb.toString().indexOf("\"");
+                while (nextQuote != -1) {
+                                       sb.deleteCharAt(nextQuote);
+                                       sb.insert(nextQuote,"quot;");
+                                       nextQuote = sb.toString().indexOf("\"");
+                               }
                 hrefLink += currDecl.getParent().toLinkLabelString() + ".html"
-                                 + "#" + currDecl.toLabelString().replaceAll("\"","quot;"); 
+                                       + "#" + sb.toString(); 
 
                 if (!addedNames.contains(hrefName)) {
                        adviceDoc = adviceDoc +
index 611b31b01db3d51910a6832f01d53a6af2ef12c2..53dce43629e81f776b9bb1a5cc8d4b02236e8fc7 100644 (file)
@@ -99,10 +99,10 @@ public class DeclareFormsTest extends AjdocTestCase {
                                "' in the Declare Detail section", b);
         b = AjdocOutputChecker.summarySectionContainsRel(
                                        htmlFile,"DECLARE SUMMARY",
-                                       declareWarning,
+                                       declareWarningQuotes,
                                        HtmlDecorator.HtmlRelationshipKind.MATCHED_BY,
                                        doItHref);
-               assertTrue("Should have '" + declareWarning + " matched by " + doItHref + 
+               assertTrue("Should have '" + declareWarningQuotes + " matched by " + doItHref + 
                                "' in the Declare Summary section", b);
        }