Skip to main content

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

Is there any reason why you are not installing just the equinox
weaving feature?  The IU id is
org.eclipse.equinox.weaving.sdk.feature.group and it is available from
 the ajdt update sites.

On Wed, Nov 23, 2011 at 2:51 AM, Thomas Hofmann <email@xxxxxxxxxxxxxxxxx> wrote:
> Hi Andy,
>
> what I basically want to do is install equinox weaving and configure it so that some other plug-in I wrote can use it and weave into a third plug-in.
>
> I want to bundle all the necessary plug-ins and features to do so into a p2 repository.
>
> Currently, I use AJDT update site to only install org.eclipse.contribution.weaving.jdt. This work without problems.
>
> I was just wondering if this part of AJDT is available somewhere else to consume. If I am not mistaken it is not separated from AJDT sources. I also don't need to weave into the JDT but it doesn't hurt.
>
> So what I could do is build org.eclipse.contribution.weaving.jdt myself and bundle it in one of my features. Since you are saying it is optional in a sense that AJDT code won't be invoked I guess that there will be references to AJDT that I need at build time but I can have a look at this myself.
>
> I just want to avoid for consumers of my plug-ins that use equinox weaving that they will need to install and configure the weaving bundles and hooks.
>
> Thomas
>
> -----Original Message-----
> From: aspectj-users-bounces@xxxxxxxxxxx [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Andrew Eisenberg
> Sent: Dienstag, 22. November 2011 17:13
> To: aspectj-users@xxxxxxxxxxx
> Subject: Re: [aspectj-users] Equinox waeving
>
> Hi Thomas,
>
> There are some pieces of the JDT weaving plugin that are AJDT specific, but those pieces are optional (meaning that if AJDT is not installed, that part of the functionality is not invoked).  JDT Weaving is used by ScalaIDE as well as the Gosu plugin and they are able to avoid the AJDT specific pieces.
>
> I have been considering a refactoring of JDT weaving for a long time, but it would be a very complicated job that provides very little benefit since all clients of JDT Weaving are able to use it successfully.
>
> It would not be possible to move some of JDT weaving into Equinox weaving since Equinox weaving is an equinox project and must work in OSGi environments that do not have any eclipse-specific bundles installed.
>
> Can you be more specific as to what you are trying to do and what exactly is the problem?  Why is it difficult to install Equinox/JDT weaving?  You should be able to install from the update site.
>
> On Tue, Nov 22, 2011 at 12:59 AM, Thomas Hofmann <email@xxxxxxxxxxxxxxxxx> wrote:
>> 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/l
>>>> a
>>>> 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
>> _______________________________________________
>> 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
>


Back to the top