From: mkersten Date: Tue, 29 Jul 2003 10:55:25 +0000 (+0000) Subject: Fix for bug 40824. X-Git-Tag: V1_1_1~184 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=58e3cb226a2afa23134b75acecce617e5b16f781;p=aspectj.git Fix for bug 40824. --- diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmBuilder.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmBuilder.java index e5acdb794..96ddef7af 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmBuilder.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmBuilder.java @@ -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,