Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [ajdt-dev] StructureModelUtil

The structure model is built during the compilation process, after advice
planning is done and before bytecodes are produced.  Here are the method
calls involved with compiling and getting the model.  The org.aspectj.asm
package contains the structure model APIs.
 
Ajde.getDefault().getConfigurationManager().setActiveConfigFile("foo.lst");
Ajde.getDefault().getBuildManager().build();
Ajde.getDefault().getStructureModelManager().getStructureModel();	

For examples of how to walk the model take a look at StructureModelTest in
the test sources of the org.aspectj.ajde package.

If you're interested in being notified of when the model has been updated
(i.e. when the user completed a compile) you can register a new listener
with by calling the StructureModelManager.addListener method in the
org.aspectj.asm package.  The org.aspectj.ajde package also has an API for
creating views of the model, and you can look to the any IDE plug-in to see
how they are used.  

I will be creating some documentation on using these APIs.  But for the time
being the best approach is looking through how they're used by the clients
and asking questions in email.

Mik

--
http://kerstens.org/mik
 

> -----Original Message-----
> From: ajdt-dev-admin@xxxxxxxxxxxxxxx [mailto:ajdt-dev-
> admin@xxxxxxxxxxxxxxx] On Behalf Of Ivica Aracic
> Sent: Sunday, July 13, 2003 8:50 PM
> To: ajdt-dev@xxxxxxxxxxxxxxx
> 
> Hello!
> 
> I am trying to figure out how the Outline View and Aspect Visualiser are
> getting their Infos about the pointcuts and advices and their location in
> the source code.
> 
> I found out that both of them use StructureModelUtil to get that infos.
> But where is the structure model built?
> Does it happen during compilation process or is it built from class
> attributes
> stored by weaver in .class files?
> 
> Could someone point me to the code where this happens?
> 
> 
> thx in advance!
> 
> --
> Ivica Aracic
> http://www.bytelords.de/
> 
> _______________________________________________
> ajdt-dev mailing list
> ajdt-dev@xxxxxxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/ajdt-dev



Back to the top