Community
Participate
Working Groups
From the mailing list: --------------- While playing along with AJDT and AspectJ Inter Type Declarations I came across the following annoyance: When I create an Aspect with an ITD method that returns a custom class object (from an included dependency) and declare the necessary import statements in my Aspect, those imports are not automatically weaved in. It gives me the error "The method ... from the type ... refers to the missing type ..." in my client application, without an Eclipse quick fix suggestion :| ----------------------------
The first problem I found was that ITD handles always seem to have fully qualified parameter values on the Aspectj side, but on the JDT side, the handles are only fully qualified if they are fully qualified in the text. Example: This aspect: public aspect InterTypeAspect { public Log InterTypeAspectInterface.getLogger(List<?> h) { return new Log(); } } Has the following handles: Java: =ITD Missing Type Problem/src\/main\/aspect<be.cronos.aop.aspects{InterTypeAspect.aj}InterTypeAspect)InterTypeAspectInterface.getLogger)QList\<*>; AspectJ: =ITD Missing Type Problem/src\/main\/aspect<be.cronos.aop.aspects{InterTypeAspect.aj}InterTypeAspect)InterTypeAspectInterface.getLogger)Qjava.util.List\<*>; So, aspectj handles need to change to accommodate this.
Created attachment 126580 [details] This is the project that I am using This failing project was provided here: http://dev.eclipse.org/mhonarc/newsLists/news.eclipse.technology.ajdt/msg01909.html
Fixed and committed with test. Will be available in next dev build. Return types were not properly set when creating the mock element that should be ITD-ed into the target tyoe. The simple type was being used, not the fully qualified type.
fixed.