From: acolyer Date: Tue, 27 Sep 2005 14:59:18 +0000 (+0000) Subject: give context in can't find type messages X-Git-Tag: preDefaultReweavable~42 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c6567597adac0d457cdab8df3c24f9044f21e0e8;p=aspectj.git give context in can't find type messages --- diff --git a/weaver/src/org/aspectj/weaver/MissingResolvedTypeWithKnownSignature.java b/weaver/src/org/aspectj/weaver/MissingResolvedTypeWithKnownSignature.java index f8fd779fc..204aa144b 100644 --- a/weaver/src/org/aspectj/weaver/MissingResolvedTypeWithKnownSignature.java +++ b/weaver/src/org/aspectj/weaver/MissingResolvedTypeWithKnownSignature.java @@ -16,6 +16,7 @@ import java.util.List; import org.aspectj.bridge.ISourceLocation; import org.aspectj.bridge.MessageUtil; +import org.aspectj.bridge.context.CompilationAndWeavingContext; /** * When we try to resolve a type in the world that we require to be present, @@ -173,29 +174,33 @@ public class MissingResolvedTypeWithKnownSignature extends ResolvedType { public void raiseWarningOnJoinPointSignature(String signature) { if (issuedJoinPointWarning) return; - MessageUtil.warn(world.getMessageHandler(), - WeaverMessages.format(WeaverMessages.CANT_FIND_TYPE_JOINPOINT,getName(),signature)); + String message = WeaverMessages.format(WeaverMessages.CANT_FIND_TYPE_JOINPOINT,getName(),signature); + message += "\n" + CompilationAndWeavingContext.getCurrentContext(); + MessageUtil.warn(world.getMessageHandler(),message); issuedJoinPointWarning = true; } public void raiseWarningOnMissingInterfaceWhilstFindingMethods() { if (issuedMissingInterfaceWarning) return; - MessageUtil.warn(world.getMessageHandler(), - WeaverMessages.format(WeaverMessages.CANT_FIND_TYPE_INTERFACE_METHODS,getName(),signature)); - issuedMissingInterfaceWarning = true; + String message = WeaverMessages.format(WeaverMessages.CANT_FIND_TYPE_INTERFACE_METHODS,getName(),signature); + message += "\n" + CompilationAndWeavingContext.getCurrentContext(); + MessageUtil.warn(world.getMessageHandler(),message); + issuedMissingInterfaceWarning = true; } private void raiseCantFindType(String key) { if (issuedCantFindTypeError) return; - MessageUtil.error(world.getMessageHandler(), - WeaverMessages.format(key,getName())); + String message = WeaverMessages.format(key,getName()); + message += "\n" + CompilationAndWeavingContext.getCurrentContext(); + MessageUtil.error(world.getMessageHandler(),message); issuedCantFindTypeError = true; } private void raiseCantFindType(String key,String insert) { if (issuedCantFindTypeError) return; - MessageUtil.error(world.getMessageHandler(), - WeaverMessages.format(key,getName(),insert)); + String message = WeaverMessages.format(key,getName(),insert); + message += "\n" + CompilationAndWeavingContext.getCurrentContext(); + MessageUtil.error(world.getMessageHandler(),message); issuedCantFindTypeError = true; }