summaryrefslogtreecommitdiffstats
path: root/ajdoc
diff options
context:
space:
mode:
authoraclement <aclement>2006-01-09 11:31:40 +0000
committeraclement <aclement>2006-01-09 11:31:40 +0000
commit3cadffc3529d94894dfa955497edcfae257c95a6 (patch)
tree57f8df3a9ce07e6cdfcffc3a44eb1e82dce62018 /ajdoc
parent06c7f82ea977dc9c03b249f9c65289555496c925 (diff)
downloadaspectj-3cadffc3529d94894dfa955497edcfae257c95a6.tar.gz
aspectj-3cadffc3529d94894dfa955497edcfae257c95a6.zip
fix from comment #14 on bug 119453 to do with incorrect results for decp statements. (from helen)
Diffstat (limited to 'ajdoc')
-rw-r--r--ajdoc/src/org/aspectj/tools/ajdoc/HtmlDecorator.java3
-rw-r--r--ajdoc/testdata/pr119453/src/pack/A.aj2
-rw-r--r--ajdoc/testsrc/org/aspectj/tools/ajdoc/ITDTest.java12
3 files changed, 17 insertions, 0 deletions
diff --git a/ajdoc/src/org/aspectj/tools/ajdoc/HtmlDecorator.java b/ajdoc/src/org/aspectj/tools/ajdoc/HtmlDecorator.java
index c43e78f64..4b8b679cf 100644
--- a/ajdoc/src/org/aspectj/tools/ajdoc/HtmlDecorator.java
+++ b/ajdoc/src/org/aspectj/tools/ajdoc/HtmlDecorator.java
@@ -704,6 +704,9 @@ class HtmlDecorator {
*/
private static String generateModifierInformation(IProgramElement decl, boolean isDetails) {
String intro = "";
+ if (decl.getKind().isDeclare()) {
+ return intro + "</TT>";
+ }
if (isDetails ||
!decl.getAccessibility().equals(IProgramElement.Accessibility.PUBLIC)) {
intro += "<TT>" + decl.getAccessibility().toString() + "&nbsp;" ;
diff --git a/ajdoc/testdata/pr119453/src/pack/A.aj b/ajdoc/testdata/pr119453/src/pack/A.aj
index 2a4a61a9d..21517b07f 100644
--- a/ajdoc/testdata/pr119453/src/pack/A.aj
+++ b/ajdoc/testdata/pr119453/src/pack/A.aj
@@ -4,6 +4,8 @@ public aspect A {
private int C.y = 3;
+ declare warning : execution(* C.method()) : "warning..";
+
/**
* blah
*/
diff --git a/ajdoc/testsrc/org/aspectj/tools/ajdoc/ITDTest.java b/ajdoc/testsrc/org/aspectj/tools/ajdoc/ITDTest.java
index f2c3cd0ad..58da282a0 100644
--- a/ajdoc/testsrc/org/aspectj/tools/ajdoc/ITDTest.java
+++ b/ajdoc/testsrc/org/aspectj/tools/ajdoc/ITDTest.java
@@ -158,6 +158,7 @@ public class ITDTest extends TestCase {
boolean containsPublicString = false;
boolean containsITDFAsHeader = false;
boolean containsCorrectConstInfo = false;
+ boolean containsPackageVoid = false;
// walk through the information in this section
String nextLine = readerA.readLine();
while(nextLine != null
@@ -176,6 +177,9 @@ public class ITDTest extends TestCase {
if (nextLine.indexOf("public&nbsp;</TT><B>C.C") != -1 ) {
containsCorrectConstInfo = true;
}
+ if (nextLine.indexOf("package&nbsp;void") != -1 ) {
+ containsPackageVoid = true;
+ }
nextLine = readerA.readLine();
}
assertTrue("Declare detail summary should contain the 'private int' " +
@@ -186,6 +190,8 @@ public class ITDTest extends TestCase {
containsITDFAsHeader);
assertTrue("Declare detail summary should have 'public C.C' for the " +
"ITD constructor", containsCorrectConstInfo);
+ assertFalse("Declare detail summary should not have 'package void' in it",
+ containsPackageVoid);
// we may have hit the "inter-type field summary" so set this to
// be the next line we look at.
@@ -196,6 +202,7 @@ public class ITDTest extends TestCase {
boolean containsInt = false;
boolean containsString = false;
boolean containsPublic = false;
+ boolean containsPackageVoid = false;
// walk through the information in this section
String nextLine = readerA.readLine();
while(nextLine != null && (nextLine.indexOf("========") == -1)) {
@@ -211,12 +218,17 @@ public class ITDTest extends TestCase {
if (nextLine.indexOf("String") != -1) {
containsString = true;
}
+ if (nextLine.indexOf("package&nbsp;void") != -1) {
+ containsPackageVoid = true;
+ }
nextLine = readerA.readLine();
}
assertTrue("Declare summary should contain the 'private' modifier",containsPrivate);
assertTrue("Declare summary should contain the 'int' return type",containsInt);
assertFalse("Declare summary should not contain the 'public' modifier",containsPublic);
assertTrue("Declare summary should contain the 'String' return type",containsString);
+ assertFalse("Declare summary should not have 'package void' in it",
+ containsPackageVoid);
// we may have hit the "Declare Details" so set this to
// be the next line we look at.