]> source.dussan.org Git - aspectj.git/commitdiff
Andrew's patch for: bug#82755 update ajdoc to support Java 5 language features
authormkersten <mkersten>
Thu, 12 May 2005 06:53:15 +0000 (06:53 +0000)
committermkersten <mkersten>
Thu, 12 May 2005 06:53:15 +0000 (06:53 +0000)
ajdoc/src/org/aspectj/tools/ajdoc/Declaration.java
ajdoc/src/org/aspectj/tools/ajdoc/StubFileGenerator.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmHierarchyBuilder.java

index daa079f554bdc1d7f81972dc08dae7fcb543a8c5..2480c6659641a8f7113d7b581f3fb6c96f337fd3 100644 (file)
@@ -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() {
index dc4e6485d021287a6f152bcbb13b60714fa8ea9c..88f61117c069d871e4b7a5328552a6c68d0cddfb 100644 (file)
@@ -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()) {
index 460de15f477097d15b552c9f514fbc9413b78b83..04d2bde9f1b2069c9c16caac668af97f40e33fe4 100644 (file)
@@ -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);
                }