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?

Well, I would say as the current definition of IAJCodeElement is this:

public interface IAJCodeElement extends IJavaElement {

}

you might say it is not finished :)

The model that you have access to through the guide on the wiki
provides everything about the relationships between elements, it is
all there and it is used to populate all the extra views we have, and
gutters markers, etc.   I'm surprised if it is insufficient for
method-calls and field-gets - that seems like it would be a big bug
(or are you just talking about duplicate identical join points on one
line - which makes it a smaller bug?).  If you see the information in
the cross reference view (or in the problems view after activating the
option to display weaveinfo messages in there) then it should be
accessible in the model.  Making parts of that model accessible
through more methods on IAJCodeElement is a different requirement.  I
see you have raised
https://bugs.eclipse.org/bugs/show_bug.cgi?id=238054 but that doesn't
mention the IAJCodeElements, just the duplicate jps on one line not
manifesting as multiple entries in the popup menus and views.

cheers,
Andy.

2008/6/23 Raffi Takvor Khatchadourian <khatchad@xxxxxxxxxxxxxxxxxx>:
> 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
> _______________________________________________
> ajdt-dev mailing list
> ajdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/ajdt-dev
>


Back to the top