Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] JP Matching report?

Hi, Andrew,

I've just opened a bugzilla request. I'll have a go at implementing it myself this afternoon and I'll add the resulting code to the request. (Hoping it'll pass the niceness test ;-) )

On 27 Jan 2009, at 19:08, Andrew Eisenberg wrote:

Hi Johan,

You're right that it isn't in the model. Just haven't had it requested
yet.  We would appreciate if you could add an enhancement request into
bugzilla for this.

There is an experimental API that allows you to have access to the
actual compiler state (not just a structural and relationship model).
See the class org.eclipse.ajdt.core.model.AJWorldFacade.  It has a
relationship to an org.aspectj.weaver.World object.  You can copy the
code that allows you to gain access to World.

This object contains all information about the previous compile.  The
precedence is included, but it may be a little messy to get at it.

There are 4 methods that might be of interest to you:
World.compareByPrecedence,
World.getPrecedenceIfAny,
World.compareByPrecedenceAndHierarchy
World.getCrosscuttingMembersSet().getDeclareDominates()

A few notes of caution, though: World is not an API class, so read
access only.  It is also only valid for a single compile, so don't
hang on to it for longer than you need.

If you can send me some nice code, I'd consider adding it to
AJWorldFacade so that it can be part of the API.

Hope this helps.
--a

--
Johan Fabry
jfabry@xxxxxxxxxxxxx - http://dcc.uchile.cl/~jfabry
PLEIAD Lab - Computer Science Department (DCC) - University of Chile





Back to the top