Community
Participate
Working Groups
Build Identifier: Build Identifier: Version: Indigo Service Release 1, Build id: 20110916-0149, Version: 2.1.3.e37x-20110628-1900, AspectJ version: 1.6.12.20110613132200 When @DeclareMixing inter-type is defined for a class and the constructor of that (non inter-type) class takes argument(s), AJDT claims that constructor as undefined. With the following example codes, AJDT claims that MixeeClass1( String newStr) constructor is undefined. However, it can be built and run normally. public static interface MixinInterface { public void mixinInterfaceMethod(); } public static class MixinClass implements MixinInterface { ForDeclareMixin forDeclareMixin = null; public MixinClass( ForDeclareMixin forDeclareMixin) { this.forDeclareMixin = forDeclareMixin; } public void mixinInterfaceMethod() { forDeclareMixin.addStrToStrList( "mixinInterfaceMethod"); } } public static class MixeeClass1 extends ForDeclareMixin { public MixeeClass1() { super(); this.addStrToStrList( "MixeeClass1()"); } public MixeeClass1( String newStr) { super(); this.addStrToStrList( "MixeeClass1( " + newStr + ")"); } } @DeclareMixin( value="aspectJTest.DeclareMixinAspect.MixeeClass1") public static MixinInterface addMixinInterfaceInterface( Object instance) { return new MixinClass( (MixeeClass1)instance); } @Around( value="execution( * aspectJTest.ForDeclareMixin+.getStrList()) " + "&& this( mixinInterface)" ) public Object aroundAdvisedOMethod( ProceedingJoinPoint proceedingJoinPoint, MixinInterface mixinInterface) { mixinInterface.mixinInterfaceMethod(); try { return proceedingJoinPoint.proceed(); } catch( Throwable throwable) { if ( throwable instanceof RuntimeException) { throw (RuntimeException)throwable; } else { throw new RuntimeException( throwable); } } } Reproducible: Always Steps to Reproduce: 1. Import DeclareMixingMessingConstructorTest sample AspectJ project from the attached DeclareMixingMessingConstructorTest.zip file. 2. Open DeclareMixingTest.java file with Eclipse. AJDT claims that DeclareMixinAspect.MixeeClass1 constructor with String argument is undefined. Please take a look at ScreenCopy.JPG file at the root of DeclareMixingMessingConstructorTest sample AspectJ project as the screen copy of that error.
Created attachment 210959 [details] DeclareMixingMessingConstructorTest sample project to repro the error
as the error only appears in the editor, and not in the problems view, I'm transferring to AJDT.
It's likely that this is an error that is leaking through the Java reconciler. I'll have a look.