diff options
author | mkersten <mkersten> | 2005-05-12 06:53:15 +0000 |
---|---|---|
committer | mkersten <mkersten> | 2005-05-12 06:53:15 +0000 |
commit | 7b7c7b2fb25e09660f066e556a5008545d655f6f (patch) | |
tree | ad54b98b1f456dd472b64a4901e146abf09e14b1 | |
parent | 359b2b075018517eb608036e62ba37a644a29a30 (diff) | |
download | aspectj-7b7c7b2fb25e09660f066e556a5008545d655f6f.tar.gz aspectj-7b7c7b2fb25e09660f066e556a5008545d655f6f.zip |
Andrew's patch for: bug#82755 update ajdoc to support Java 5 language features
3 files changed, 14 insertions, 5 deletions
diff --git a/ajdoc/src/org/aspectj/tools/ajdoc/Declaration.java b/ajdoc/src/org/aspectj/tools/ajdoc/Declaration.java index daa079f55..2480c6659 100644 --- a/ajdoc/src/org/aspectj/tools/ajdoc/Declaration.java +++ b/ajdoc/src/org/aspectj/tools/ajdoc/Declaration.java @@ -252,7 +252,7 @@ public class Declaration implements Serializable { public boolean isType() { - return getKind().equals("interface") || getKind().equals("class") || getKind().equals("aspect"); + return getKind().equals("interface") || getKind().equals("class") || getKind().equals("aspect") || getKind().equals("enum"); } public boolean hasBody() { diff --git a/ajdoc/src/org/aspectj/tools/ajdoc/StubFileGenerator.java b/ajdoc/src/org/aspectj/tools/ajdoc/StubFileGenerator.java index dc4e6485d..88f61117c 100644 --- a/ajdoc/src/org/aspectj/tools/ajdoc/StubFileGenerator.java +++ b/ajdoc/src/org/aspectj/tools/ajdoc/StubFileGenerator.java @@ -111,7 +111,15 @@ class StubFileGenerator { String signature = ""; if (!member.getKind().equals(IProgramElement.Kind.POINTCUT) && !member.getKind().equals(IProgramElement.Kind.ADVICE)) { - signature = member.getSourceSignature();//StructureUtil.genSignature(member); + signature = member.getSourceSignature();//StructureUtil.genSignature(member); + if (member.getKind().equals(IProgramElement.Kind.ENUM_VALUE)){ + if (((IProgramElement)members.get(members.indexOf(member)+1)).getKind().equals(IProgramElement.Kind.ENUM_VALUE)){ + // if the next member is also an ENUM_VALUE: + signature = signature + ","; + } else { + signature = signature + ";"; + } + } } if (member.getKind().isDeclare()) { diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmHierarchyBuilder.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmHierarchyBuilder.java index 460de15f4..04d2bde9f 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmHierarchyBuilder.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmHierarchyBuilder.java @@ -578,12 +578,13 @@ public class AsmHierarchyBuilder extends ASTVisitor { /** * Doesn't print qualified allocation expressions. */ - protected String genSourceSignature(FieldDeclaration fieldDeclaration) { + protected String genSourceSignature(FieldDeclaration fieldDeclaration) { StringBuffer output = new StringBuffer(); - FieldDeclaration.printModifiers(fieldDeclaration.modifiers, output); if (fieldDeclaration.type == null) { // This is an enum value - output.append(fieldDeclaration.binding.type.debugName()).append(" ").append(fieldDeclaration.name); + output.append(fieldDeclaration.name); // ajh02: the "," or ";" has to be put on by whatever uses the sourceSignature + return output.toString(); } else { + FieldDeclaration.printModifiers(fieldDeclaration.modifiers, output); fieldDeclaration.type.print(0, output).append(' ').append(fieldDeclaration.name); } |