]> source.dussan.org Git - aspectj.git/commitdiff
Fix for bug 40824.
authormkersten <mkersten>
Tue, 29 Jul 2003 10:55:25 +0000 (10:55 +0000)
committermkersten <mkersten>
Tue, 29 Jul 2003 10:55:25 +0000 (10:55 +0000)
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmBuilder.java

index e5acdb7941b2d9252e1b619eb5132af3e25102e7..96ddef7af4a878feafb73fff506b8a418034ea8e 100644 (file)
@@ -288,12 +288,23 @@ public class AsmBuilder extends AbstractSyntaxTreeVisitorAdapter {
                } else if (methodDeclaration instanceof DeclareDeclaration) { 
                        DeclareDeclaration declare = (DeclareDeclaration)methodDeclaration;
                        label = translateDeclareName(declare.toString());
-                       if (label.indexOf("warning") != -1) kind = ProgramElementNode.Kind.DECLARE_WARNING;
-                       if (label.indexOf("error") != -1) kind = ProgramElementNode.Kind.DECLARE_ERROR;
+                       
+                       // TODO: fix this horrible way of checking what kind of declare it is
+                       if (label.indexOf("warning") != -1) {
+                               kind = ProgramElementNode.Kind.DECLARE_WARNING;
+                       } else if (label.indexOf("error") != -1) {
+                               kind = ProgramElementNode.Kind.DECLARE_ERROR;
+                       } else if (label.indexOf("parents") != -1) {
+                               kind = ProgramElementNode.Kind.DECLARE_PARENTS;
+                       } else if (label.indexOf("soft") != -1) {
+                               kind = ProgramElementNode.Kind.DECLARE_SOFT;
+                   } else {
+                               kind = ProgramElementNode.Kind.ERROR;   
+                       }
                } else if (methodDeclaration instanceof InterTypeDeclaration) {
                        kind = ProgramElementNode.Kind.INTRODUCTION;
                        label = translateInterTypeDecName(new String(((InterTypeDeclaration)methodDeclaration).selector));
-               } 
+               }
                
                ProgramElementNode peNode = new ProgramElementNode(
                        label,