AspectJ

已回答

Does the integration work ok in idea 10.5 or am I just doing something rather stupid ? :)

With a file having an aj extentions and having the java compiler as AJC

I get basic errors such as 'cannot resolve symbol' for thisJoinPoint with regards to the error display within a file.
See attachment.



Should this work ?

Thanks



Attachment(s):
idea.png
0

At the moment AspectJ support is limited to inter-type declarations. Full support is planned for IDEA 11.

0
Avatar
Permanently deleted user

What's the best way of working in the mean while ?

0

It depends on what you need from IDEA.
E.g. you may turn inspections off for problematic files.

0
Avatar
Permanently deleted user

In a multi maven model project, is it possible to have the ajc compiler just for one module rather than the whole project ?

Is this likely in 11 ?

Thanks

0

Not yet.

I'm not sure (about 11) but it's possible. Do you have any objections in compiling entire project by Ajc?

0
Avatar
Permanently deleted user

AspectJ has a conflict with lombok and possibly annotation processors.

I'd keep the aspect module lombok free and then just weave other other modules via their compiled classes.
Currently using the 'aspectj weaver' plugin.

Thanks

0

Ok, I see.

BTW there is a discussion about the issue... technically, Ajc and Lombok can coexist.

0
Avatar
Permanently deleted user

Yes, they can co-exist via class time weaving.

ie lombok performs it's changes at compile time using javac and then you weave later.

0
Avatar
Permanently deleted user

Also will 11 allow compiled class weaving ?

0

So far there wasn't any demand for such functionality - I doubt it's possible in IDEA 11 timeframe. Please file an issue.

0

So with other words AspectJ is useless? I'm trying to create a custom annotation that my current employer can use in their source code which is filled with lombok and other spring annotations, and if Lombok is an issue then I can not use this library.

0

The plugin supports post-compile weaving for quite a long time, so should be possible.

Are you going to use AspectJ for adding the new annotation? Why not just add it in the source code?

0

请先登录再写评论。