Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ajdt-dev] How to retrieve target IJavaElement from IAJCodeElement?

Hi Andy,

On Mon 23.Jun'08 at 10:22:20 -0700, Andy Clement wrote:
Raffi - are you really just interested in the advice relationship
information?  If so, have you seen the eclipse wiki page for how to get
that information from AJDT builds?

http://wiki.eclipse.org/index.php/Developer%27s_guide_to_building_tools_on_top_of_AJDT_and_AspectJ

Or are you already using that and finding it insufficient?

In fact, yes, as far as I can tell it is inefficient in the case of
method-calls, field-gets, etc. Although the AJRelationship.getSource()
method works fine (i.e., returns the caller), the
AJRelationship.getTarget() returns the method-call IAJCodeElement. This
what I would expect, however, there should be a method to get the caller
from that object.  Specifically, I am looking for a way to retrieve the
compile time target method available through an instance method of the
IAJCodeElement. After all, the caller is available through
IAJCodeElement.getParent(), why not have the callee as well? Thanks for
all the help again!!

Raffi


Back to the top