Thanks, Adrian.
This has piqued my curiosity a bit more.
Is it expected that even simple references to an aspect class are not allowed by the JDT Java editor? It wasn't the use of aspectOf() method per se that it was complaining about, but any reference to the aspect class.
Things like:
import MyAspect;
or:
foo = MyAspect.SOME_EVIL_PUBLIC_STATIC_FINAL;
Is it that, due to the type system differences, an aspect class is wholly unrecognizable to the JDT Java editor?
Cheers,
- Ken On Apr 12, 2006, at 5:03 AM, Adrian Colyer wrote: The JDT Java editor doesn't understanding the AspectJ type system, so where aspects extend the base Java model (such as the "aspectOf" method), the editor is unaware of them and highlights things like "aspectOf" as potential errors. At compile time of course, AspectJ compiles the file quite happily.
The solution is to go to the package explorer and select "open with... AspectJ/Java editor" for the file. This editor is an extension of the Java one and *does* understand the AJ type system.
On 12/04/06, Ken Pelletier <ken@xxxxxxxx> wrote: Within an ADJT project, if I have a JUnit TestCase in which I want to instantiate an aspect (from the same project) using aspectOf().
In doing this, the test case gets errors in the gutters on references the aspect class: "cannot be resolved as a type", and I am also unable to import the aspect class in eclipse.
I can, however launch the test and it runs and passes.
Is there a configuration to get around this?
I find I can open the TestCase with the AspectJ editor and it then works, but it strikes me that there must be something else I'm missing. It is just a java class after all.
Can somebody please enlighten me?
Thanks,
- Ken
_______________________________________________ aspectj-users mailing list aspectj-users@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/aspectj-users
-- -- Adrian adrian.colyer@xxxxxxxxx_______________________________________________ aspectj-users mailing list |