diff options
3 files changed, 5 insertions, 2 deletions
diff --git a/ajde/testsrc/org/aspectj/ajde/AsmDeclarationsTest.java b/ajde/testsrc/org/aspectj/ajde/AsmDeclarationsTest.java index e374ba5cd..1925ea02b 100644 --- a/ajde/testsrc/org/aspectj/ajde/AsmDeclarationsTest.java +++ b/ajde/testsrc/org/aspectj/ajde/AsmDeclarationsTest.java @@ -35,6 +35,7 @@ public class AsmDeclarationsTest extends AjdeTestCase { IProgramElement packageAspect = AsmManager.getDefault().getHierarchy().findElementForType(null, "AdviceNamingCoverage"); assertNotNull(packageAspect); assertEquals(IProgramElement.Accessibility.PACKAGE, packageAspect.getAccessibility()); + assertEquals("aspect should not have public in it's signature","aspect AdviceNamingCoverage",packageAspect.getSourceSignature()); } public void testStaticModifiers() { diff --git a/ajdoc/src/org/aspectj/tools/ajdoc/StubFileGenerator.java b/ajdoc/src/org/aspectj/tools/ajdoc/StubFileGenerator.java index c22906558..b30c40173 100644 --- a/ajdoc/src/org/aspectj/tools/ajdoc/StubFileGenerator.java +++ b/ajdoc/src/org/aspectj/tools/ajdoc/StubFileGenerator.java @@ -165,7 +165,7 @@ class StubFileGenerator{ String signature = classNode.getSourceSignature(); if (signature != null){ int index = signature.indexOf("aspect"); - if (index != -1 && signature.charAt(index-1) != '.') { + if (index == 0 || (index != -1 && signature.charAt(index-1) != '.') ) { signature = signature.substring(0, index) + "class " + signature.substring(index + 6, signature.length()); diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AspectDeclaration.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AspectDeclaration.java index 9c683d7d7..87dc14868 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AspectDeclaration.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AspectDeclaration.java @@ -1113,7 +1113,9 @@ public class AspectDeclaration extends TypeDeclaration { // } public StringBuffer printHeader(int indent, StringBuffer output) { - printModifiers(this.modifiers, output); + // since all aspects are made public we want to print the + // modifiers that were supplied in the original source code + printModifiers(this.declaredModifiers,output); output.append("aspect " ); output.append(name); if (superclass != null) { |