Example usage for org.aspectj.ajde.core AjCompiler getModel

List of usage examples for org.aspectj.ajde.core AjCompiler getModel

Introduction

In this page you can find the example usage for org.aspectj.ajde.core AjCompiler getModel.

Prototype

public AsmManager getModel() 

Source Link

Usage

From source file:org.eclipse.ajdt.core.model.AJProjectModelFacade.java

License:Open Source License

/**
 * grabs the structure and relationships for this project
 * <p> /*from  ww w . j a va  2  s . co  m*/
 * called by the before advice in EnsureInitialized aspect
 */
synchronized void init() {
    if (!buildListener.isCurrentlyBuilding(project)) {
        AjCompiler compiler = AspectJPlugin.getDefault().getCompilerFactory().getCompilerForProject(project);
        AsmManager existingState = compiler.getModel();
        if (existingState != null) {
            relationshipMap = existingState.getRelationshipMap();
            structureModel = existingState.getHierarchy();
            if (relationshipMap != null && structureModel != null) {
                isInitialized = true;
            }
        }
    } else {
        // can't initialize...building
    }
}