[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Equinox waeving

Hi Andy,

I was looking at the source of org.eclipse.contribution.weaving.jdt to see how the automatic installation of the necessary hooks for Equinox Weaving were implemented. 

org.eclipse.contribution.weaving.jdt is pretty much AJDT specfic. Wouldn't it make sense to separate the preferences and the installation / configuration parts into the Equinox Weaving feature itself?

The problem with Equinox weaving is that if you want to use it you need to make sure that it is installed and installation is a PITA right now and not really feasable to deploy to users that are not into all of this.

Are there any other efforts to do something similar to what you have implemented to configure JDT weaving for pure Equinox weaving that you are aware of.? I wasn't able to find something. 

Regards, Thomas

-----Original Message-----
From: aspectj-users-bounces@xxxxxxxxxxx [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Jean-Nicolas
Sent: Montag, 21. November 2011 17:47
To: aspectj-users@xxxxxxxxxxx
Subject: Re: [aspectj-users] Help with at aspect declare error stack overflow

Hi,

Thought this would need a bug report, just wasn't sure if I was missing something stupid instead.

Here is the bug report : 
https://bugs.eclipse.org/bugs/show_bug.cgi?id=364380

Thanks,
Jni

On Mon 21 Nov 2011 11:22:11 AM EST, Andy Clement wrote:
> Hi,
>
> Please raise a bugzilla for this:
> https://bugs.eclipse.org/bugs/enter_bug.cgi?product=AspectJ
>
>  From a quick look, yes both your aspects should be fine.  You mention 
> a stack overflow, but what was the stack? (Include it in the bugzilla 
> if you can).
>
> cheers,
> Andy
>
> On 20 November 2011 09:38, Jean-Nicolas<jni.viens@xxxxxxxxx>  wrote:
>> Hi,
>>
>> I am getting this weird bug when trying to define an error with 
>> @DeclareError on a method. When compiling, the first time i'm getting 
>> a stack overflow error from aspectj and the second time everything 
>> compiles just fine. We are in LTW. For example, if I do
>>
>> $ mvn clean
>> $ mvn jetty:run<---- this will fail and create an ajcore (stack 
>> overflow) $ mvn jetty:run<---- now it works fine
>>
>> Now, here is the bug I found and how I fixed it... although I don't 
>> understand why it didn't work in the first place.
>>
>> Here is the NOT-working aspect :
>>
>> #########################
>> public class OwnershipSecurityAspect {
>>
>>      @Pointcut("call(public void ca..setOwner(..))&& 
>> !within(ca..OwnershipSecurityAspect)&&  !within(ca..*Test)")
>>      public void myPcut() {};
>>
>>      @DeclareError("myPcut()")
>>      public static final String securityError = "An advice already 
>> exists for setting an owner"; } ########################
>>
>> So that creates the error, but if i put the PC declaration inside the 
>> declareError like so :
>>
>> #########################
>> public class OwnershipSecurityAspect {
>>
>>      @DeclareError("call(public void ca..setOwner(..))&& 
>> !within(ca..OwnershipSecurityAspect)&&  !within(ca..*Test)")
>>      public static final String securityError = "An advice already 
>> exists for setting an owner"; } ##########################
>>
>> Now everything works fine.
>>
>> However, the first method should work too, it's even the example in 
>> the doc
>> :
>> http://www.eclipse.org/aspectj/doc/next/aspectj5rt-api/org/aspectj/la
>> ng/annotation/DeclareError.html
>>
>> Also note that the setOwner() method IS called inside this aspect... 
>> so I thought it was infinite recursion... but I didn't even change 
>> the pointcut definition, so I don't think this is the issue at hand here...
>>
>> Thanks in advance for the help,
>> Jni
>>
>> _______________________________________________
>> aspectj-users mailing list
>> aspectj-users@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>>
>>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users