From 58e3cb226a2afa23134b75acecce617e5b16f781 Mon Sep 17 00:00:00 2001 From: mkersten Date: Tue, 29 Jul 2003 10:55:25 +0000 Subject: [PATCH] Fix for bug 40824. --- .../ajdt/internal/core/builder/AsmBuilder.java | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) 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, -- 2.39.5