Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ajdt-dev] AJDT and ITDs

Sure.  AJDT uses the crosscutting model from AspectJ as the base.  The
entry point into the AspectJ model is the AJProjectModelFacade class
(and AJProjectModelFactory to create them).  This class allows you to
convert from IJavaElement handles to IProgramElement handles, as well
as ask interesting questions about what elements crosscut other
elements.

This information is used to seed content assist, gutter markers, the
crosscutting view, etc.  Gutter markers and crosscutting view are easy
since that is basically just taking a projection of the underlying
model and transforming it to the correct format.

ITD Aware content assist is a bit more complex because we need to
trick JDT into thinking that ITDs really exist in the target type.
ITDInserter and ITDAwareSourceTypeElementInfo are two classes that
handle this mocking up of ITDs.

There is a code sample on AJProjectModelFacade available on this wiki page:
http://wiki.eclipse.org/Developer%27s_guide_to_building_tools_on_top_of_AJDT_and_AspectJ

I'm happy to go into more detail if you have any questions.

On Wed, Jul 22, 2009 at 1:14 PM, Simone Gianni<simoneg@xxxxxxxxxx> wrote:
> Hi all,
> this is the first time I have a serious look at AJDT internals, so please
> forgive me if I ask stupid questions :)
>
> I'm trying to figure out how AJDT fetches information from the underlying
> AJ, especially regarding ITDs. Does AJDT "re-reads" the .class files
> generated by AJ build? Or does it parses pointcuts and check them using the
> matcher? Or what else? :D
>
> I'm talking about informations to display ITD content assist as well as
> cross reference view, even if I think these use different methods.
>
> If you can point me to relevant part of code I'll then try to figure it out
> on my own.
>
> Simone
>
> --
> Simone Gianni            CEO Semeru s.r.l.           Apache Committer
> http://www.simonegianni.it/
>
> _______________________________________________
> ajdt-dev mailing list
> ajdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/ajdt-dev
>


Back to the top