Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ajdt-dev] Getting details from AJModel

Hi Irum,

Hmm, currently it's not that easy - you'd have to go from the source
code of the element, to get the string, then extract the names of any
pointcuts, and then locate those pointcuts. We're working on some
pointcut utilities, and we should probably add an easy way to get the
string from the advice element. But I think there's an even better
way, which is for us to expose the "uses pointcut" relationship that
is down in ajde - then you could go straight from an AdviceElement to
a list of PointcutElements. Please raise an enhancement request, and
we'll look into it.

Regards,

Matt.

On 22/09/05, Irum Godil <softwarengineer2004@xxxxxxxxx> wrote:
>
> Hi,
> I am working on developing a plugin, that will display the "advice" and
> "declare" elements together with the associated named or anonymous pointcut
> on which they operate. I am using the
> org.eclipse.ajdt.core.model.AJModel class, and I am able to
> get all the "AdviceElements" and "DeclareElements" inside an aspect.
> However, these elements only give me the name of the selected Element.
>
> For instance, from the following lines of code:
>
> pointcut aexec(): execution( public void D.a());
> before(): aexec() { }
>
> The AdviceElement corresponding to "before(): aexec() { }" only reveals the
> infromation "before( )". I am unable to find APIs that will give me the
> pointcut associated with it, i.e. "aexec" in the above case.
>
> Can someone please tell me if I can get the pointcut information for an
> associated "AdviceElement", and which APIs to use?
>
>
>
>
> Thanks a lot,
> Sincerely,
> Irum Godil.
> www.cs.utoronto.ca/~irum
>
>
>  ________________________________
> Yahoo! for Good
>  Click here to donate to the Hurricane Katrina relief effort.
>
>
> _______________________________________________
> ajdt-dev mailing list
> ajdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/ajdt-dev
>
>
>


Back to the top